Perform fitting on a batch of data files. The results are saved as new datasets in the respective data files and may be viewed using PyXRF. Fitting can be performed on the sum of all detector channels, data from selected detector channels, or both. Internally, the function is callin
(
start_id=None,
end_id=None,
*,
param_file_name,
data_files=None,
wd=None,
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="",
use_snip=True,
save_txt=False,
save_tiff=True,
scaler_name=None,
use_average=False,
interpolate_to_uniform_grid=False,
dask_client=None,
)
| 401 | |
| 402 | |
| 403 | def pyxrf_batch( |
| 404 | start_id=None, |
| 405 | end_id=None, |
| 406 | *, |
| 407 | param_file_name, |
| 408 | data_files=None, |
| 409 | wd=None, |
| 410 | fit_channel_sum=True, |
| 411 | fit_channel_each=False, |
| 412 | param_channel_list=None, |
| 413 | incident_energy=None, |
| 414 | ignore_datafile_metadata=False, |
| 415 | fln_quant_calib_data=None, |
| 416 | quant_distance_to_sample=0, |
| 417 | quant_ref_eline="", |
| 418 | use_snip=True, |
| 419 | save_txt=False, |
| 420 | save_tiff=True, |
| 421 | scaler_name=None, |
| 422 | use_average=False, |
| 423 | interpolate_to_uniform_grid=False, |
| 424 | dask_client=None, |
| 425 | ): |
| 426 | """ |
| 427 | Perform fitting on a batch of data files. The results are saved as new datasets |
| 428 | in the respective data files and may be viewed using PyXRF. Fitting can be performed on |
| 429 | the sum of all detector channels, data from selected detector channels, or both. |
| 430 | Internally, the function is calling the lower level function ``fit_pixel_data_and_save``. |
| 431 | While it is possible to write processing scripts that call ``fit_pixel_data_and_save`` directly, |
| 432 | but it is recommended, that ``pyxrf_batch`` is used instead. |
| 433 | |
| 434 | Parameters |
| 435 | ---------- |
| 436 | start_id : int, optional |
| 437 | starting run id |
| 438 | end_id : int, optional |
| 439 | ending run id |
| 440 | param_file_name : str, required |
| 441 | File name of the processing parameter file (JSON) used for data fitting. |
| 442 | If the parameter file name in the list does not contain full |
| 443 | path, then it is extended with the path in ``wd``. |
| 444 | data_files : str, tuple (str,) or list [str], optional |
| 445 | data file names: may be specified as a string for a single file, |
| 446 | or iterable container (list, tuple) of strings for multiple files |
| 447 | If ``data_files`` is specified (not None), then ``start_id`` and ``end_id`` |
| 448 | parameters are ignored. If a file name in the list does not contain full |
| 449 | path, then it is extended with the path in ``wd``. |
| 450 | wd : str, or optional |
| 451 | path folder, default is the current folder |
| 452 | fit_channel_sum : bool, optional |
| 453 | fit summed data or not |
| 454 | fit_channel_each : bool, optional |
| 455 | fit each channel data or not |
| 456 | param_channel_list : list, optional |
| 457 | list of param file names for each channel |
| 458 | incident_energy : float, optional |
| 459 | use this energy as incident energy instead of the one in param file, i.e., XANES |
| 460 | This value overrides the incident energy from metadata and from JSON parameter file. |
no test coverage detected