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

Simplifying access to MAST via Exoplanet Archives #147

Open
evh3rd opened this issue Dec 11, 2017 · 3 comments
Open

Simplifying access to MAST via Exoplanet Archives #147

evh3rd opened this issue Dec 11, 2017 · 3 comments

Comments

@evh3rd
Copy link

evh3rd commented Dec 11, 2017

Currently light curve files are specified by filename. I have been exploring Dan Foreman-Mackey's http://dfm.io/kplr/, which provides a way to look up light curves via the NASA Exoplanet Archive. For example, curves can be accessed via Kepler name, KIC, and KOI. The retrieved light curves are stored in structure rooted at a location defined by environment variable with directories for light curves from each KIC under it. Caching is supported (with a clobber flag to supported replacing a bad file).

I would like to see something like this in pyke and would be willing to build something based on kplr for it. Flags like --koi --kic --kepname would cause the current filename argument to be interpreted differently. Support quarters would be provided too.

@barentsen
Copy link
Member

@evh3rd Thank you for the feedback, I fully agree that PyKE needs to be able to automatically retrieve data by star id (name, KIC, EPIC) or planet id (name, KOI). A while ago we looked into adding klpr as a dependency, but we ended up deciding that we'd rather want to support and maintain it natively in PyKE because kplr's API is rather focused on planets and this really deserves to be a carefully-crafted core feature of PyKE.

I think the first step is to add support for data retrieval to our band new API, i.e. I imagine we may want to add the following two static methods:
KeplerTargetPixelFile.from_archive(name=..., kic=..., epic=..., koi=...)
KeplerLightCurve.from_archive()

We haven't done any work on this, and happily take pull requests!

@barentsen
Copy link
Member

I must add that this function (or perhaps a more general DataArchive class) will want to wrap the MAST API so that pixel files and lighcurves can also be obtained by channel, by campaign, by time range, etc.

The MAST API docs are here: https://archive.stsci.edu/vo/mast_services.html

Though we could conceivably start with only supporting KIC and EPIC IDs, which will be more trivial to implement.

@evh3rd
Copy link
Author

evh3rd commented Dec 13, 2017

I can adapt the code from kplr that accesses MAST to do the whole thing. It retrieves the webpage and parses it. I assume that it is front end for a database, but I doubt that I can access that directly. I will look into what information is available about TESS to see how close I can make this to being TESS ready. When I get a chance, I will put together a document describing the interface I plan to implement and the general design. I like the idea of the DataArchive class. My plan would be to call it and pass the path to the cached data file(s) to the existing code, which should not be aware of the front end.

Is there a TESS Instrument Handbook analogous to the Kepler Instrument Handbook?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants