From 3ac06132267e719cc1cc23f788a8d4164d088d99 Mon Sep 17 00:00:00 2001 From: Marco Cammarata Date: Thu, 16 Mar 2017 23:16:34 +0100 Subject: [PATCH] changed behavoiur, still saving "light" pyfai data, saving theta and buxfix: doFolder was not passing the dezinger parameter to do1d --- xray/azav.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/xray/azav.py b/xray/azav.py index ba14cd4..4aa81c2 100644 --- a/xray/azav.py +++ b/xray/azav.py @@ -280,7 +280,7 @@ def doFolder(folder,files='*.edf*',nQ = 1500,force=False,mask=None,dark=10, err = np.empty( (len(files),nQ) ) for ifname,fname in enumerate(files): img = read(fname) - q,i,e = do1d(ai,img,mask=mask,npt_radial=nQ,dark=dark) + q,i,e = do1d(ai,img,mask=mask,npt_radial=nQ,dark=dark,dezinger=dezinger) data[ifname] = i err[ifname] = e if saveChi: @@ -291,10 +291,18 @@ def doFolder(folder,files='*.edf*',nQ = 1500,force=False,mask=None,dark=10, files = np.concatenate( (saved["files"] ,basenames ) ) data = np.concatenate( (saved["data"] ,data ) ) err = np.concatenate( (saved["err"] ,err ) ) + theta_rad = utils.qToTheta(q,wavelength=ai.wavelength) + theta_deg = utils.qToTheta(q,wavelength=ai.wavelength,asDeg=True) + orig = dict(data=data.copy(),err=err.copy(),q=q.copy()) ret = dict(q=q,folder=folder,files=files,data=data,err=err, - orig = dict(data=data.copy(),err=err.copy(),q=q.copy()), + orig = orig, theta_rad = theta_rad, theta_deg=theta_deg, pyfai=ai_as_dict(ai),pyfai_info=ai_as_str(ai),mask=mask) - if not save_pyfai: del ret['pyfai'] + if not save_pyfai: + ret['pyfai']['chia'] = None + ret['pyfai']['dssa'] = None + ret['pyfai']['q'] = None + ret['pyfai']['ttha'] = None + ret = storage.DataStorage(ret)