-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding a script for the standard data processing of RNO-G data #790
base: develop
Are you sure you want to change the base?
Conversation
…mple script for the simulation of RNOG is being added to NuRadioMC with PR #788
added to eventParameters
…nto add_rnog_data_processing_script
…unction has_glitch to event
… config. Add glitch module to script
Added functionality to calculate the RPR (root power ratio)
Added error message if channel as no parameter SNR or RPR and made sure function utilized channels to include. Also modified names of functions to calculate SNR and RPR, to be more clear
@sjoerd-bouma, I understand your concern! Indeed I think we should make sure that we are not duplicating data in the various data-structure "levels". What we have started implementing are getter functions to simplify the access to certain data. Smart getter functions like One problem I see with the current functions is that they access channel information for an event while "by-passing" the station level. One solution could be to implement those functions on the station-level and implement wrapper for those on the event level. Regarding cluttering the basic |
@@ -261,33 +261,37 @@ def get_magnetic_field_vector(self, time=None): | |||
logger.error(f"Reference reconstruction not set / unknown: {self.__reference_reconstruction}") | |||
raise ValueError(f"Reference reconstruction not set / unknown: {self.__reference_reconstruction}") | |||
|
|||
def avg_SNR(self, channels_to_include = [0, 1, 2, 3, 5, 6, 7, 22, 23]): | |||
def get_average_signal_to_noise_ratio(self, channels_to_include = [0, 1, 2, 3, 5, 6, 7, 22, 23]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you set the default value for channels_to_include
to None
? This class should be a rather generic class and the channels id only make sense for RNO-G.
""" | ||
Returns the average SNR across all channels | ||
""" | ||
snr_all = [] | ||
for channel in station.iter_channels(): | ||
for channel in station.iter_channels(channels_to_include): | ||
if (channel.has_parameter(chp.SNR)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you remove the parentheses from the if condition?
if (channel.has_parameter(chp.SNR)): | ||
snr_ch = channel.get_parameter(chp.SNR) | ||
if (snr_ch == np.inf): | ||
return np.inf | ||
else: | ||
snr_all.append(snr_ch) | ||
else: | ||
raise LookupError(f"Channel {channel.get_id()} has no parameter SNR") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ValueError or KeyError?
This reverts commit b04bb05.
…viderRNOG module. Reintroduce a function process_event which should make it simple to import it into user code.
I second Sjoerd that I'm afraid that event and station classes get too cluttered with analysis/RNO-G specific functions. On the other hand, we want to offer this flexibility. Wouldn't the better way to implement utility functions such as So instead of writing |
Channel glitch detector
Hi everyone, I provided an example data analysis script with extensive documentation. I have one technical question. Why is the hardwareResponeIncorporator configured to only remove the phases but not correct for amplitudes? I suggest to do the full correction. A bandpass filter is applied before that module so that we won't have any "division by zero" problems. |
Fixed functions to get average SNR and RPR
Fixed functions to get average SNR and RPR
Added eventParametersRNOG class for L2 parameters
Coming soon.