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

XRF viewer display to work with new ophyd-async Xspress device #333

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

Conversation

canismarko
Copy link
Contributor

The window has been stripped down. ROI selection has been removed and the window now shows a list of elements with their counts and dead-time %s, along with control, and the individual element spectra.

The x-axis now shows energy instead of bins.

The legend of the plot jumps around in how it's ordered, perhaps in future we can find a way to fix this? For now it seemed tied in with the way the plotting is done and didn't seem like a big enough problem to justify fixing.

It would be nice to restore the onHover behavior from previously: if an element's row is hovered over, only that spectrum is show in the plot.

Things to do before merging:

  • add tests
  • write docs
  • update iconfig_testing.toml
  • flake8, black, and isort
  • Test at the beamline

@canismarko canismarko requested a review from sterbinsky January 7, 2025 19:58
attribute. The number of mcas is determined by passing *elements*
when initializing an object. *elements* can be either an integer,
in which case it represents to number of elements, or an
interator, representing the index of each element.
Copy link
Collaborator

Choose a reason for hiding this comment

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

probable spelling error -> 'interator' should be 'iterator'

_controller: DetectorController
_writer: adcore.ADHDFWriter

def __init__(
self,
prefix: str,
path_provider: PathProvider | None = None,
elements: int | Sequence[int] = 1,
ev_per_bin: float = 10.0,
drv_suffix="det1:",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is eV per bin user adjustable? This is possible for dxp, but maybe not xspress3. I'm not so familiar with the xspress3

_spectrum_channels: Sequence
_selected_mca: int = None
_mca_lower_receiver = None
_mca_upper_receiver = None

_spectra: dict

Copy link
Collaborator

Choose a reason for hiding this comment

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

I've not seen this syntax. What does the colon do?

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.

3 participants