-
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
Open
fschlueter
wants to merge
69
commits into
develop
Choose a base branch
from
add_rnog_data_processing_script
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,396
−66
Open
Changes from 1 commit
Commits
Show all changes
69 commits
Select commit
Hold shift + click to select a range
4f16eb1
Rename folder in examples
fschlueter 3bc55d1
Delete station_simulation folder from NuRadioReco examples. A new exa…
fschlueter 91373db
Remove redandent script
fschlueter 2fa050e
Remove subfolder
fschlueter 2b6442f
Update script to run simple reconstruction
fschlueter 1dbe95c
Add a first version of a standard reconstruction and processing scrip…
fschlueter 9fa0976
Minor modifications. Remove one function
fschlueter 77ea69b
Adding logging and improvements to config file
fschlueter 7a8c086
Improve logging
fschlueter b3b8fa8
Fix unit test
fschlueter 8ad78ad
Merge branch 'develop' into add_rnog_data_processing_script
fschlueter 6736e04
apply hardware respone incorperator in phase_only mode. some more cha…
fschlueter f6d4aec
add first version of beam forming fitter
cg-laser 24a1384
further improvements
cg-laser e02aa9e
update reco script
cg-laser 5c47f45
Added "glitch" parameter
avijai2000 ef62272
Add files via upload
avijai2000 37f253e
Update glitch_removal.py
avijai2000 8550ffc
Update parameters.py
avijai2000 8d9bab0
Update glitch_removal.py
avijai2000 a47f26e
Merge remote-tracking branch 'origin/channelBlockOffsetFitter-auto' i…
fschlueter 8c68e06
Rename new glitch module
fschlueter 207e705
Add blockoffset removal explicitly in the processing sequence
fschlueter 04d6367
Move channelGlitchDetector.py module to RNO_G
fschlueter 3cf363a
Improve channelGlitchDetector module. Change parameters. Add helper f…
fschlueter 52ac6d1
Add begin argument to glitch module. Changed args -> kwargs in script…
fschlueter 4daecf1
Merge branch 'add-decorator' into add_rnog_data_processing_script
fschlueter af5f695
Introduce channelParametersRNOG
fschlueter e80dcff
Move glitch detectio before offset subtractor
fschlueter 90ede8f
Update channelSignalReconstructor.py
avijai2000 6da1b9b
Update parameters.py
avijai2000 36d3743
Update event.py
avijai2000 511f623
Update parameters.py
avijai2000 a8d9f02
Update channelSignalReconstructor.py
avijai2000 b7687e6
fix a few strange things
philippwindischhofer b9873ae
calculate glitch test statistic
philippwindischhofer 7c4c93e
Merge branch 'develop' into add_rnog_data_processing_script
fschlueter 5c1451d
Fix
fschlueter 3940ab6
Cleanup channelSignalReconstructor
fschlueter 0035a60
Update station.py
avijai2000 43bd34a
Update event.py
avijai2000 27ed6d3
Add RNO-G data provider module
fschlueter 3f808c7
Fix reader argument
fschlueter c74ecac
better documentation
philippwindischhofer b04bb05
very dirty, temporary hack
philippwindischhofer 13515f3
draft summary plot
philippwindischhofer 0d72885
nicer plot
philippwindischhofer 6e16340
Update station.py
avijai2000 2a07096
Undo bad hack.
philippwindischhofer a416951
channel parameter
philippwindischhofer e6e0d57
Merge branch 'develop' into add_rnog_data_processing_script
fschlueter fb184a0
Adabt the rnog_standard_data_processing script to use the new dataPro…
fschlueter d93b300
make Felix happy
philippwindischhofer 25c6ff3
add summary prinout at the end of the run
philippwindischhofer 46139c9
fix conflicts and felix' code again: radomir wonders if he tests it b…
philippwindischhofer 1a05f82
notation
philippwindischhofer fb98c55
Rewriting of rnog_standard_data_processing (again). Some fixes
fschlueter a3c26f0
Merge branch 'add_rnog_data_processing_script' into rnog_glitch_detec…
philippwindischhofer c424185
missing import
philippwindischhofer e640cea
returns a list when nargs is used
philippwindischhofer 47bdcaf
logger doesn't have end
philippwindischhofer 26e942f
make felix extra happy
philippwindischhofer 50e9db0
make felix even happier
philippwindischhofer e2399da
Merge pull request #806 from nu-radio/rnog_glitch_detection
philippwindischhofer 743d2fa
restructure example, provide additional example code
cg-laser 6b1ea3f
remove previous file
cg-laser f32c0f0
Update event.py
avijai2000 e2c5fab
Update station.py
avijai2000 7243bf3
Update parameters.py
avijai2000 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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]): | ||
""" | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. can you remove the parentheses from the if condition? |
||
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 commentThe reason will be displayed to describe this comment to others. Learn more. ValueError or KeyError? |
||
|
||
return np.mean(snr_all) | ||
|
||
def avg_RPR(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]): | ||
""" | ||
Returns the average RPR across all channels | ||
""" | ||
rpr_all = [] | ||
for channel in station.iter_channels(): | ||
for channel in station.iter_channels(channels_to_include): | ||
if (channel.has_parameter(chp.RPR)): | ||
rpr_ch = channel.get_parameter(chp.RPR) | ||
if (rpr_ch == np.inf): | ||
return np.inf | ||
else: | ||
rpr_all.append(rpr_ch) | ||
else: | ||
raise LookupError(f"Channel {channel.get_id()} has no parameter RPR") | ||
|
||
return np.mean(rpr_all) | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
toNone
? This class should be a rather generic class and the channels id only make sense for RNO-G.