rail.plotting.control module

Functions to control plot making in the context of a RailProject

rail.plotting.control.clear()[source]

Clean all the factories

Return type:

None

rail.plotting.control.extract_datasets(config_file, dataset_holder_class, output_yaml, **kwargs)[source]

Extract datasets into a yaml file

Return type:

None

Parameters:
  • config_file (str) – Yaml project configuration file

  • dataset_holder_class (str) – Class used to extract Datasets

  • output_yaml (str) – Path to output file

  • **kwargs – See notes for details

Notes

dataset_list_name: str

Name for the resulting DatasetList

selections: list[str]

Selections to use

flavors: list[str]

Flavors to use

split_by_flavor: bool

Split dataset lists by flavor

rail.plotting.control.load_yaml(yaml_file)[source]

Read a yaml file and load the factory accordingly

Return type:

None

Parameters:

yaml_file (str) – File to read

Notes

See class description for yaml file syntax

rail.plotting.control.print_classes()[source]

Print the loaded classes

Return type:

None

rail.plotting.control.print_contents()[source]

Print the contents of the factories

Return type:

None

rail.plotting.control.run(yaml_file, include_groups=None, exclude_groups=None, **kwargs)[source]

Read a yaml file an make the corresponding plots

Return type:

dict[str, RailPlotDict]

Parameters:
  • yaml_file (str) – Top level yaml file with definitinos

  • include_groups (list[str]) – PlotGroups to explicitly include Use None for all plots

  • exclude_groups (list[str]) – PlotGroups to explicity exclude Use None to not exclude anything

  • Keywords

  • --------

  • find_only (bool=False) – If true, only look for existing plots

  • save_plots (bool=True) – Save plots to disk

  • purge_plots (bool=True) – Remove plots from memory after saving

  • outdir (str | None) – If set, prepend this to the groups output dir

  • make_html (bool) – If set, make an html page to browse plots

  • kwargs (Any)

Returns:

Newly created plots. If purge=True this will be empty

Return type:

dict[str, RailPlotDict]

rail.plotting.control.write_yaml(yaml_file)[source]

Write the current contents for the factories to a yaml file

Return type:

None

Parameters:

yaml_file (str) – File to write

Notes

See class description for yaml file syntax