Skip to content

Commit

Permalink
modifiy the reader such that multiple entries from the same colletion…
Browse files Browse the repository at this point in the history
… can be in the response chain
  • Loading branch information
jakobhenrichs committed May 29, 2024
1 parent 07559c2 commit 0e87be1
Showing 1 changed file with 8 additions and 8 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

0 comments on commit 0e87be1

Please sign in to comment.