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

adjust representation of different output products #110

Open
volodymyrss opened this issue Sep 7, 2024 · 5 comments
Open

adjust representation of different output products #110

volodymyrss opened this issue Sep 7, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@volodymyrss
Copy link
Member

Following the discussion there, from the comment of @dsavchenko .

The output as produced by the plugin is in most cases structured like the one for the image. I chose this way so that every product type is ingestible by the frontend without additional changes there.
But this leads to misunderstandings, as we see. From showing products list as a table of "Images" to almost useless "download" button for simple text output etc.
We may want to adapt the frontend to better represent different products. Using it then will require rather small changes in the plugin.

@dsavchenko
Copy link
Member

Shouldn't this issue be in the frontend repo?
(What we need here is a follow up)

Also, I'm not sure I have enough experience with frontend js code to be the only one assigned

@volodymyrss
Copy link
Member Author

I thought you'd make changes to methods like here?

Or you meant some other adjustments to the frontend?

The title of this issue is pointing to frontend, I will change.

@volodymyrss volodymyrss changed the title adapt the frontend to better represent different products adjust representation of different output products Sep 7, 2024
@dsavchenko
Copy link
Member

There are three different representations in the frontend depending on the dispatcher response structure (and there is also a dependence from dataproduct name in some cases afair) -- image, lightcurve, spectrum.
Nb2workflow plugin represents most data (apart from lightcurves, we never tested an OGIP spectra there) in the same form as images.
Coordinated changes are needed on both ends to better represent arbitrary dataproduct types.

Anyway, it's better to start from defining API changes/extension. Maybe accompanying issue in the dispatcher to track it is needed.

@ferrigno
Copy link
Contributor

ferrigno commented Jan 21, 2025

Light curve and Images are displayed, only spectrum is missing, we could exploit the oda_api plot_tools implementation here

https://github.com/oda-hub/oda_api/blob/865188e452a2f0e9a671e24fda19fe462a24da30/oda_api/plot_tools.py#L796

@ferrigno ferrigno added the enhancement New feature or request label Jan 21, 2025
@ferrigno ferrigno self-assigned this Jan 21, 2025
@dsavchenko
Copy link
Member

This issue is a bit broader, the initial concern is about the overall API response structure, which is always "image-like" in the plugin.
But we can adapt gradually, of course. That's good that the current implementation, to some extent, works out-of-the box for both images and lightcurves. It still has some code duplication inside, however, with plotting functions both in oda_api.plot tools and in dispatcher. And there is a related unfinished PR which then needs to be integrated with dispatcher/plugin.
Good to have a real use-case for OGIP spectra support with the nb2workflow plugin. Let's build on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants