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

research how to add JS visualization library for spectra and lightcurves #1

Closed
volodymyrss opened this issue Dec 19, 2023 · 6 comments
Assignees

Comments

@volodymyrss
Copy link
Contributor

volodymyrss commented Dec 19, 2023

see aladinlite, how it opens fits

need to to open astropy fits table, plot it with errorbars

https://www.astro.unige.ch/mmoda/gallery/data-products/1e-11451-6141-isgri-light-curve-61
https://www.astro.unige.ch/mmoda/gallery/data-products/1e-11451-6141-isgri-spectrum-59

this is done with bokeh (link missing)

other options are :
flot
plotly
d3

may reach into previous work of MM

@volodymyrss volodymyrss changed the title research how t oadd JS visualization library for spectra and lightcurves research how to add JS visualization library for spectra and lightcurves Dec 19, 2023
@volodymyrss
Copy link
Contributor Author

@burnout87 could you give a reference to the code about visualization with bokeh/python?

@motame could you put a reference to HEAVENS visualization library for the record?

@francoismg
Copy link
Contributor

Need to discuss metadata needed for the visualization (e.g. units from fits file header)

@volodymyrss
Copy link
Contributor Author

Need to discuss metadata needed for the visualization (e.g. units from fits file header)

If you manage to open fits files from javascript library and access header, we can see how to do this.
Else we can use astropy to convert fits to json, there is a serializer already.

@burnout87
Copy link

@burnout87 could you give a reference to the code about visualization with bokeh/python?

About bokeh, within the dispatcher, it is used mainly here:

https://github.com/oda-hub/dispatcher-app/blob/master/cdci_data_analysis/analysis/plot_tools.py

where the Image, GridPlot and ScatterPlot classes are implemented using bokeh (and js9), providing methods to create the dedicated html.

An example of usage of those classes is within the oda_api:

https://github.com/oda-hub/oda_api/blob/master/oda_api/plot_tools.py

Where for the gallery, bokeh is used for lightcurves and spectra products.

check the get_html_image method for those two classes

@francoismg
Copy link
Contributor

@volodymyrss thanks for the write access, I have pushed the headers data from https://www.astro.unige.ch/mmoda/gallery/sites/default/files/IBIS_lc_1E_1145.1-6141_Eta_Carinae_7790003.0.fits in the "data_sample" folder

@volodymyrss
Copy link
Contributor Author

will split into #3 and #4

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

No branches or pull requests

3 participants