Skip to content

Commit

Permalink
fixing channels
Browse files Browse the repository at this point in the history
  • Loading branch information
sofia-calgaro authored Apr 27, 2023
1 parent 89c59cf commit 6c9dd08
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/legend_data_monitor/subsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,16 +579,27 @@ def construct_dataloader_configs(self, params: list_of_str):
utils.logger.info(f"...... not loading problematic detectors for {self.period}: {names}")
chlist = [ch for ch in chlist if ch not in probl_dets]

# for L60-p01 and L200-p02, keep using 3 digits
if int(self.period[-1]) < 3:
ch_format = "ch:03d"
# from L200-p03 included, uses 7 digits
if int(self.period[-1]) >= 3:
ch_format = "ch:07d"

# --- settings for each tier
for tier, tier_params in param_tiers.groupby("tier"):
dict_dbconfig["tier_dirs"][tier] = f"/{tier}"
# type not fixed and instead specified in the query
dict_dbconfig["file_format"][tier] = (
"/{type}/{period}/{run}/{exp}-{period}-{run}-{type}-{timestamp}-tier_"
"/{type}/"
+ self.period # {period}
+ "/{run}/{exp}-"
+ self.period # {period}
+ "-{run}-{type}-{timestamp}-tier_"
+ tier
+ ".lh5"
)
dict_dbconfig["table_format"][tier] = "ch{ch:03d}/" + tier
dict_dbconfig["table_format"][tier] = "ch{" + ch_format + "}/" + tier

dict_dbconfig["tables"][tier] = chlist

Expand Down

0 comments on commit 6c9dd08

Please sign in to comment.