diff --git a/chx_packages_local.py b/chx_packages_local.py index a5c88fb..6fdf903 100644 --- a/chx_packages_local.py +++ b/chx_packages_local.py @@ -44,14 +44,14 @@ from chx_compress import ( MultifileBNLCustom, combine_binary_files, - create_compress_header, compress_eigerdata, + create_compress_header, + get_eigerImage_per_file, + init_compress_eigerdata, para_compress_eigerdata, para_segment_compress_eigerdata, - segment_compress_eigerdata, read_compressed_eigerdata, - init_compress_eigerdata, - get_eigerImage_per_file, + segment_compress_eigerdata, ) # from pyCHX.chx_compress_analysis import ( diff --git a/pyCHX/XPCS_SAXS.py b/pyCHX/XPCS_SAXS.py index c7119b1..e910c8c 100644 --- a/pyCHX/XPCS_SAXS.py +++ b/pyCHX/XPCS_SAXS.py @@ -760,10 +760,13 @@ def get_t_iqc(FD, frame_edge, mask, pargs, nx=1500, plot_=False, save=False, sho return qp, np.array(iqs), q -def get_t_iqc_imstack(imgs, frame_edge, mask, pargs, nx=1500, plot_=False, save=False, show_progress=True, *argv, **kwargs): + +def get_t_iqc_imstack( + imgs, frame_edge, mask, pargs, nx=1500, plot_=False, save=False, show_progress=True, *argv, **kwargs +): """ Get t-dependent Iq - + variant of get_t_iqc that takes an image stack like a dask array to calculate average images and then does the radial integration variant by LW 05/162024 @@ -790,7 +793,7 @@ def get_t_iqc_imstack(imgs, frame_edge, mask, pargs, nx=1500, plot_=False, save= for i in range(Nt): t1, t2 = frame_edge[i] # print (t1,t2) - avg_img=np.average(imgs[t1:t2,:,:],axis=0) + avg_img = np.average(imgs[t1:t2, :, :], axis=0) qp, iqs[i], q = get_circular_average(avg_img, mask, pargs, nx=nx, plot_=False) if plot_: diff --git a/pyCHX/chx_generic_functions.py b/pyCHX/chx_generic_functions.py index a3a792f..ea7f6cd 100644 --- a/pyCHX/chx_generic_functions.py +++ b/pyCHX/chx_generic_functions.py @@ -3494,9 +3494,10 @@ def load_dask_data(uid, detector, mask_path_full, reverse=False, rot90=False): returns detector_images(dask-array), image_md LW 04/26/2024 """ - import dask import json + import dask + hdr = db[uid] det = detector.split("_image")[0] # collect image metadata from loading single image @@ -3520,7 +3521,7 @@ def load_dask_data(uid, detector, mask_path_full, reverse=False, rot90=False): got_pixel_mask = False # load pixel mask from static location if got_pixel_mask: - #json_open = open(_mask_path_ + "pixel_masks/pixel_mask_compression_%s.json" % detector.split("_")[0]) + # json_open = open(_mask_path_ + "pixel_masks/pixel_mask_compression_%s.json" % detector.split("_")[0]) json_open = open(mask_path_full + "pixel_mask_compression_%s.json" % detector.split("_")[0]) mask_dict = json.load(json_open) img_md["pixel_mask"] = np.array(mask_dict["pixel_mask"]) diff --git a/pyCHX/chx_packages.py b/pyCHX/chx_packages.py index c12535d..f7817b7 100644 --- a/pyCHX/chx_packages.py +++ b/pyCHX/chx_packages.py @@ -32,18 +32,17 @@ use_pims(db) # use pims for importing eiger data, register_handler 'AD_EIGER2' and 'AD_EIGER' from pyCHX.chx_compress import ( - MultifileBNLCustom, + MultifileBNLCustom, combine_binary_files, - create_compress_header, compress_eigerdata, + create_compress_header, + get_eigerImage_per_file, + init_compress_eigerdata, para_compress_eigerdata, para_segment_compress_eigerdata, - segment_compress_eigerdata, read_compressed_eigerdata, - init_compress_eigerdata, - get_eigerImage_per_file, + segment_compress_eigerdata, ) - from pyCHX.chx_compress_analysis import ( Multifile, cal_each_ring_mean_intensityc,