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

Run beam-center finding on current run instead of hard-coding to SampleRun #62

Closed
SimonHeybrock opened this issue Jan 30, 2024 · 3 comments · Fixed by #153
Closed

Run beam-center finding on current run instead of hard-coding to SampleRun #62

SimonHeybrock opened this issue Jan 30, 2024 · 3 comments · Fixed by #153
Assignees

Comments

@SimonHeybrock
Copy link
Member

SimonHeybrock commented Jan 30, 2024

Current implementation:

def beam_center_from_iofq(
data: MaskedData[SampleRun],
graph: ElasticCoordTransformGraph,
wavelength_bins: WavelengthBins,
norm: NormWavelengthTerm[SampleRun],
q_bins: BeamCenterFinderQBins,
transform: LabFrameTransform[SampleRun],
pixel_shape: DetectorPixelShape[SampleRun],
minimizer: Optional[BeamCenterFinderMinimizer],
tolerance: Optional[BeamCenterFinderTolerance],
) -> BeamCenter:

and

def beam_center_from_center_of_mass(
data: MaskedData[SampleRun],
graph: ElasticCoordTransformGraph,
) -> BeamCenter:

Should we change this to return BeamCenter[RunType] and replace SampleRun -> RunType everywhere?

Points to consider:

  • We still want to be able to set the value of the beam center by hand. This would be more complicated if we had to do it for all possible run times. It would be easy to forget some of the run types, leading to inconsistent result.
  • We might want to reduce a run that has no sample run. Could be solved by setting beam center by hand.
@nvaytet
Copy link
Member

nvaytet commented Jan 31, 2024

Does this mean that you would compute a beam center for SampleRun and BackgroundRun?
Could it be difficult to compute a reliable beam center on a background run if the signal is weak/noisy? I think typically the background run is recorded for less time than the sample run?

@SimonHeybrock
Copy link
Member Author

According to the scientists they would typically compute the beam center once, instead of doing it all the time. But maybe this is just because it used to be so slow using the old software?

@SimonHeybrock
Copy link
Member Author

I believe this is no longer relevant, will be closed by #153.

@github-project-automation github-project-automation bot moved this from In progress to Done in Development Board Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants