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

Clean and refactor amstrax for XAMS v2.0 #234

Merged
merged 58 commits into from
Aug 29, 2023
Merged

Clean and refactor amstrax for XAMS v2.0 #234

merged 58 commits into from
Aug 29, 2023

Conversation

cfuselli
Copy link
Member

@cfuselli cfuselli commented Jan 26, 2023

With this PR we provide cleaner working version of amstrax in view of the upcoming XAMS v2.0.

General:

  • Adjust imports
  • Add arguments to amstraxer for auto processing
  • New amstraxer_easy for easier autoprocessing (removed unnecessary options..) -> TODO replace amstraxer
  • autoprocessing/autoprocessing.py : add local processing option (for now preferred?)
  • autoprocessing/process_run.py : add number of failures handling
  • make amstrax straxen independent (to be discussed, for me is just source of problems, straxen changes quickly)
  • contexts.py : adjusted some contexts options, TODO: clean all contexts
  • rundb interface more structured
  • added process_run as script

Processing plugins:

  • refactored structure
  • make plugins straxen free (at the cost of copy pasting few functions from straxen)
  • unified raw records in one type only
  • simplified pulse processing
  • two new useful plugins for LED calibrations, see the full pulses
  • workflow up to peaks tested, need events to tune things

TODOs:

  • Clean contexts
  • Replace amstraxer
  • Auto processing on stomboot
  • Test events plugins
  • Bump version and make release
  • Update docs
  • Add and update tests
  • ! Add support for different digitiser sampling times
  • Add corrections (like to_pe..)

This pull request should go together with updates on the webinterface

@coveralls
Copy link

coveralls commented Jan 26, 2023

Pull Request Test Coverage Report for Build 6013027622

  • 402 of 596 (67.45%) changed or added relevant lines in 28 files are covered.
  • 72 unchanged lines in 4 files lost coverage.
  • Overall coverage increased (+8.2%) to 53.386%

Changes Missing Coverage Covered Lines Changed/Added Lines %
amstrax/plugins/events/events.py 28 29 96.55%
amstrax/plugins/peaks/peak_basics.py 47 48 97.92%
amstrax/auto_processing/amstraxer.py 0 5 0.0%
amstrax/rundb.py 0 5 0.0%
amstrax/common.py 51 58 87.93%
amstrax/plugins/raw_records/daqreader.py 67 77 87.01%
amstrax/auto_processing/auto_processing.py 3 23 13.04%
amstrax/plugins/led_cal/records_led.py 18 40 45.0%
amstrax/plugins/led_cal/led_calibration.py 21 47 44.68%
amstrax/auto_processing/amstraxer_easy.py 11 41 26.83%
Files with Coverage Reduction New Missed Lines %
amstrax/rundb.py 1 20.71%
amstrax/auto_processing/auto_processing.py 3 12.5%
amstrax/hitfinder_thresholds.py 9 33.33%
amstrax/auto_processing/amstraxer.py 59 14.42%
Totals Coverage Status
Change from base Build 4382564582: 8.2%
Covered Lines: 678
Relevant Lines: 1270

💛 - Coveralls

@cfuselli cfuselli marked this pull request as ready for review August 29, 2023 09:37
@cfuselli cfuselli marked this pull request as draft August 29, 2023 11:16
@cfuselli cfuselli marked this pull request as ready for review August 29, 2023 12:27
@cfuselli cfuselli merged commit d3669d5 into master Aug 29, 2023
9 of 10 checks passed
@cfuselli
Copy link
Member Author

Merging work done in the last months.
Still some todos that would be nice to implement will be left for later.

TODOs:

  • Clean contexts
  • Replace amstraxer
  • Auto processing on stomboot
  • Test events plugins
  • Bump version and make release
  • Update docs
  • Add and update tests
  • ! Add support for different digitiser sampling times
  • Add corrections (like to_pe..)

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.

4 participants