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

Choose the detector to use and move the detector stage #58

Merged
merged 15 commits into from
Nov 13, 2023

Conversation

noemifrisina
Copy link
Contributor

Closes #50

Adds a small plan to move the detector stage to the correct position depending on the requested detector to use.
Also add the edm screens for fixed-target and extruder to trigger it.

Copy link

codecov bot commented Nov 10, 2023

Codecov Report

Merging #58 (8994d57) into main (8d5e51f) will increase coverage by 0.36%.
Report is 1 commits behind head on main.
The diff coverage is 80.00%.

@@            Coverage Diff             @@
##             main      #58      +/-   ##
==========================================
+ Coverage   47.56%   47.92%   +0.36%     
==========================================
  Files          19       21       +2     
  Lines        3267     3309      +42     
==========================================
+ Hits         1554     1586      +32     
- Misses       1713     1723      +10     
Files Coverage Δ
src/mx_bluesky/I24/serial/dcid.py 26.85% <100.00%> (-1.24%) ⬇️
...4/serial/extruder/i24ssx_Extruder_Collect_py3v2.py 71.75% <100.00%> (+0.18%) ⬆️
...4/serial/fixed_target/i24ssx_Chip_Collect_py3v1.py 37.84% <100.00%> (+0.15%) ⬆️
src/mx_bluesky/I24/serial/parameters/__init__.py 100.00% <100.00%> (ø)
src/mx_bluesky/I24/serial/parameters/constants.py 100.00% <100.00%> (ø)
src/mx_bluesky/I24/serial/setup_beamline/pv.py 98.25% <100.00%> (ø)
...luesky/I24/serial/setup_beamline/setup_beamline.py 36.88% <ø> (-1.07%) ⬇️
...4/serial/fixed_target/i24ssx_Chip_Manager_py3v1.py 31.40% <50.00%> (ø)
...luesky/I24/serial/setup_beamline/setup_detector.py 75.00% <75.00%> (ø)

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

Copy link
Contributor

@d-perl d-perl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, just a couple comments

def setup_detector_stage(detector_stage: DetectorMotion, expt_type: str):
# Grab the correct PV depending on experiment
# Its value is set with MUX on edm screen
det_type = pv.me14e_gp101 if expt_type == "fixed-target" else pv.ioc12_gp15
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should: can we use the SSXType enum for this?


def get_detector_type() -> Detector:
det_y = caget(pv.det_y)
# Note to self, I should also be able to use detmotion for this too!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should: please expand into an issue and link it so that someone else could fix this, or remove

parser.add_argument(
"expt",
type=str,
choices=["extruder", "fixed-target"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should be able to parse directly to SSXType enum here if the string choices match the enum values

@noemifrisina noemifrisina requested a review from d-perl November 10, 2023 17:03
Copy link
Contributor

@d-perl d-perl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you! I realise my comment wasn't very clear, so I made a small change to show what I meant. Please review it and make sure you're ok with it before merging

@noemifrisina noemifrisina merged commit f6c086e into main Nov 13, 2023
16 checks passed
@noemifrisina noemifrisina deleted the 50_choose-detector branch November 13, 2023 09:30
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.

I24: Choose detector in use
2 participants