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

using lcviz for non Kepler or Tess data #66

Closed
eggulbahar opened this issue Nov 30, 2023 · 5 comments
Closed

using lcviz for non Kepler or Tess data #66

eggulbahar opened this issue Nov 30, 2023 · 5 comments

Comments

@eggulbahar
Copy link

Hello,
I have been very interested in exploring the interactive plotting opportunity lcviz offers for displaying light curves, however no matter how much I looked and tried it myself I could not use it for my own fits file which is XMM-Newton data and not Kepler nor Tess. I saw that at the page it is mentioned that lcviz is not limited to the use of Kepler and Tess, however I could not find any guidelines nor figure it out myself. At the current stage of it, is it possible to open our custom files without using lightkurve, or is this something under development?
Many thanks :)

@kecnry
Copy link
Member

kecnry commented Nov 30, 2023

lcviz depends strongly on using a lightkurve object under-the-hood, but if there isn't an automatic parser for your data, you should be able to parse it externally manually and then pass arrays directly to lightkurve before loading into lcviz. If that gives you any problems with your data, please do let us know and we can try to fix it.

We are hoping to do an official first release soon, but just note that there may be some API breaking changes between now and then. If you have any suggestions for improvements, let us know!

@eggulbahar
Copy link
Author

Dear Kyle,
Thank you for the help. I have managed to find a way to plot XMM-Newton datafile using lcviz by modifying the read_generic_lightcurve() function of lightkurve, which I can share if it is of interest.
For the purposes of x-ray data analysis to have further interactivity, we would love to be able to get the time ranges for subset selections either printed on the notebook, or just being able to in general call those x-range values for specifically selected subsets on the plot, to be used later on for spectrum plotting. I was wondering if there is any way we could achieve that?
Many thanks!

@kecnry
Copy link
Member

kecnry commented Dec 21, 2023

Fantastic - glad to hear that you got it working and you're finding lcviz useful! If you think your changes are general and useful to be added to lightkurve, please consider opening a PR there. Otherwise, if you want to post a snippet here, someone might find that helpful if they want to try something similar on their end in the future.

Access to subsets from the public API doesn't exist quite yet, but you can call internal methods (this is read-only, so safe to do so... the output just isn't convenient and the API is subject to change without deprecation, etc): lcviz.app.get_subsets(). To access the bounds of the first sub-component of the first subset, for example, you could do lcviz.app.get_subsets()['Subset 1'][0]['region'].value.

Hope this helps!

@eggulbahar
Copy link
Author

Thank you for the response, I have tried you suggestion and it works! Will there be a public API in the near future to access the subsets, as we would like to make this a permanent part of the jupyter notebook threads used for xmm-sas analysis?
Many thanks.

@kecnry
Copy link
Member

kecnry commented Dec 26, 2023

Probably not in the immediate future, but its definitely in our plans (for jdaviz, which will then be adopted here as well). I'll close this issue since it seems the lightkurve workaround is doing the trick for you, and open a new one to track that (feel free to subscribe to it). I also opened the discussion tab on the repo in case you have any suggestions or questions that don't fall under "issues".

@kecnry kecnry closed this as completed Dec 26, 2023
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

2 participants