Interfacer

Functions to talk to settings, calibratinos, GUIs, etc.

read_lion_eval_calfile()

rimseval.interfacer.read_lion_eval_calfile(crd: CRDFileProcessor, fname: Path = None) None

Read a LIONEval calibration file and set it to instance of crd.

LIONEval is the first, Python2.7 version of the data evaluation software. This routine takes an old calibration file if requested by the user and sets the mass calibration, integrals, and background correction information if present.

Parameters:
  • crd – Instance of the CRDFileProcessor, since we need to set properties

  • fname – Filename to mass calibration file. If None, try the same file name as for the CRD file, but with .cal as an extension.

Raises:

OSError – Calibration file does not exist.

load_cal_file()

rimseval.interfacer.load_cal_file(crd: CRDFileProcessor, fname: Path = None) None

Load a calibration file from a specific path / name.

Parameters:
  • crd – CRD Processor class to load into

  • fname – Filename and path. If None, try file with same name as CRD file but .json suffix.

Raises:
  • OSError – Calibration file does not exist.

  • OSError – JSON file cannot be decoded. JSON error message is returned too.

save_cal_file()

rimseval.interfacer.save_cal_file(crd: CRDFileProcessor, fname: Path = None) None

Save a calibration file to a specific path / name.

Note: The new calibration files are .json files and not .cal files.

Parameters:
  • crd – CRD class instance to read all the data from.

  • fname – Filename to save to to. If None, will save in folder / name of original crd file name, but with ‘.cal’ ending.