BaseParameter(parent) | Base parameter functionality for the cr database. |
CRDatabase([filename, datapath, ...]) | Functionality to let the VHECR pipeline communicate with an SQL database. |
Datafile([db, id]) | CR datafile information. |
DatafileParameter([parent]) | Container class for datafile parameters. |
Event([db, id]) | CR event information. |
EventParameter([parent]) | Container class for event parameters. |
Polarization([db, id]) | CR polarization information. |
PolarizationParameter([parent]) | Container class for polarization parameters. |
Settings([db]) | Global settings of the CR database. |
Station([db, id]) | CR station information. |
StationParameter([parent]) | Container class for station parameters. |
pickle_parameter(value) | Return the parameter as a database friendly pickle representation. |
unpickle_parameter(value) | Return the parameter value from parsing a database friendly representation of the parameter. |
unpickle_parameter_old(value) | Return the parameter value from parsing a database friendly representation of the parameter. |
Interface class to communicate with the Cosmic Ray Pipeline Database.
Author: | Martin van den Akker <m.vandenakker@astro.ru.nl> |
---|
Base parameter functionality for the cr database.
Return a list of valid parameter keys.
Read parameters from the database.
Summary of the parameter object.
Write updated parameters to the database.
Write parameters to the database.
Functionality to let the VHECR pipeline communicate with an SQL database.
Delete a datafile and its underlying information objects from the database.
Properties
Parameter | Description |
---|---|
id | id of the requested datafile entry in the database. |
Delete an event and its underlying information objects from the database.
Properties
Parameter | Description |
---|---|
id | id of the requested event entry in the database. |
Delete a polarization and its underlying information objects from the database.
Properties
Parameter | Description |
---|---|
id | id of the requested polarization entry in the database. |
Delete a station and its underlying information objects from the database.
Properties
Parameter | Description |
---|---|
id | id of the requested station entry in the database. |
Get the Datafile with a specific id.
Properties
Parameter | Description |
---|---|
id | id of the requested datafile. |
Return a list of datafileIDs satisfying the values of this functions arguments.
Properties
Parameter | Description |
---|---|
eventID | id of the event. |
filename | name of the datafile. |
status | status of the datafile. |
order | database fields that are used to sort the returned records. |
If no arguments are given all datafileIDs are selected. When multiple arguments are provided, all returned datafileIDs satisfy all argument values.
Get the event with a specific id.
Properties
Parameter | Description |
---|---|
id | id of the requested event entry in the database. |
Return a list of eventIDs satifying the values of this functions arguments.
Properties
Parameter | Description |
---|---|
timestamp | timestamp of the event is equal to this value. |
timestamp_start | timestamp of the event is larger than this value. |
timestamp_end | timestamp of the event is smaller than this value. |
status | status of the event. |
datafile_name | name of a datafile associated to an event. |
antennaset | type of the antennaset. |
order | database fields that are used to sort the returned records. |
The timestamp, timestamp_start and timestamp_end parameters are integers representing the unix-time of the timestamp. If timestamp is provided, than timestamp_start and timestamp_end are ignored. If no arguments are given all eventIDs are selected.
When multiple arguments are provided, all returned eventIDs satisfy all argument values.
Get the Polarization with a specific id.
Properties
Parameter | Description |
---|---|
id | id of the requested polarization. |
Return a list of polarizationIDs that satisfy the values of the provided arguments of this method.
Properties
Parameter | Description |
---|---|
eventID | id of the event. |
datafileID | id of the datafile. |
stationID | id of the station. |
antennaset | type of antennaset. |
direction | direction of the polarization. |
status | status of the polarization. |
order | database fields that are used to sort the returned records. |
If no arguments are given all polarizationIDs are selected. When multiple arguments are provided, the returned polarizationIDs satisfy all argument values that are provided.
Get the Station with a specific id.
Properties
Parameter | Description |
---|---|
id | id of the requested station. |
Return a list of stationIDs that satisfy the values of the provided arguments of this method.
Properties
Parameter | Description |
---|---|
eventID | id of the event. |
datafileID | id of the datafile. |
stationname | name of the station. |
status | status of the station. |
order | database fields that are used to sort the returned records. |
If no arguments are given all stationIDs are selected. When multiple arguments are provided, the returned stationIDs satisfy all argument values that are provided.
Check if the database is locked.
Summary of the CRDatabase object.
Unlock the database to be able to modify it. An unlocked database cannot be locked again!
CR datafile information.
This object contains the following information of a datafile:
Add a station object to this event.
This adds a station object to the list of stations of the current datafile object and updates the database.
Properties
Parameter | Description |
---|---|
station | station object to be added to the list of stations of this datafile object. |
Returns True if adding the station object went successfully, False otherwise.
Return the ID of the object as it is identified in the database.
Check if the datafile information is available in the database.
This method checks if the datafile information of this object, uniquely identified by the id and the filename, is in the database.
If the datafile information is in the database True is returned, False otherwise.
Read datafile information from the database.
Remove station object with id= stationID from this datafile.
This removes the station information object from this datafile object and updates the database. Note that the station info is not deleted from the database: only the link between the datafile and the station objects is deleted.
Properties
Parameter | Description |
---|---|
station | station that needs to be removed from this datafile. |
stationID | id of the station that needs to be removed from this datafile. |
If station is not provided, stationID will be used to remove it from the list of stations.
Returns True if removing the station object went successfully, False otherwise.
Summary of the Datafile object.
Properties
Parameter | Description |
---|---|
showParameters | Flag to enable/disable (default disabled) the display of all parameters associated with this information object. |
Update datafile information to the database in a buffered (=faster) way.
Properties
Parameter | Description |
---|---|
recursive | if True write all underlying datastructures (stations, etc.) |
parameters | if True write all parameters |
Write datafile information to the database.
Properties
Parameter | Description |
---|---|
recursive | if True write all underlying datastructures (stations, etc.) |
parameters | if True write all parameters |
Container class for datafile parameters.
Summary of the DatafileParameter object.
CR event information.
This object contains the following information of an event:
timestamp: the timestamp of the event in UTC stored as the number of seconds after 1 January 1970.
status: the status of the event.
datafiles: a list of datafile information objects (Datafile) associated with this event.
parameter: a dictionary of optional parameters with additional information for this specific event. The database supports the following parameter keywords:
crp_average_direction, lora_10_nsec, lora_azimuth, lora_core,sss lora_core_x, lora_core_y, lora_coree_x, lora_coree_y, lora_coreuncertainties, lora_datafile, lora_detectorid, lora_direction, lora_elevation, lora_energy, lora_energy_ev, lora_ldf, lora_moliere, lora_moliere_rad_m, lora_nsecs, lora_particle_density__m2, lora_posx, lora_posy, lora_posz, lora_time, lora_utc_time_secs, plotfiles.
Add a datafile object to this event.
This adds a datafile object to the current event object and updates the database.
Properties
Parameter | Description |
---|---|
datafile | datafile object to be linked to the current event. |
Returns True if adding the datafile object went successfully, False otherwise.
Get event alt_status.
Get event alt_statusmessage.
Get the antennaset.
Get event flagged
Get event flagged_reason
Return the ID of the object as it is identified in the database.
Check if event information is available in the database.
This method checks if the event information of this object, uniquely identified by the id and the timestamp, is already in the database.
If the event information is in the database True is returned, False otherwise.
Check if a polarization with a CR detection is found within this event.
Returns True if a polarization with a CR detection (polarization.status==’GOOD’) is found, False otherwise.
Read event information from the database.
Remove datafile object with id= datafileID from this event.
This removes the datafile information object from this event object and updates the database. Note that the datafile info is not deleted from the database: only the link between the event and the datafile objects is deleted.
Properties
Parameter | Description |
---|---|
datafile | datafile that needs to be removed from this event. |
datafileID | id of the datafile that needs to be removed from this event. |
If datafile is not provided, datafileID will be used to remove it from the list of datafiles.
Returns True if removing the datafile object went successfully, False otherwise.
Get event simulation_status.
Get event simulation_statusmessage.
Get event status
Get event statusmessage
Summary of the Event object.
Properties
Parameter | Description |
---|---|
showParameters | Flag to enable/disable (default disabled) the display of all parameters associated with this information object. |
Update event information to the database in a buffered (=faster) way.
Properties
Parameter | Description |
---|---|
recursive | if True write all underlying datastructures (datafiles, etc.) |
parameters | if True write all parameters |
Write event information to the database.
Properties
Parameter | Description |
---|---|
recursive | if True write all underlying datastructures (datafiles, etc.) |
parameters | if True write all parameters |
Container class for event parameters.
Summary of the EventParameter object.
CR polarization information.
This object contains the following information of a polarization:
antennaset: the name of the antennaset (e.g. LBA_OUTER, LBA_INNER, etc.).
direction: the direction of the polarization component.
status: the status of the polarization.
resultsfile: the name of the resultsfile, where all the results from the pipeline are stored.
parameter: a dictionary of optional parameters. This contains also resulting information from the pipeline. The database supports the following parameter keywords:
antenna_positions_array_xyz_m, antenna_positions_rf, antenna_positions_station_xyz_m, antenna_set, antennas, antennas_final_cable_delays, antennas_flagged_delays, antennas_residual_cable_delays, antennas_spectral_power, antennas_timeseries_npeaks, antennas_timeseries_rms, antennas_with_peaks, antennas_with_strong_pulses, bad_antennas, block, blocksize, crp_itrf_antenna_positions, crp_polarization_angle, crp_pulse_delays, crp_pulse_peak_amplitude, crp_rms, crp_stokes, data_length, data_length_ms, delay_quality_error, dipole_calibration_delay_applied, dirty_channels, filedir, filename, frequency_range, nantennas_with_strong_pulses, ndipoles, nof_dipole_datasets, npeaks_found, nyquist_zone, pipeline_version, plotfiles, polarization, pulse_core_lora, pulse_coreuncertainties_lora, pulse_direction, pulse_direction_delta_delays_final, pulse_direction_delta_delays_start, pulse_direction_lora, pulse_direction_planewave, pulse_end_sample, pulse_energy_lora, pulse_height, pulse_height_incoherent, pulse_height_rms, pulse_location, pulse_moliere_lora, pulse_normalized_height, pulse_start_sample, pulse_time_ms, pulses_absolute_arrivaltime, pulses_maxima_x, pulses_maxima_y, pulses_power_snr, pulses_refant, pulses_sigma, pulses_strength, pulses_timelags_ns, sample_frequency, sample_interval, sample_number, station_antennas_homogeneity_factor, station_spectral_power, station_timeseries_npeaks, station_timeseries_rms, status, svn_revision, telescope, time, timeseries_power_mean, timeseries_power_rms, timeseries_raw_rms, timeseries_rms.
Get polarization alt_status
Get polarization alt_statusmessage
Get polarization flagged
Get polarization flagged_reason
Return the ID of the object as it is identified in the database.
Check if the polarization information is available in the database.
This method checks if the polarization information of this object, uniquely identified by id, is in the database.
If the polarization information is in the database True is returned, False otherwise.
Read polarization information from the database.
Get polarization status
Get polarization statusmessage
Summary of the Polarization object.
Properties
Parameter | Description |
---|---|
showParameters | Flag to enable/disable (default disabled) the display of all parameters associated with this information object. |
Update polarization information to the database in a buffered (=faster) way.
Properties
Parameter | Description |
---|---|
parameters | if True write all parameters |
Write polarization information to the database.
Properties
Parameter | Description |
---|---|
recursive | if True write all underlying data structures. |
parameters | if True write all parameters. |
Container class for polarization parameters.
Summary of the PolarizationParameter object.
Global settings of the CR database.
This container class contains the following settings from the database:
Get the value of the datapath variable as set in the database.
Get the value of the db_version variable as set in the database.
Get the value of the lorapath variable as set in the database.
Get the value of the resultspath variable as set in the database.
Summary of the Settings object.
CR station information.
This object contains the following information of a station:
stationname: the name of the station, e.g. CS001, RS203.
status: the status of the station.
polarizations: a list of polarization information objects (Polarization) stored in this station.
parameter: a dictionary of optional parameters with additional information for this specific station. The database supports the following parameter keyword:
crp_pulse_direction, plotfiles.
Add a polarization object to this station.
This adds a polarization object to the current station object and updates the database.
Properties
Parameter | Description |
---|---|
polarization | polarization object to be linked to the current station. |
Returns True if adding the polarization object went successfully, False otherwise.
Get station alt_status
Get station alt_statusmessage
Get station flagged
Get station flagged_reason
Return the ID of the object as it is identified in the database.
Check if the station information is available in the database.
This method checks if the station information of this object, uniquely identified by id, is in the database.
If the station information is in the database True is returned, False otherwise.
Read station information from the database.
Remove polarization object with id= polarizationID from this station.
This removes the polarization information object from this station object and updates the database. Note that the polarization info is not deleted from the database: only the link between the station and the polarization objects is deleted.
Properties
Parameter | Description |
---|---|
polarization | polarization that needs to be removed from this station. |
polarizationID | id of the polarization that needs to be removed from this station. |
key | key name of the polarization, this is equal to the polarization direction. |
Only one of the parameters is used to identify the polarization that needs to be removed. The order of evaluating the parameters to identify the polarization is polarization, polarizationID, key
Returns True if removing the polarization object went successfully, False otherwise.
Get station status
Get station statuscategory
Get station statusmessage
Summary of the Station object.
Properties
Parameter | Description |
---|---|
showParameters | Flag to enable/disable (default disabled) the display of all parameters associated with this information object. |
Update station information to the database in a buffered (=faster) way.
Properties
Parameter | Description |
---|---|
recursive | if True write all underlying datastructures (polarizations, etc.) |
parameters | if True write all parameters |
Write station information to the database.
Properties
Parameter | Description |
---|---|
recursive | if True write all underlying datastructures (polarizations) |
parameters | if True write all parameters |
Container class for station parameters.
Summary of the StationParameter object.
Return the parameter as a database friendly pickle representation.
Properties
Parameter | Description |
---|---|
value | Python representation of the value of the parameter. |
Return the parameter value from parsing a database friendly representation of the parameter.
Properties
Parameter | Description |
---|---|
value | Database representation of the parameter value. |
Return the parameter value from parsing a database friendly representation of the parameter.
Properties
Parameter | Description |
---|---|
value | Database representation of the parameter value. |