lstmcpipe.scripts package#
Subpackages#
Submodules#
lstmcpipe.scripts.generate_nsb_levels_configs module#
- lstmcpipe.scripts.generate_nsb_levels_configs.build_argparser()#
Build the argument parser for the script.
- Returns:
The argument parser object.
- Return type:
argparse.ArgumentParser
- lstmcpipe.scripts.generate_nsb_levels_configs.dump_lstchain_nsb_config(nsb_tuning, outdir='.')#
Dump the lstchain configuration file with the given nsb_tuning_rate_GHz.
- Parameters:
nsb_tuning_rate_GHz (float) – The nsb tuning rate in GHz.
- lstmcpipe.scripts.generate_nsb_levels_configs.lstchain_config_name(nsb_tuning)#
Generate the name of the lstchain configuration file based on the given nsb_tuning_rate_GHz.
- Parameters:
nsb_tuning_rate_GHz (float) – The nsb tuning rate in GHz.
- Returns:
The name of the lstchain configuration file.
- Return type:
str
- lstmcpipe.scripts.generate_nsb_levels_configs.lstmcpipe_config_filename(nsb_tuning, outdir='.')#
Generate the name of the lstmcpipe configuration file based on the given nsb_tuning_rate_GHz.
- Parameters:
nsb_tuning_rate_GHz (float) – The nsb tuning rate in GHz.
- Returns:
The name of the lstmcpipe configuration file.
- Return type:
str
- lstmcpipe.scripts.generate_nsb_levels_configs.main()#
Dump the lstchain and lstmcpipe configuration files for the given nsb_tuning_rate_GHz.
- lstmcpipe.scripts.generate_nsb_levels_configs.prod_id(nsb_tuning, prefix=None)#
Generate the prod ID based on the given nsb_tuning_rate_GHz.
- Parameters:
nsb_tuning_rate_GHz (float) – The nsb tuning rate in GHz.
prefix (str) – The prefix of the prod ID. Example: “20240918_v0.10.12”
- Returns:
The prod ID.
- Return type:
str
lstmcpipe.scripts.generate_test_lapalma module#
Script to generate a mini production tree with symlinks to a few simtel files and the corresponding path config. This is used to test lstmcpipe on a small prod
- lstmcpipe.scripts.generate_test_lapalma.generate_test_allsky(working_dir, nfiles=5, path_to_config_file='.', decs=['dec_4822', 'dec_931'], overwrite=True)#
- lstmcpipe.scripts.generate_test_lapalma.generate_test_prod5trans80(working_dir, nfiles=5, path_to_config_file='.', overwrite=True)#
- lstmcpipe.scripts.generate_test_lapalma.generate_tree(base_dir, working_dir, nfiles)#
Walk the base dir looking for simtels files When a directory contains simtels files, it’s tree structure is duplicated into the working dir and nfiles are symlinked there
lstmcpipe.scripts.lstmcpipe_generate_config module#
- class lstmcpipe.scripts.lstmcpipe_generate_config.ParseKwargs(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None, deprecated=False)#
Bases:
ActionParse a string formatted as option1=foo into a dict {option1: foo}
- lstmcpipe.scripts.lstmcpipe_generate_config.build_argparser()#
- lstmcpipe.scripts.lstmcpipe_generate_config.is_allsky_config(config_class)#
Tell if a lstmcpipe.config.paths_config.PathConfig class describes an AllSky production.
The pointing dependent RF features (alt_tel, sin_az_tel) are only meaningful for AllSky productions, so this drives the lstchain config that is dumped along with the lstmcpipe one. It is based on the class inheritance and not on the class name, because not all the AllSky classes have AllSky in their name (see PathConfigAllTrainTestDL1b).
- Parameters:
config_class (class) – a class inheriting from lstmcpipe.config.paths_config.PathConfig
- Return type:
bool
- lstmcpipe.scripts.lstmcpipe_generate_config.list_config_classes()#
List the classes in lstmcpipe.config.paths_config that inherit from lstmcpipe.config.paths_config.PathConfig
- Returns:
[object]
- Return type:
list of classes
- lstmcpipe.scripts.lstmcpipe_generate_config.main()#
lstmcpipe.scripts.script_batch_filelist_cta module#
- lstmcpipe.scripts.script_batch_filelist_cta.main()#
lstmcpipe.scripts.script_batch_filelist_lst module#
- lstmcpipe.scripts.script_batch_filelist_lst.main()#
lstmcpipe.scripts.script_batch_filelist_lst_dl1ab module#
- lstmcpipe.scripts.script_batch_filelist_lst_dl1ab.main()#
lstmcpipe.scripts.script_batch_filelist_rta module#
- lstmcpipe.scripts.script_batch_filelist_rta.main()#
lstmcpipe.scripts.script_compare_irfs module#
- lstmcpipe.scripts.script_compare_irfs.main()#
- lstmcpipe.scripts.script_compare_irfs.plot_comparison(filelist, outfile=None, cta_north=False)#
Create a 2x2 plot comparing different sensitivity curves
- Parameters:
filelist (list) – File list with sensitivity curves to be compared.
outfile (str or Path or None) – path to the output file to be saved. if None, the figure is not saved
cta_north (Bool) – Flag to superpose/add (True) or not (False - Default) the CTA North. Imported from ctaplot
lstmcpipe.scripts.script_dl2_to_sensitivity module#
Procedure adapted from pyirf v0.4 example one (used with eventdisplay)
- lstmcpipe.scripts.script_dl2_to_sensitivity.determine_source_position(gamma_events)#
- lstmcpipe.scripts.script_dl2_to_sensitivity.main()#
lstmcpipe.scripts.script_lstmcpipe_validate_config module#
- lstmcpipe.scripts.script_lstmcpipe_validate_config.build_argparser()#
- lstmcpipe.scripts.script_lstmcpipe_validate_config.main()#
- lstmcpipe.scripts.script_lstmcpipe_validate_config.mc_r0_path()#
- lstmcpipe.scripts.script_lstmcpipe_validate_config.mc_requirements(config)#
- lstmcpipe.scripts.script_lstmcpipe_validate_config.run_lstchain_mc_r0_dl1(simtel_file, outdir, config_file)#
- lstmcpipe.scripts.script_lstmcpipe_validate_config.test_dl1ab(config_file)#
- lstmcpipe.scripts.script_lstmcpipe_validate_config.test_r0_dl1(config_file)#
- lstmcpipe.scripts.script_lstmcpipe_validate_config.validate_lstchain(config_file, stage)#
lstmcpipe.scripts.script_train_test_splitting module#
- lstmcpipe.scripts.script_train_test_splitting.main()#
- lstmcpipe.scripts.script_train_test_splitting.move_files(filelist, outdir)#
Move all files within filelist to outdir
- Parameters:
filelist (list) – list of files to be written
outdir (Path) – Output directory Path
- lstmcpipe.scripts.script_train_test_splitting.write_filelist(filelist, outdir, dataset='')#
Write all files within filelist in {dataset}.list file at outdir
- Parameters:
filelist (list) – list of files to be written
outdir (Path) – Output directory Path
dataset (str) – ‘training’ or ‘testing’ dataset list