Skip to content

Science verification analysis#12

Open
zsselcuk wants to merge 12 commits intomainfrom
science_verification_analysis
Open

Science verification analysis#12
zsselcuk wants to merge 12 commits intomainfrom
science_verification_analysis

Conversation

@zsselcuk
Copy link
Contributor

No description provided.

@zsselcuk zsselcuk requested a review from fschlueter January 11, 2026 19:38
@zsselcuk zsselcuk self-assigned this Jan 11, 2026
Comment on lines +34 to +52
# Channel mapping for the first seven RNO-G stations:
SURFACE_CHANNELS_LIST = [12, 13, 14, 15, 16, 17, 18 , 19 , 20]
DEEP_CHANNELS_LIST = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 21, 22, 23]
UPWARD_CHANNELS_LIST = [13, 16, 19]
DOWNWARD_CHANNELS_LIST = [12, 14, 15, 17, 18, 20]
VPOL_LIST = [0, 1, 2, 3, 5, 6, 7, 9, 10, 22, 23]
HPOL_LIST = [4, 8, 11, 21]
PHASED_ARRAY_LIST = [0, 1, 2, 3]
ALL_CHANNELS_LIST = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 , 19 , 20, 21, 22, 23]

# Channel mapping for Station 14:
STATION_14_SURFACE_CHANNELS_LIST = [12, 13, 14, 15, 16, 17, 18 , 19]
STATION_14_DEEP_CHANNELS_LIST = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 21, 22, 23]
STATION_14_UPWARD_CHANNELS_LIST = [13, 15, 16, 18]
STATION_14_DOWNWARD_CHANNELS_LIST = [12, 14, 17, 19]
STATION_14_VPOL_LIST = [0, 1, 2, 3, 5, 6, 7, 9, 10, 20, 22, 23]
STATION_14_HPOL_LIST = [4, 8, 11, 21]
STATION_14_PHASED_ARRAY_LIST = [0, 1, 2, 3]
STATION_14_ALL_CHANNELS_LIST = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 , 19 , 20, 21, 22, 23]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that something which can be either defined globally or in a config file? Also I was wondering if it makes sense to generalize this a bit by only defining a dict with keys which act as label for the channel group and values which list the channel id's, e.g.:

channel_groups = {
   "phased_array": [0, 1, 2, 3],
   "surface": [12, 13, ...],
    ....
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think I should put all of the station-specific stuff into a config file, including the analysis. This way it would also be easier for station experts to change some parameters if needed.

Comment on lines +59 to +92
mpl.rcParams.update({
'font.family': 'sans-serif',
'font.sans-serif': ['Helvetica', 'Arial', 'DejaVu Sans'],
'font.size': 17,

'axes.labelsize': 17,
'axes.titlesize': 18,
'axes.linewidth': 1.2,
'axes.grid': False,

'xtick.labelsize': 17,
'ytick.labelsize': 17,
'xtick.major.size': 6,
'ytick.major.size': 6,
'xtick.major.width': 1.2,
'ytick.major.width': 1.2,
'xtick.minor.size': 3,
'ytick.minor.size': 3,
'xtick.minor.visible': True,
'ytick.minor.visible': True,

'lines.linewidth': 1.6,
'lines.antialiased': True,
'lines.markersize': 6,

'legend.fontsize': 14,
'legend.frameon': False,
'legend.handlelength': 1,
'legend.borderpad': 0.3,

'figure.dpi': 120,
'savefig.dpi': 300,
'savefig.bbox': 'tight',
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you specify that in an extra file? Makes the scripts easier to read.

@@ -0,0 +1,26 @@
{
"0": 3.4629415672776167,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you combine these json files?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! For each station there will be only a single file.

from datetime import timezone


'''This module can be used to find expected parameter values for RNO-G stations from a known stable time period.'''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love that you gave it a doc-string. Can you move it up to the top of the file?

Comment on lines +188 to +193
k_values_filename_snr = f"station_{station_id}_k_ref_values_snr.json"

if args.save_values:
save_values_json(k_values_log_snr, k_values_filename_snr)
save_values_json(log_mean_list, f"station_{station_id}_ref_log_mean_snr.json")
save_values_json(log_std_list, f"station_{station_id}_ref_log_std_snr.json")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you stored these files in the repo - was that intended? Are those files meant to be created or used by other users? Does it make sense to add more meta data to the json files themself? Examples: station_id, timeperiod used (maybe with a list of runs, ...).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this script is only meant to be used by the station experts to calculate the expected snr values per station. The script then automatically saves these files in the repo so that the science_verification_analysis.py can use them to perform the snr analysis.
I think adding more metadata would be very nice, so that it is reproducably and we can also track if there is a change in the expected values over time.

@@ -0,0 +1,1727 @@
from NuRadioReco.modules.io.RNO_G.readRNOGDataMattak import readRNOGData
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a pretty monolitic file. I think it would improve readability to split the code up in several files. I gave a few suggestion in the other file. Maybe we can separate utility function and function calculating physics observables?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should definitely do that! Otherwise, it will be too complicated in the future.


# Vrms analysis
vrms_arr, vrms_arr_force, vrms_arr_radiant0, vrms_arr_radiant1, vrms_arr_lt = calculate_vrms(trace_arr, event_info)
print(f"Number of RADIANT0 trigger events: {len(vrms_arr_radiant0[1])}, Number of RADIANT1 trigger events: {len(vrms_arr_radiant1[1])}, Number of LT trigger events: {len(vrms_arr_lt[1])}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you want to use logging?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think that's a good idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants