I have developed an initial version of a CorsikaNPOReader class which uses pycorsikaio to load the content of 1 or multiple files in astropy QTables.
This class behaves similarly to ctapipe.io.TableLoader, meaning that it can load each file block separately if enabled and joins each table using all common 1D fields. A couple functions (not methods at the moment) have been indeed taken from TableLoader.
- Input can be a single path or a regex string
- Units are defined using
u.StructuredUnit (from v7.7 only)
run_number and event_number when available are always placed at the beginning of the table (some datablocks lack at least one of them so I append those fields where necessary to make sure that any combination of load options will be guaranteed to export this information).
- the final table required columns can be defined at class initialization.
If this can be of interest for this project I could preemptively open a pull request for early feedback.
The code is definitely not final but it's working and it could be tested with a very small corsika file with say 10 showers.
I have developed an initial version of a
CorsikaNPOReaderclass which uses pycorsikaio to load the content of 1 or multiple files in astropy QTables.This class behaves similarly to
ctapipe.io.TableLoader, meaning that it can load each file block separately if enabled and joins each table using all common 1D fields. A couple functions (not methods at the moment) have been indeed taken fromTableLoader.u.StructuredUnit(from v7.7 only)run_numberandevent_numberwhen available are always placed at the beginning of the table (some datablocks lack at least one of them so I append those fields where necessary to make sure that any combination of load options will be guaranteed to export this information).If this can be of interest for this project I could preemptively open a pull request for early feedback.
The code is definitely not final but it's working and it could be tested with a very small corsika file with say 10 showers.