NuRadioReco.modules.io.coreas.readCoREAS module
This module can be used to read in all simulated “observers” from a CoREAS simulation and return within a single event/station/sim_station object. This is useful for air shower array experiments like Auger, LOFAR or SKA. However, it is important to stress that this module will return a single station object. If you want to organize the simulated electric fields (observers) within multiple stations you have to do it yourself.
- class NuRadioReco.modules.io.coreas.readCoREAS.readCoREAS[source]
Bases:
objectMethods
begin(input_files[, logger_level, ...])begin method
get_event([declination])Reads the next event
run([declination])Reads in CoREAS file(s) and returns one event containing all simulated observer positions as stations.
end
- begin(input_files, logger_level=0, set_ascending_run_and_event_number=False)[source]
begin method
initialize readCoREAS module
- Parameters:
- input_files: input files
list of coreas hdf5 files
- det: genericDetector object
If a genericDetector is passed, the stations from the CoREAS file will be added to it and the run method returns both the event and the detector
- logger_level: string or logging variable
Set verbosity level for logger (default: logging.NOTSET)
- set_ascending_run_and_event_number: bool
If set to True the run number and event id is set to self.__ascending_run_and_event_number instead of beeing taken from the simulation file. The value is increases monoton. This can be used to avoid ambiguities values (default: False)
- run(declination=None)[source]
Reads in CoREAS file(s) and returns one event containing all simulated observer positions as stations.
- Parameters:
- declination: float, default=None
The declination of the magnetic field to use when reading in the CoREAS file
- Yields:
- evt:
NuRadioReco.framework.event.Event The event containing the simulated observer as sim. stations.
- evt: