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

I24 serial: Use DetectorParams in parameter model #708

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

Conversation

noemifrisina
Copy link
Contributor

@noemifrisina noemifrisina commented Dec 10, 2024

This should also take care of the beamcenter calculation.
Closes #684
Closes #647

Needs Dodal#955

Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.93%. Comparing base (48f9299) to head (1d70d06).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #708      +/-   ##
==========================================
+ Coverage   86.89%   86.93%   +0.03%     
==========================================
  Files         102      102              
  Lines        6908     6925      +17     
==========================================
+ Hits         6003     6020      +17     
  Misses        905      905              
Components Coverage Δ
i24 SSX 72.85% <100.00%> (+0.16%) ⬆️
hyperion 96.88% <ø> (ø)
other 94.24% <ø> (ø)

@@ -34,7 +39,9 @@ def _parse_visit(cls, visit: str | Path):

@property
def collection_directory(self) -> Path:
return Path(self.visit) / self.directory
directory = Path(self.visit) / self.directory
Copy link
Contributor

Choose a reason for hiding this comment

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

This property is accessed in 9 different places in production code, I don't think it should be creating the directory.

@rtuck99
Copy link
Contributor

rtuck99 commented Dec 19, 2024

Ok, so I've had a bit of a think, and I think there are a number of problems with DetectorParams which we should address. I've written them up in

I'm reluctant to approve this PR because I think on balance on its own it makes things worse rather than better, in that it spreads usage of DetectorParams without addressing any of its shortcomings, and it also doesn't really use it enough to justify doing so.

I think a better approach would be to address part of DiamondLightSource/dodal#966 relating to the beam_xy_converter, make i24 and hyperion code both better in an incremental fashion.

Copy link
Contributor

@rtuck99 rtuck99 left a comment

Choose a reason for hiding this comment

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

See previous comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants