nectarchain.tools.write_camera_calibration.CalibrationHDF5Writer#
- class CalibrationHDF5Writer(*args: t.Any, **kwargs: t.Any)[source]#
Bases:
ToolTool that generates a HDF5 file with camera calibration coefficients. This is just an example on how the monitoring containers can be filled using the calibration Components in calib/camera. This example is based on an input file with interleaved pedestal and flat-field events.
For getting help run: python calc_camera_calibration.py –help
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 Toolexitfinishflatten_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.
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.
setupsetup_instanceCalibration coefficient calculator
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
aliasesAn instance of a Python dict.
argvAn instance of a Python list.
classesAn instance of a Python list.
cli_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.
descriptionexamplesA trait for unicode strings.
extra_argsAn instance of a Python list.
flagsflatfield_productAn enum whose value must be in a given sequence.
keyvalue_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
logging.Formatterdatefmtparameterlog_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.
Temporary cut on charge to eliminate events without led signal
nameoption_descriptionA trait for unicode strings.
Name of the output file
overwriteA boolean (True, False) trait.
parentA trait whose value must be an instance of a specified class.
pedestal_productAn enum whose value must be in a given sequence.
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
- minimum_charge#
Temporary cut on charge to eliminate events without led signal
- output_file#
Name of the output file