I/O helpers (ctapointing.io)
The ctapointing.io module provides to read data products from HDF5 files or database, in particular
SpotListSource: class to read ctapointing.imagesolver.SpotList objects from file
ImageSolutionSource: class to read ctapointing.imagesolver.ImageSolution objects from file
API
ctapointing.io Package
- class ctapointing.io.ImageSolutionSource(**kwargs: Any)
Class to read ImageSolution objects from HDF5 input file.
- __init__(input_url=None, config=None, parent=None, **kwargs)
Class to read ImageSolution objects from HDF5 input file. For now a very much simplified version of the ctapipe.io.HDF5EventSource class.
- Parameters:
input_url (str) – Path of the file to load
config (traitlets.loader.Config) – Configuration specified by config file or cmdline arguments. Used to set traitlet values. Set to None if no configuration to pass.
parent – Parent from which the config is used. Mutually exclusive with config
kwargs
- input_url
Path to the input file containing image solutions.
- max_events
Maximum number of events that will be read from the file
- class ctapointing.io.SpotListSource(**kwargs: Any)
Class to read SpotList objects from HDF5 input file.
- __init__(input_url=None, config=None, parent=None, **kwargs)
Class to read SpotList objects from HDF5 input file. For now a very much simplified version of the ctapipe.io.HDF5EventSource class.
- Parameters:
input_url (str) – Path of the file to load
config (traitlets.loader.Config) – Configuration specified by config file or cmdline arguments. Used to set traitlet values. Set to None if no configuration to pass.
parent – Parent from which the config is used. Mutually exclusive with config
kwargs
- input_url
Path to the input file containing spotlists.
- max_events
Maximum number of events that will be read from the file
- ctapointing.io.from_name(name, container, **kwargs)
Read data from either HDF5 file or database into Container.
- Parameters:
name (str) – when reading from database (see below), name refers to the UUID of the dataset when reading from file, name refers to the file name
container (ctapipe.core.Container) – container class into which the data is read
**kwargs –
- database_name: str or None
if specified, read from database with name database_name. Must be specified for reading from database. If set to None, file reading mode is assumed
- collection_name: str or None
if specified, read from database collection collection_name. Must be specified for database reading
- table_name: str or None:
the table within the HDF5 file from which data is read. Must be specified for file reading
- Returns:
Container – object of type container
- Return type:
Container
Functions
|
Read data from either HDF5 file or database into Container. |
Classes
|
Class to read SpotList objects from HDF5 input file. |
|
Class to read ImageSolution objects from HDF5 input file. |
Class Inheritance Diagram
