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

Load detectors separately and handle multiple detector banks #83

Closed
SimonHeybrock opened this issue Feb 12, 2024 · 0 comments · Fixed by #119
Closed

Load detectors separately and handle multiple detector banks #83

SimonHeybrock opened this issue Feb 12, 2024 · 0 comments · Fixed by #119
Assignees
Milestone

Comments

@SimonHeybrock
Copy link
Member

SimonHeybrock commented Feb 12, 2024

Loki (and many other instruments) will have multiple detector banks. We need to handle this in a convenient manner. Eventually this will likely also require input from IDS/IS (at least in certain cases), but I believe our current understanding is sufficient to proceed:

  • Multiple banks (NXdetector groups in a Nexus file) will be handled using a param table in Sciline.
    • Note: implementation details may change regarding Sciline and param tables, but this is mostly orthogonal to what we need to do here, i.e., we can proceed).
  • Split loading of monitors and detector data #82 (comment) mentions loading of non-monitor and non-detector data. This will be required in the medium-term future (sample logs, chopper logs, ...), but currently we are not using any of that information. That is, we can essentially ignore this aspect for now, since it can easily be added later.
  • Gather results from all banks once we are in $(Q, \lambda)$ or $Q$, but before normalization, sum (concat if events) them.

Complications, to ignore for now:

  • Beam center. See SANS beam center correction may need to be applied differently #28. Does it apply only to the rear bank in Loki? Are the others fixed enough, with well-known positions.
  • Will we have a different direct-beam for the other banks? This is probably easy to implement, by including direct beam files in the param table, if required

Summary of work to be performed:

  • Implement Load monitors separately from the remainder of the files #99 first.
  • Instead of loading an entire file, load an individual NXdetector.
    • You can assume that all detectors are direct children of NXentry/NXinstrument. The detector names are defined in the workflow, either as a single param DetectorName (when processing a single bank), or as a sciline.ParamTable (or using https://scipp.github.io/sciline/generated/classes/sciline.Pipeline.html#sciline.Pipeline.set_param_series).
    • You can assume that position information is self-contained, i.e., there are no depends_on chains leading outside a detector. We can thus directly use snx.compute_positions on the individual detector.
    • Add a filter to the existing load function such that no detectors are loaded there. This is essential to avoid potential massive overhead from large event-mode detectors.
  • The functions for "extracting" detectors for the loaded data probably need to preserved for supporting legacy NeXus files (ISIS). They should be moved to that submodule if feasible.
  • Add a step for merging intermediate results before performing the normalization. This will require merging the numerator as well as the denominator (the denominator depends on the detector bank via the solid-angle factor). Tracked in Explicit merge / accumulation strategies and customization points #97.
@SimonHeybrock SimonHeybrock added this to the Essentials milestone Feb 19, 2024
@SimonHeybrock SimonHeybrock changed the title Consider how to handle multiple banks Load banks separately and handle multiple banks Feb 26, 2024
@SimonHeybrock SimonHeybrock moved this from Triage to Selected in Development Board Feb 26, 2024
@SimonHeybrock SimonHeybrock changed the title Load banks separately and handle multiple banks Load detectors separately and handle multiple detector banks Feb 26, 2024
@jokasimr jokasimr self-assigned this Mar 11, 2024
@jokasimr jokasimr moved this from Selected to In progress in Development Board Mar 11, 2024
@jokasimr jokasimr removed their assignment Mar 11, 2024
@jokasimr jokasimr moved this from In progress to Selected in Development Board Mar 11, 2024
@SimonHeybrock SimonHeybrock moved this from Selected to Blocked in Development Board Mar 14, 2024
@SimonHeybrock SimonHeybrock moved this from Blocked to In progress in Development Board Apr 2, 2024
@SimonHeybrock SimonHeybrock self-assigned this Apr 2, 2024
@github-project-automation github-project-automation bot moved this from In progress to Done in Development Board Apr 5, 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