nectarchain.makers.core.BaseNectarCAMCalibrationTool#
- class BaseNectarCAMCalibrationTool(**kwargs: Any)[source]#
Bases:
ToolMother class for all the makers, the role of makers is to do computation on the data.
Methods
add_componentconstructs and adds a component to the list of registered components, so that later we can ask for the current configuration of all instances, e.g. in`get_full_config()`.
add_traitsDynamically add trait attributes to the HasTraits instance.
check_outputTest if output files exist and if they do, throw an error unless
self.overwriteis set to True.class_config_rst_docGenerate rST documentation for this class' config options.
class_config_sectionGet the config section for this class.
class_get_helpGet the help string for this class in ReST format.
class_get_trait_helpGet the helptext string for a single trait.
class_own_trait_eventsGet a dict of all event handlers defined on this class, not a parent.
class_own_traitsGet a dict of all the traitlets defined on this class, not a parent.
class_print_helpGet the help string for a single trait and print it.
class_trait_namesGet a list of all the names of this class' traits.
class_traitsGet a
dictof all the traits of this class.clear_instanceunset _instance for this class and singleton parents.
close_handlersdocument_config_optionsGenerate rST format documentation for the config options this application
emit_alias_helpYield the lines for alias part of the help.
emit_descriptionYield lines with the application description.
emit_examplesYield lines with the usage and examples.
emit_flag_helpYield the lines for the flag part of the help.
emit_helpYield the help-lines for each Configurable class in self.classes.
emit_help_epilogueYield the very bottom lines of the help message.
emit_options_helpYield the lines for the options part of the help.
emit_subcommands_helpYield the lines for the subcommand part of the help.
enter_contextAdd a new context manager to the
ExitStackof this ToolexitfinishFinish up.
flatten_flagsFlatten flags and aliases for loaders, so cl-args override as expected.
generate_config_filegenerate default config file from Configurables
get_current_configreturn the current configuration as a dict (e.g. the values of all traits, even if they were not set during configuration).
get_default_logging_configReturn the base logging configuration.
has_traitReturns True if the object has a trait with the specified name.
hold_trait_notificationsContext manager for bundling trait change notifications and cross validation.
initializeHandle config and any other low-level setup.
initialize_subcommandInitialize a subcommand with argv.
initializedHas an instance been created?
instanceReturns a global instance of this class.
launch_instanceLaunch a global instance of this Application
load_config_environLoad config files by environment.
load_config_fileLoad a configuration file in one of the supported formats, and merge it with the current config if it exists.
Static method to load from $NECTARCAMDATA directory data for specified run with max_events.
notify_changeNotify observers of a change event
observeSetup a handler to be called when a trait changes.
on_trait_changeDEPRECATED: Setup a handler to be called when a trait changes.
parse_command_lineParse the command line arguments.
print_alias_helpPrint the alias parts of the help.
print_descriptionPrint the application description.
print_examplesPrint usage and examples (see
emit_examples()).print_flag_helpPrint the flag part of the help.
print_helpPrint the help for each Configurable class in self.classes.
print_optionsPrint the options part of the help.
print_subcommandsPrint the subcommand part of the help.
print_versionPrint the version string.
runRun the tool.
section_namesreturn section names as a list
set_traitForcibly sets trait attribute, including read-only attributes.
setupSet up the tool.
setup_instancestartMain function of the tool.
start_show_configstart function used when show_config is True
trait_defaultsReturn a trait's default value or a dictionary of them
trait_eventsGet a
dictof all the event handlers of this class.trait_has_valueReturns True if the specified trait has a value.
trait_metadataGet metadata values for trait by key.
trait_namesGet a list of all the names of this class' traits.
trait_valuesA
dictof trait names and their values.traitsGet a
dictof all the traits of this class.unobserveRemove a trait change handler.
unobserve_allRemove trait change handlers of any type for the specified name.
update_configUpdate config and load the new values
update_logging_configUpdate the configuration of loggers.
write_provenanceAttributes
aliasesargvAn instance of a Python list.
classescli_configThe subset of our configuration that came from the command-line
configA trait whose value must be an instance of a specified class.
config_filesList of configuration files with parameters to load in addition to command-line parameters.
cross_validation_lockA contextmanager for running a block with our cross validation lock set to True.
descriptionA trait for unicode strings.
examplesA trait for unicode strings.
extra_argsAn instance of a Python list.
flagskeyvalue_descriptionA trait for unicode strings.
loaded_config_filesCurrently loaded configuration files
logLogger or LoggerAdapter instance
log_configAn instance of a Python dict.
log_datefmtThe date format used by logging formatters for %(asctime)s
log_fileFilename for the log
log_file_levelLogging Level for File Logging
log_formatThe Logging format template
log_levelSet the log level by value or name.
logging_configConfigure additional log handlers.
nameoption_descriptionA trait for unicode strings.
overwriteA boolean (True, False) trait.
parentA trait whose value must be an instance of a specified class.
show progress bar during processing
provenance_logA path Trait for input/output files.
quietA boolean (True, False) trait.
raise_config_file_errorsA boolean (True, False) trait.
show_configInstead of starting the Application, dump configuration to stdout
show_config_jsonInstead of starting the Application, dump configuration to stdout (as JSON)
subappA trait whose value must be an instance of a specified class.
subcommand_descriptionA trait for unicode strings.
subcommandsAn instance of a Python dict.
versionA trait for unicode strings.
version_stringa formatted version string with version, release, and git hash
- static load_run(run_number, max_events=None, run_file=None)[source]#
Static method to load from $NECTARCAMDATA directory data for specified run with max_events.
- Return type:
LightNectarCAMEventSource- Parameters:
- run_numberint
run_id
- maxeventsint, optional
max of events to be loaded. Defaults to -1, to load everything.
- run_fileoptional
if provided, will load this run file
- Returns:
- List[ctapipe_io_nectarcam.LightNectarCAMEventSource]
List of EventSource for each run files.
- progress_bar#
show progress bar during processing