add_cal_entry¶
-
ndmapper.calibrations.
add_cal_entry
(filename, cal_type, matches, cal_dict)[source] [edit on github]¶ Populate each component of the calibration dictionary with the specified list of calibration files matching a given filename.
At this level, any existing association between the specified filename and the same type of calibration will be overwritten, but any existing lists of available calibration files and the corresponding checksums will be left unchanged. Normally, this function only gets called (eg. via
services.look_up_cals()
) for calibration entries that don’t already exist in the dictionary, to preserve existing associations.Parameters: filename :
str
Name of the file for which the applicable calibration files are to be recorded.
cal_type :
str
Type of calibration looked up (matching a name in the dependencies dictionary applicable to the instrument mode).
matches :
list
of (str
,str
orNone
)List of (filename, checksum) pairs from a prior calibration look-up, to be included in the calibration dictionary.
cal_dict :
dict
The calibration dictionary to populate, already initialized in the required format by
init_cal_dict()
.