Skip to content

Commit

Permalink
add example config
Browse files Browse the repository at this point in the history
  • Loading branch information
zain-sohail committed Jan 16, 2025
1 parent 289d037 commit dcfe456
Showing 1 changed file with 166 additions and 0 deletions.
166 changes: 166 additions & 0 deletions src/sed/config/lab_example_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
# This file contains the default configuration for the flash loader.

core:
# defines the loader
loader: flash
# Since this will run on maxwell most probably, we have a lot of cores at our disposal
num_cores: 10
# the beamline where experiment took place
beamline: cfel
# the ID number of the beamtime
beamtime_id: 11019101
# the year of the beamtime
year: 2023
# the instrument used
instrument: hextof # hextof, wespe, etc

# The paths to the raw and parquet data directories. If these are not
# provided, the loader will try to find the data based on year beamtimeID etc
paths:
# location of the raw data.
raw: ""
# location of the intermediate parquet files.
processed: ""

# The beamtime directories for different DAQ systems.
# (Not to be changed by user)
beamtime_dir:
pg2: "/asap3/flash/gpfs/pg2/"
cfel: "/asap3/fs-flash-o/gpfs/hextof/"


dataframe:
daq: fl1user3 # DAQ system name to resolve filenames/paths
ubid_offset: 5 # Offset correction to the pulseId
forward_fill_iterations: 2 # Number of iterations to fill the pulseId forward
split_sector_id_from_dld_time: True # Remove reserved bits for dldSectorID from dldTimeSteps column
sector_id_reserved_bits: 3 # Bits reserved for dldSectorID in the dldTimeSteps column
sector_delays: [0., 0., 0., 0., 0., 0., 0., 0.] # Sector delays

# Time and binning settings
tof_binwidth: 2.0576131995767355E-11 # Base time-of-flight bin width in seconds
tof_binning: 8 # Binning parameter for time-of-flight data

# Columns used for jitter correction
index: index
jitter_cols: [dldPosX, dldPosY, dldTimeSteps]
formats: [per_file, per_train, per_electron]
fill_formats: [per_train, per_file] # Channels with this format will be forward filled

# Column settings
columns:
x: dldPosX
corrected_x: X
kx: kx
y: dldPosY
corrected_y: Y
ky: ky
tof: dldTimeSteps
tof_ns: dldTime
corrected_tof: tm
timestamp: timeStamp
auxiliary: dldAux
sector_id: dldSectorID
delay: delayStage
corrected_delay: pumpProbeTime

units:
# These are the units of the columns
dldPosX: 'step'
dldPosY: 'step'
dldTimeSteps: 'step'
tof_voltage: 'V'
extractorVoltage: 'V'
extractorCurrent: 'A'
cryoTemperature: 'K'
sampleTemperature: 'K'
dldTime: 'ns'
delay: 'ps'
timeStamp: 's'
energy: 'eV'
E: 'eV'
kx: '1/A'
ky: '1/A'

# The channels to load.
# channels have the following structure:
# <channelAlias>:
# format: per_pulse/per_electron/per_train
# index_key: the hdf5 index key
# dataset_key: the hdf5 dataset key
# slice: int to slice a multidimensional data along axis=1. If not defined, there is no slicing
# dtype: the datatype of the data
# subChannels: further aliases for if the data is multidimensional and needs to be split in different cols
# used currently for the auxiliary channel
# <subChannelAlias>:
# slice: int to slice a multidimensional data along axis=1. Must be defined
# dtype: the datatype of the data

channels:
# The timestamp
# timeStamp:
# format: per_file
# dataset_key: "/uncategorised/FLASH.DIAG/TIMINGINFO/TIME1.BUNCH_FIRST_INDEX.1/time"
# event key
numEvents:
format: per_file
dataset_key: /DLD/NumOfEvents
# detector x position
dldPosX:
format: per_electron
dataset_key: /DLD/DLD/xPos
dtype: uint32

# detector y position
dldPosY:
format: per_electron
dataset_key: /DLD/DLD/yPos
dtype: uint32

# Detector time-of-flight channel
# if split_sector_id_from_dld_time is set to True, This this will generate
# also the dldSectorID channel
dldTimeSteps:
format: per_electron
dataset_key: /DLD/DLD/times
dtype: uint32

# The auxiliary channel has a special structure where the group further contains
# a multidimensional structure so further aliases are defined below
dldAux:
format: per_train
dataset_key: "/SlowData/hextof/dld/info/Aux"
sub_channels:
sampleBias:
slice: 0
dtype: float32
tofVoltage:
slice: 1
dtype: float64
extractorVoltage:
slice: 2
extractorCurrent:
slice: 3
cryoTemperature:
slice: 4
sampleTemperature:
slice: 5
dldTimeBinSize:
slice: 15

vuRead:
format: per_train
dataset_key: /SlowData/hextof/logic/kmic1/Sample_VURead



# metadata collection from scicat
# metadata:
# scicat_url: <URL>
# scicat_token: <TOKEN>

# The nexus collection routine shall be finalized soon for both instruments
# nexus:
# reader: "flash"
# definition: "NXmpes"
# input_files: ["NXmpes_config_HEXTOF_light.json"]

0 comments on commit dcfe456

Please sign in to comment.