diff --git a/VERSION b/VERSION index 1e126641c538487d3cf47d9296848e2337e4140d..04547808a83a9caab4f4cfdc5e410fe8e7115b38 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.2-alpha.2 \ No newline at end of file +1.0.3-alpha.3 diff --git a/src/toolbox_scs/detectors/__init__.py b/src/toolbox_scs/detectors/__init__.py index 50e9a129e095fa050633ee22541e93a961b1fa08..793b3167fa62eed82bc3e9933a37f433682fd493 100644 --- a/src/toolbox_scs/detectors/__init__.py +++ b/src/toolbox_scs/detectors/__init__.py @@ -6,7 +6,7 @@ from .dssc_data import ( save_to_file, load_from_file) from .dssc_misc import ( load_dssc_info, load_geom, quickmask_DSSC_ASIC, calc_xgm_frame_indices, - create_xgm_pulsemask, get_xgm_binned, get_xgm_formatted) + create_xgm_pulsemask, get_xgm_binned, get_xgm_formatted, load_mask) from .dssc_processing import ( split_frames, bin_data_multipr, sum_trains_multipr, sum_trains, bin_data) diff --git a/src/toolbox_scs/detectors/dssc.py b/src/toolbox_scs/detectors/dssc.py index 6d5d5c49fd3c1423a080c397155952768705e826..19075c325504bc87d556528c193478afdb862a92 100644 --- a/src/toolbox_scs/detectors/dssc.py +++ b/src/toolbox_scs/detectors/dssc.py @@ -9,8 +9,8 @@ comments: - contributions should comply with pep8 code structure guidelines. - Plot routines don't fit into objects since they are rather fluent. - They have been outsourced to dssc_plot.py. Alternatively they could - be accessed as tbdet member functions. + They have been outsourced to dssc_plot.py. They can now be accessed + as tbdet member functions. """ import os import logging @@ -27,7 +27,7 @@ from .dssc_misc import (load_dssc_info, calc_xgm_frame_indices, from .dssc_processing import (bin_data, bin_data_multipr, sum_trains, sum_trains_multipr) -__all__ = ["DSSCBinner", "DSSCImage"] +__all__ = ["DSSCBinner", "DSSCImager"] log = logging.getLogger(__name__) @@ -199,17 +199,16 @@ class DSSCBinner: return data -class DSSCImage: - def __init__(self, - distance=1, mask_file='' - ): +class DSSCImager: + def __init__(self): """ - (doc to be done) + (Placeholder for possible future class handling geometrical properties. + Its main method could be to call the azimuthal integrator). """ #self.distance = distance - #self.pxpitchh = 236 # horizontal pitch in microns - #self.pxpitchv = 204 # vertical pitch in microns + #self.pxpitchh = 236 + #self.pxpitchv = 204 #self.aspect = self.pxpitchv/self.pxpitchh - #self.geom = self.load_geom() - #self.imagemask = self.load_mask(mask_file) + #self.geom = None + #self.mask = None pass diff --git a/src/toolbox_scs/detectors/dssc_misc.py b/src/toolbox_scs/detectors/dssc_misc.py index cd7899438c7e1b7498fe22e40d4454c06e91b302..f8caeb064307ad5b3128238b65b88f27345a6cc4 100644 --- a/src/toolbox_scs/detectors/dssc_misc.py +++ b/src/toolbox_scs/detectors/dssc_misc.py @@ -182,35 +182,3 @@ def load_mask(fname): mask = dssc_mask.astype(float)[..., 0] // 255 mask[dssc_mask==0] = np.nan return mask - - -def substract_dark(self, data, dark, keys=['pumped', 'pumped']): - """ - Substract dark image from binned processed images - - Parameters - ---------- - data: xarray.DataArray - processed data - dark: xarray.DataArray - processed dark run corresponding to data - key: str - name of the dataset to be accessed - """ - return (data[keys[0]] - dark[keys[1]].values) - - -def normalize_binned_data(self, data, norm, keys=['pumped', 'pumped']): - """ - Divide processed images - - Parameters - ---------- - data: xarray.DataArray - processed data - dark: xarray.DataArray - processed dark run corresponding to data - key: str - name of the dataset to be accessed - """ - return data[keys[0]] / norm[keys[1]]