-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hextof lab loader #534
base: v1_feature_branch
Are you sure you want to change the base?
Hextof lab loader #534
Conversation
else: | ||
raise ValueError(f"Unsupported core beamline: {core_beamline}") | ||
|
||
def _validate_h5_files(self, config, h5_paths: list[Path]) -> list[Path]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This validation was previously in BufferFilePaths and we had a discussion to move it from there. I find this location better (also was necessary due to restructure)
# TODO: move to config | ||
MULTI_INDEX = ["trainId", "pulseId", "electronId"] | ||
PULSE_ALIAS = MULTI_INDEX[1] | ||
FORMATS = ["per_electron", "per_pulse", "per_train"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these have now been moved to config/config model
if PULSE_ALIAS in available_channels: | ||
available_channels.remove(PULSE_ALIAS) | ||
# Remove specified channels if they are present in available_channels. | ||
channels_to_remove = ["pulseId", "numEvents"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently hardcoded. A better suggestion welcomed.
c206130
to
788d189
Compare
Pull Request Test Coverage Report for Build 12811799296Details
💛 - Coveralls |
This PR adds the lab loader requested in #503 . I tried to make minimal changes to the
FlashLoader
to make this work. The only major addition is the loader specific dataframe class and everything else stays approximately the same. So the lab data works with the flash loader but withbeamline
config ascfel
.An example config is provided to make this work. Since I took out some hardcoded paramters (was in TODO) into the config, I updated the config model slightly.
Test data for this loading configuration still needs to be setup. I ask @kutnyakhov to provide a public file to perform this. Not sure if a tutorial is necessary or not.