pyfli.simulator.calibration.folder_calibration#
Calibrate every experiment in a folder, then combine them.
Functions
|
|
|
An existing calibration made with the same mask and IRF. |
|
|
|
Calibrate each data file in |
|
Raw decay files directly inside |
|
|
- find_data_files(folder, extensions=DATA_EXTENSIONS, pattern='*')[source]#
Raw decay files directly inside
folder(not in sub-folders), sorted by name.
- match_masks(data_files, mask_folder, extensions=MASK_EXTENSIONS, suffixes=MASK_SUFFIXES)[source]#
data file -> mask filefor every data file whose name matches a mask inmask_folder: the mask’s name (without extension) is the data file’s name plus one ofsuffixes(case-insensitive). With several candidates, the exact name wins. Data files without a mask, and masks without a data file, are logged as warnings.
- calibrate_folder(folder, detector_type, model_type, output_root=None, mask_folder=None, irf_path=None, extensions=DATA_EXTENSIONS, pattern='*', force=False, combine=True, weighting='equal', verify=True, n_verify_pixels=10000, **calibration_kwargs)[source]#
Calibrate each data file in
folderseparately, then combine the calibrations.mask_folder: folder of masks matched to the data files by name (see the module docstring); files without one get an automatic mask.irf_path: one IRF file for all experiments, or None to simulate each experiment’s IRF.calibration_kwargsgo toCalibrationInputsfor every file (e.g.bin_radius,irf_mode,target_coverage, budgets);mask_pathandreference_pathare per-experiment and not accepted here. A file whose calibration fails is reported infailedand left out of the combination.verifychecks, per experiment, that its pixels are covered by its own values and by the whole combined setup (verify_combined()), simulatingn_verify_pixelspixels per check.