-
Notifications
You must be signed in to change notification settings - Fork 74
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
[FEAT] Turning off certain features in plugins #2696
Comments
Thanks for reaching out! There is no easy way right now, except for subclassing and defining your own config (as you suspected). See this test for example: jdaviz/jdaviz/tests/test_app.py Line 22 in 6e08521
I know @bmorris3 been investigating reusing Cubeviz for Roman ramp cubes (different viewer config but same underlying problem conceptually), so maybe he can advise. |
p.s. If you are talking about image cube and wanting to extract spectra from them "in real time," maybe Cubeviz is a better fit for you than Imviz. For instance: https://jdaviz.readthedocs.io/en/latest/cubeviz/plugins.html#spectral-extraction |
@pllim thanks for the explanation, I think I will try this route and see how it goes. ' As far as your second recommendation, I will have a look at it, but the real issue is that X-ray data is typically stored in FITS table data lists of photon events, given how few photons there are compared to longer-wavelength bands. So one then bins up these events into images and/or spectra from these primary data products. But for Cubeviz I think the idea is that you have the spectral cube already. X-ray data is unfortunately a long way away from having enough data that it makes sense to store it in a cube, though maybe creating a virtual in-memory cube for cubeviz is feasible. |
If you just want to remove plugins from the sidebar that aren't relevant, you can do that fairly easily without modifying source code (although note that this isn't technically considered public API and so could break in the future):
|
Jdaviz component
Imviz
What is the problem this feature will solve?
The context: I am thinking about developing a new prototype exposure time calculator for X-ray missions. What I would like to have in this calculator is a way to display images generated from mocks (that we already have the software to make) and extract spectra from those images (that we can already do) that would be displayed in the Jdaviz plugins. After experimenting with Jdaviz it seems like I should be using this to build some components of it and not reinventing the wheel--even though we'd have to manipulate the X-ray data behind the scenes, it would work very nicely.
The issue is that by default plugins like
Imviz
have a lot of options in the menus that would not be useful for such a use case, like catalogs, etc., since the data are mocks. I was wondering if there was an easy way to turn them off--simply to reduce the number of options to what the user expects to find useful. I saw that there are YAML config files in the code base, and that there are methods likeApplication.load_configuration
, but it doesn't look like I can turn off menu / tray items this way with the current API.If there's a way to do it with the current API, great--but if not and there's some way I can do this by subclassing
Imviz
or something else, that would also be fine (more than happy to submit a PR if whatever I come up with ends up being generally useful).Describe the desired outcome
Being able to hide/remove options that are not relevant to the use case.
Additional context
No response
The text was updated successfully, but these errors were encountered: