Skip to content

Commit f4fd755

Browse files
committed
update some minor config changes
1 parent 69e4595 commit f4fd755

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

src/sed/config/flash_example_config.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,7 @@ dataframe:
217217

218218
# metadata collection from scicat
219219
# metadata:
220-
# scicat_url: <URL>
221-
# scicat_token: <TOKEN>
220+
# archiver_url: <URL>
222221

223222
# The nexus collection routine shall be finalized soon for both instruments
224223
nexus:

src/sed/config/lab_example_config.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ dataframe:
102102
# format: per_file
103103
# dataset_key: "/uncategorised/FLASH.DIAG/TIMINGINFO/TIME1.BUNCH_FIRST_INDEX.1/time"
104104
# event key
105-
numEvents:
105+
index:
106106
format: per_file
107107
dataset_key: /DLD/NumOfEvents
108108
# detector x position
@@ -156,11 +156,10 @@ dataframe:
156156

157157
# metadata collection from scicat
158158
# metadata:
159-
# scicat_url: <URL>
160-
# scicat_token: <TOKEN>
159+
# archiver_url: <URL>
161160

162161
# The nexus collection routine shall be finalized soon for both instruments
163162
# nexus:
164-
# reader: "flash"
163+
# reader: "mpes"
165164
# definition: "NXmpes"
166-
# input_files: ["NXmpes_config_HEXTOF_light.json"]
165+
# input_files: ["NXmpes_config-HEXTOF.json"]

src/sed/loader/flash/dataframe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
import numpy as np
1515
import pandas as pd
1616

17+
from sed.core.logging import setup_logging
1718
from sed.loader.flash.utils import get_channels
1819
from sed.loader.flash.utils import InvalidFileError
19-
from sed.core.logging import setup_logging
2020

2121
logger = setup_logging("flash_dataframe_creator")
2222

@@ -434,7 +434,7 @@ def df_train(self) -> pd.DataFrame:
434434
dataset = self.get_dataset_array(channel)
435435
# Electron and pulse resolved MultiIndex is created. Since this is train data,
436436
# the electron and pulse index is always 0
437-
index = np.cumsum([0, *self.get_dataset_array("numEvents")[:-1]])
437+
index = np.cumsum([0, *self.get_dataset_array("index")[:-1]])
438438
# Auxiliary dataset (which is stored in the same dataset as other DLD channels)
439439
# contains multiple channels inside. Even though they are resolved per train,
440440
# they come in pulse format, so the extra values are sliced and individual channels are

src/sed/loader/flash/utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,8 @@ def get_channels(
5858
# Get the available channels excluding 'pulseId'.
5959
available_channels = list(channel_dict.keys())
6060
# pulse alias is an index and should not be included in the list of channels.
61-
# Remove specified channels if they are present in available_channels.
62-
channels_to_remove = ["pulseId", "numEvents"]
63-
for channel in channels_to_remove:
61+
# Remove index channels if they are present in available_channels.
62+
for channel in index_list:
6463
if channel in available_channels:
6564
available_channels.remove(channel)
6665

0 commit comments

Comments
 (0)