Skip to content

Commit

Permalink
Merge branch 'develop' into refactor_coreas_v3
Browse files Browse the repository at this point in the history
  • Loading branch information
cg-laser committed Jun 5, 2024
2 parents 9a40073 + c3820bc commit c389b92
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
16 changes: 8 additions & 8 deletions NuRadioReco/detector/RNO_G/db_mongo_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -885,15 +885,15 @@ def get_channel_signal_chain(self, channel_signal_id, measurement_name=None, ver
supp_info = {k.replace(component + "_", ""): additional_information[k] for k in additional_information
if re.search(component, k)}

if re.search("golden", component, re.IGNORECASE):
collection_component = component.replace("_1", "").replace("_2", "")
# load the s21 parameter measurement
component_data = self.get_component_data(
collection_component, component_id, supp_info, primary_time=self.__database_time, verbose=verbose)
if re.search("_\d+", component, re.IGNORECASE):
collection_suffix = re.findall("(_\d+)", component, re.IGNORECASE)[0]
collection_component = component.replace(collection_suffix, "")
else:
# load the s21 parameter measurement
component_data = self.get_component_data(
component, component_id, supp_info, primary_time=self.__database_time, verbose=verbose)
collection_component = component

# load the s21 parameter measurement
component_data = self.get_component_data(
collection_component, component_id, supp_info, primary_time=self.__database_time, verbose=verbose)

# add the component name, the weight of the s21 measurement and the actual s21 measurement (component_data) to a combined dictionary
components_data[component] = {'name': component_id}
Expand Down
10 changes: 5 additions & 5 deletions NuRadioReco/detector/detector_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ def get_antenna_model(self, station_id, channel_id, zenith=None):

def get_channel_group_id(self, station_id, channel_id):
"""
returns the group ID of a channel
returns the group ID of a channel. If the channel has no group ID, the channel ID is returned.
Parameters
----------
Expand All @@ -966,11 +966,11 @@ def get_channel_group_id(self, station_id, channel_id):
the channel group ID
"""
res = self.__get_channel(station_id, channel_id)
if 'channel_group_id' not in res.keys():
logger.warning(
'Channel group ID not set for channel {} in station {}, returning -1'.format(
if 'channel_group_id' not in res:
logger.info(
'Channel group ID not set for channel {} in station {}, returning channel_id'.format(
channel_id, station_id))
return -1
return channel_id
else:
return res['channel_group_id']

Expand Down
7 changes: 6 additions & 1 deletion documentation/source/NuRadioReco/pages/detector/rnog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ To describe the detector at any time we use two different time variables, the `d
Database data structure
-----------------------

The database is organized in collections. Each collection contains a list of objects which contain our data. The primary collection which describes our detector is the called `station_rnog`. This collection contains the `station list` which describes which station are deployed, when they were deployed. Each station has a list of its deployed channels. The information of the stations and channels positions is organized in seperate collections. Also the response of the different components in a channel's signal chain are stored in other collections.
The database is organized in collections. Each collection contains a list of objects which contain our data. The primary collection which describes our detector is the called `station_rnog`. This collection contains the `station list` which describes which station are deployed, when they were deployed. Each station has a list of its deployed channels. The information of the stations and channels positions is organized in seperate collections. Also the response of the different components in a channel's signal chain are stored in other collections.


Signal Chain
------------

Each channel has a "signal chain" which is basically a list of all the individual reponses which are necessary to describe the entire analog response of this channel. This list is implemented as dictionary, the key of the dictionary is also the name of the collection in which it looks for the specified response (value). The key can have a suffix like `_1` which allows to specify several response from the same collection to be added to the signal chain.


Detector class
--------------

0 comments on commit c389b92

Please sign in to comment.