Input/Output (io)
Introduction
lstchain.io contains functions and containers to read and write LST data. Also important for the data reading is the ctapipe_io_lst library, that contains the event source to read LST data.
Reference/API
lstchain.io.config Module
Functions
|
Return cleaning parameters from configuration dict. |
Load the standard config from the file 'data/lstchain_standard_config.json' |
|
Load the config for source-dependent analysis from the file 'data/lstchain_src_dep_config.json' |
|
|
Read a configuration filename for the lstchain. |
|
Return a copy of the base_config with new configuration from new_config |
lstchain.io.data_management Module
Functions
|
Check if a directory exists or contains data before to makedir. |
|
Check if the path to some data exists. |
|
Check all the job logs named *.e for Errors Query the user to continue or not in case of errors. |
|
Return list of files in data_path |
|
Ask a question and if the answer is no, exit the program. |
|
Ask a yes/no question via raw_input() and return their answer. |
lstchain.io.event_selection Module
Classes
|
Filter values used for event filters and list of finite parameters are taken as inputs and filter_events() is used on a table of events called in with the Component. |
|
Selection cuts for DL2 to DL3 conversion |
|
Collects information on generating energy and angular bins for generating IRFs as per pyIRF requirements. |
lstchain.io.io Module
Functions
|
Add a column to an pytable Table |
|
Add configuration parameters to a container in container.meta.config |
|
Add global metadata to a container in container.meta |
|
|
|
Automatic merge of HDF5 files. |
|
Check that the information in two mcheaders are physically consistent. |
|
Check that to MetaData class are compatible with each other |
|
Check MC type ('point_like', 'diffuse', 'ring_wobble') based on the viewcone setting Parameters ---------- filename:path (DL1/DL2 hdf file) Returns ------- string |
Check that two ThrownEventsHistogram class are compatible with each other |
|
|
Copy dataset (Table and Array) nodes from |
|
Get current run NSB from configuration in simtel file. |
|
Calculate observation time |
|
Return a list of all dataset keys in a HDF5 file |
|
Calculate the mean field of view offset (the "wobble-distance") from the simulation info. |
|
get assumed positions of source-dependent multi index columns |
|
get srcdep parameter data frame |
|
Stack tables at node from each file in files |
Get global metadata container |
|
|
Merge the run sequence in a single dataset and extract correct observation time based on first and last event timestamp in each file. |
|
Check that a list of hdf5 files are compatible for merging regarding: |
|
Read data DL2 files from lstchain and return QTable format, along with a dict of target parameters for IRF interpolation |
|
Read specified parameters from a file with DL2 data |
|
Read MC DL2 files from lstchain and convert into pyirf internal format - astropy.table.QTable. |
|
Read metadata from a HDF5 file |
|
Read the simtel energy histogram from a HDF5 file. |
|
Read simu info from an hdf5 file |
|
Read simu info from a merged hdf5 file. |
|
Copy a node recursively from a src file to a dir file without copying the tables/arrays in the node |
|
Remove duplicated events after gammaness/alpha cut when generating DL3 files. |
|
In theory similar to auto_merge_h5files but slower. |
|
|
|
Write a pandas dataframe to a HDF5 file using pytables formatting. |
|
Write DL2 dataframe to a HDF5 file |
|
Write the mcheader from an event container to a HDF5 file |
|
Write metadata to a HDF5 file |
|
Write the energy histogram from a simtel source to a HDF5 file |
|
Write subarray tables info to a HDF5 file |
|
Get a resource data path in lstchain package |
lstchain.io.lstcontainers Module
Functions to handle custom containers for the mono reconstruction of LST1
Classes
|
Container with the calibration coefficients |
|
TODO: maybe fields could be inherited from ctapipe containers definition |
|
Parameters obtained with the likelihood reconstruction method |
|
Disp vector container |
|
attach the tel_id |
|
|
|
|
Class to recognize event type from trigger bits bit 0: Mono bit 1: stereo bit 2: Calibration bit 3: Single Phe bit 4: Softrig(from the UCTS) bit 5: Pedestal bit 6: slow control bit 7: busy |
|
|
Some metadata |
|
2D histogram from SimTel files |