Conversation
…rt the outcome for vrms distributions
| # 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] |
There was a problem hiding this comment.
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, ...],
....
}
There was a problem hiding this comment.
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.
| 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', | ||
| }) |
There was a problem hiding this comment.
Can you specify that in an extra file? Makes the scripts easier to read.
| @@ -0,0 +1,26 @@ | |||
| { | |||
| "0": 3.4629415672776167, | |||
There was a problem hiding this comment.
can you combine these json files?
There was a problem hiding this comment.
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.''' |
There was a problem hiding this comment.
Love that you gave it a doc-string. Can you move it up to the top of the file?
| 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") |
There was a problem hiding this comment.
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, ...).
There was a problem hiding this comment.
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 | |||
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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])}") |
There was a problem hiding this comment.
do you want to use logging?
There was a problem hiding this comment.
Yes, I think that's a good idea
No description provided.