Do fitting for signle data set, and save data accordingly. Fitting can be performed on either summed data or each channel data, or both. Parameters ---------- working_directory : str, required path folder file_names : str, required selected h5 file param
(
working_directory,
file_name,
*,
param_file_name,
fit_channel_sum=True,
fit_channel_each=False,
param_channel_list=None,
incident_energy=None,
ignore_datafile_metadata=False,
fln_quant_calib_data=None,
quant_distance_to_sample=0,
quant_ref_eline="",
method="nnls",
pixel_bin=0,
raise_bg=0,
comp_elastic_combine=False,
linear_bg=False,
use_snip=True,
bin_energy=0,
save_txt=False,
save_tiff=True,
scaler_name=None,
use_average=False,
interpolate_to_uniform_grid=False,
data_from="NSLS-II",
dask_client=None,
)
| 25 | |
| 26 | |
| 27 | def fit_pixel_data_and_save( |
| 28 | working_directory, |
| 29 | file_name, |
| 30 | *, |
| 31 | param_file_name, |
| 32 | fit_channel_sum=True, |
| 33 | fit_channel_each=False, |
| 34 | param_channel_list=None, |
| 35 | incident_energy=None, |
| 36 | ignore_datafile_metadata=False, |
| 37 | fln_quant_calib_data=None, |
| 38 | quant_distance_to_sample=0, |
| 39 | quant_ref_eline="", |
| 40 | method="nnls", |
| 41 | pixel_bin=0, |
| 42 | raise_bg=0, |
| 43 | comp_elastic_combine=False, |
| 44 | linear_bg=False, |
| 45 | use_snip=True, |
| 46 | bin_energy=0, |
| 47 | save_txt=False, |
| 48 | save_tiff=True, |
| 49 | scaler_name=None, |
| 50 | use_average=False, |
| 51 | interpolate_to_uniform_grid=False, |
| 52 | data_from="NSLS-II", |
| 53 | dask_client=None, |
| 54 | ): |
| 55 | """ |
| 56 | Do fitting for signle data set, and save data accordingly. Fitting can be performed on |
| 57 | either summed data or each channel data, or both. |
| 58 | |
| 59 | Parameters |
| 60 | ---------- |
| 61 | working_directory : str, required |
| 62 | path folder |
| 63 | file_names : str, required |
| 64 | selected h5 file |
| 65 | param_file_name : str, required |
| 66 | param file name for summed data fitting |
| 67 | fit_channel_sum : bool, optional |
| 68 | fit summed data or not |
| 69 | fit_channel_each : bool, optional |
| 70 | fit each channel data or not |
| 71 | param_channel_list : list, optional |
| 72 | list of param file names for each channel |
| 73 | incident_energy : float, optional |
| 74 | use this energy as incident energy instead of the one in param file, i.e., XANES |
| 75 | This value overrides the incident energy from metadata and from JSON parameter file |
| 76 | ignore_datafile_metadata : bool |
| 77 | tells whether to ignore metadata from the data file (if data file contains metadata). |
| 78 | At the moment, only incident energy (monochromator energy) is used by the processing routine. |
| 79 | If True, then the incident energy from the parameter JSON file is used; if False, then |
| 80 | the energy from metadata is used. If the function parameter ``incident_energy`` is |
| 81 | not None, then its value overrides the incident energy from metadata or JSON file. |
| 82 | fln_quant_calib_data : str or list(str) |
| 83 | file name or a list of file names that contain quantitative calibration data |
| 84 | quant_distance_to_sample : float |
no test coverage detected