Skip to content

pycorsikaio to astropy Qtable #14

@HealthyPear

Description

@HealthyPear

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions