Skip to content
Snippets Groups Projects

[AGIPD][DARK] Improvements for reading conditions by creating new dataclass for multiple runs

Merged Karim Ahmed requested to merge feat/sort_dark_runs_agipd into master

Description

While working on a feature to sort dark runs for AGIPD, I realized that the AGIDP dark notebook might need some improvements. This is a refactor to AGIPD darks with no new functionalities.

1- Introduce AgipdCtrlRuns data class

2- Convert AgipdCtrl class to dataclass

3- Replace cells for reading/validating AGIPD Conditions with AgipdCtrlRuns

4- Now I add more tests to untested pieces in the dark notebook.

This leads to simpler code and better performance while reading conditions. This can also be used with other notebooks, e.g. Gain notebooks that reads more than one run.

How Has This Been Tested?

  • TBD

Relevant Documents (optional)

Types of changes

  • Refactor (refactoring code with no functionality changes)
  • Test (additional or refactored tests)
  • Chore (non-code changes, e.g. comments, readme, grammar, etc...)

Checklist:

  • Add unit tests

Reviewers

@kluyvert @schmidtp

Edited by Karim Ahmed

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Karim Ahmed
  • Karim Ahmed changed the description

    changed the description

  • Karim Ahmed added 2 commits

    added 2 commits

    • 02e75acb - add tests
    • cb43072c - Separate gain mode validation into validate_gain_modes

    Compare with previous version

  • Karim Ahmed added 1 commit

    added 1 commit

    • ed3004c3 - apply isort on test_agipdlib

    Compare with previous version

  • Karim Ahmed added 2 commits

    added 2 commits

    • 79cf9be1 - Change AgipdCtrlsRuns arguments to raw_folder and runs for usability
    • 2bb639f5 - fix assert positions

    Compare with previous version

  • Karim Ahmed marked this merge request as ready

    marked this merge request as ready

  • Karim Ahmed changed title from Draft: [AGIPD][DARK] Introduce new AgipdCtrlRuns Class and use dataclass for AgipdCtrl to [AGIPD][DARK] Improvements for reading conditions by creating new dataclass for multiple runs

    changed title from Draft: [AGIPD][DARK] Introduce new AgipdCtrlRuns Class and use dataclass for AgipdCtrl to [AGIPD][DARK] Improvements for reading conditions by creating new dataclass for multiple runs

  • Karim Ahmed marked the checklist item Add unit tests as completed

    marked the checklist item Add unit tests as completed

  • Karim Ahmed added Testing Waiting for review labels and removed Doing label

    added Testing Waiting for review labels and removed Doing label

  • Karim Ahmed changed the description

    changed the description

  • Karim Ahmed marked the checklist item TBD as completed

    marked the checklist item TBD as completed

  • Karim Ahmed added 1 commit

    added 1 commit

    Compare with previous version

  • Karim Ahmed added 1 commit

    added 1 commit

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading