Skip to content
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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Hextof lab loader #534

wants to merge 12 commits into from

Conversation

zain-sohail
Copy link
Member

@zain-sohail zain-sohail commented Dec 19, 2024

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 as cfel.

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.

@zain-sohail zain-sohail changed the base branch from main to v1_feature_branch December 19, 2024 12:46
@zain-sohail zain-sohail marked this pull request as ready for review December 19, 2024 15:48
else:
raise ValueError(f"Unsupported core beamline: {core_beamline}")

def _validate_h5_files(self, config, h5_paths: list[Path]) -> list[Path]:
Copy link
Member Author

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)

Comment on lines -4 to -7
# TODO: move to config
MULTI_INDEX = ["trainId", "pulseId", "electronId"]
PULSE_ALIAS = MULTI_INDEX[1]
FORMATS = ["per_electron", "per_pulse", "per_train"]
Copy link
Member Author

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

@coveralls
Copy link
Collaborator

coveralls commented Jan 16, 2025

Pull Request Test Coverage Report for Build 13419398366

Details

  • 71 of 124 (57.26%) changed or added relevant lines in 7 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.6%) to 91.6%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/sed/loader/flash/loader.py 3 4 75.0%
src/sed/loader/flash/utils.py 9 10 90.0%
src/sed/loader/flash/buffer_handler.py 30 34 88.24%
src/sed/loader/flash/dataframe.py 22 69 31.88%
Files with Coverage Reduction New Missed Lines %
src/sed/binning/numba_bin.py 3 87.62%
Totals Coverage Status
Change from base Build 13167417292: -0.6%
Covered Lines: 7731
Relevant Lines: 8440

💛 - Coveralls

@zain-sohail zain-sohail mentioned this pull request Jan 30, 2025
12 tasks
@rettigl rettigl changed the base branch from v1_feature_branch to main February 5, 2025 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants