Utils — listmode 0.5.0 documentation

# Utils

listmode.utils.delete_channel_data(data_path, base_name, cfg)

  Used to delete channel files after parsing. :param data_path: :param base_name: :param cfg: :return:

listmode.utils.find_data_files(data_path, base_name, cfg, mode)

  Generate filenames (paths) of all the data produced by config. You can select either ‘event’ or ‘channel’ type names.

  Parameters

    - data_path –

    - base_name –

    - cfg –

    - mode –

  Returns

    timing, energy, time and extras filenames as lists. For event data the first (and only) item in the list is the relevant filename. For channel data there is a single name for every channel. Extra names are given as a list of names, one per extra (for each channel as in other data).

listmode.utils.load_plot_config(config, plot_name)

  Loads a plot configuration from a json file.

  Parameters

    - config – Config data that has the config.path in it

    - plot_name_list – plot config name without the _plotcfg.json postfix or a list of names

  Returns

    a plot config dictionary

listmode.utils.load_strip_cal(config)

  Load strip calibration files if they exist.

listmode.utils.load_style_sheet(config, style_name_list)

  Loads a matplotlib style sheet written as a json file.

  Parameters

    - config – Detector configuration object

    - style_name_list – style path or a list of paths

  Returns

    list of style dictionaries