Skip to content
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
wants to merge 69 commits into
base: develop
Choose a base branch
from
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 Jan 16, 2025
3bc55d1
Delete station_simulation folder from NuRadioReco examples. A new exa…
fschlueter Jan 16, 2025
91373db
Remove redandent script
fschlueter Jan 16, 2025
2fa050e
Remove subfolder
fschlueter Jan 16, 2025
2b6442f
Update script to run simple reconstruction
fschlueter Jan 16, 2025
1dbe95c
Add a first version of a standard reconstruction and processing scrip…
fschlueter Jan 16, 2025
9fa0976
Minor modifications. Remove one function
fschlueter Jan 17, 2025
77ea69b
Adding logging and improvements to config file
fschlueter Jan 17, 2025
7a8c086
Improve logging
fschlueter Jan 17, 2025
b3b8fa8
Fix unit test
fschlueter Jan 17, 2025
8ad78ad
Merge branch 'develop' into add_rnog_data_processing_script
fschlueter Jan 17, 2025
6736e04
apply hardware respone incorperator in phase_only mode. some more cha…
fschlueter Jan 17, 2025
f6d4aec
add first version of beam forming fitter
cg-laser Jan 21, 2025
24a1384
further improvements
cg-laser Jan 21, 2025
e02aa9e
update reco script
cg-laser Jan 23, 2025
5c47f45
Added "glitch" parameter
avijai2000 Jan 23, 2025
ef62272
Add files via upload
avijai2000 Jan 23, 2025
37f253e
Update glitch_removal.py
avijai2000 Jan 23, 2025
8550ffc
Update parameters.py
avijai2000 Jan 23, 2025
8d9bab0
Update glitch_removal.py
avijai2000 Jan 23, 2025
a47f26e
Merge remote-tracking branch 'origin/channelBlockOffsetFitter-auto' i…
fschlueter Jan 24, 2025
8c68e06
Rename new glitch module
fschlueter Jan 24, 2025
207e705
Add blockoffset removal explicitly in the processing sequence
fschlueter Jan 24, 2025
04d6367
Move channelGlitchDetector.py module to RNO_G
fschlueter Jan 24, 2025
3cf363a
Improve channelGlitchDetector module. Change parameters. Add helper f…
fschlueter Jan 24, 2025
52ac6d1
Add begin argument to glitch module. Changed args -> kwargs in script…
fschlueter Jan 24, 2025
4daecf1
Merge branch 'add-decorator' into add_rnog_data_processing_script
fschlueter Jan 24, 2025
af5f695
Introduce channelParametersRNOG
fschlueter Jan 24, 2025
e80dcff
Move glitch detectio before offset subtractor
fschlueter Jan 24, 2025
90ede8f
Update channelSignalReconstructor.py
avijai2000 Jan 24, 2025
6da1b9b
Update parameters.py
avijai2000 Jan 24, 2025
36d3743
Update event.py
avijai2000 Jan 24, 2025
511f623
Update parameters.py
avijai2000 Jan 25, 2025
a8d9f02
Update channelSignalReconstructor.py
avijai2000 Jan 25, 2025
b7687e6
fix a few strange things
philippwindischhofer Jan 27, 2025
b9873ae
calculate glitch test statistic
philippwindischhofer Jan 27, 2025
7c4c93e
Merge branch 'develop' into add_rnog_data_processing_script
fschlueter Jan 27, 2025
5c1451d
Fix
fschlueter Jan 27, 2025
3940ab6
Cleanup channelSignalReconstructor
fschlueter Jan 27, 2025
0035a60
Update station.py
avijai2000 Jan 27, 2025
43bd34a
Update event.py
avijai2000 Jan 27, 2025
27ed6d3
Add RNO-G data provider module
fschlueter Jan 28, 2025
3f808c7
Fix reader argument
fschlueter Jan 28, 2025
c74ecac
better documentation
philippwindischhofer Jan 28, 2025
b04bb05
very dirty, temporary hack
philippwindischhofer Jan 28, 2025
13515f3
draft summary plot
philippwindischhofer Jan 28, 2025
0d72885
nicer plot
philippwindischhofer Jan 28, 2025
6e16340
Update station.py
avijai2000 Jan 28, 2025
2a07096
Undo bad hack.
philippwindischhofer Jan 29, 2025
a416951
channel parameter
philippwindischhofer Jan 29, 2025
e6e0d57
Merge branch 'develop' into add_rnog_data_processing_script
fschlueter Jan 29, 2025
fb184a0
Adabt the rnog_standard_data_processing script to use the new dataPro…
fschlueter Jan 29, 2025
d93b300
make Felix happy
philippwindischhofer Jan 29, 2025
25c6ff3
add summary prinout at the end of the run
philippwindischhofer Jan 30, 2025
46139c9
fix conflicts and felix' code again: radomir wonders if he tests it b…
philippwindischhofer Jan 30, 2025
1a05f82
notation
philippwindischhofer Jan 30, 2025
fb98c55
Rewriting of rnog_standard_data_processing (again). Some fixes
fschlueter Jan 31, 2025
a3c26f0
Merge branch 'add_rnog_data_processing_script' into rnog_glitch_detec…
philippwindischhofer Jan 31, 2025
c424185
missing import
philippwindischhofer Jan 31, 2025
e640cea
returns a list when nargs is used
philippwindischhofer Jan 31, 2025
47bdcaf
logger doesn't have end
philippwindischhofer Jan 31, 2025
26e942f
make felix extra happy
philippwindischhofer Jan 31, 2025
50e9db0
make felix even happier
philippwindischhofer Jan 31, 2025
e2399da
Merge pull request #806 from nu-radio/rnog_glitch_detection
philippwindischhofer Jan 31, 2025
743d2fa
restructure example, provide additional example code
cg-laser Jan 31, 2025
6b1ea3f
remove previous file
cg-laser Feb 3, 2025
f32c0f0
Update event.py
avijai2000 Feb 3, 2025
e2c5fab
Update station.py
avijai2000 Feb 3, 2025
7243bf3
Update parameters.py
avijai2000 Feb 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions NuRadioReco/framework/station.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]):
Copy link
Collaborator Author

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)):
Copy link
Collaborator Author

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?

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")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The 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)

Expand Down
Loading