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

Read in new HLSPs, fix search #1383

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Read in new HLSPs, fix search #1383

wants to merge 4 commits into from

Conversation

christinahedges
Copy link
Collaborator

Right now there are some problems with search which are only becoming apparent as we have more and more data from TESS;

  • Right now if you search for a TIC, KIC or EPIC explicitly it will only show you TESS, Kepler, or K2 data. This is helpful because it does an object query not a cone search. I'm changing this so that it will only do an object query if the ID and author is set
  • I added an author alias for "SPOC" as "TESS" to be inline with "Kepler" and "K2" being the mission product authors
  • I added a mission product column to help people figure out which products are "official"
  • I added start and end times for the datasets as astropy.time.Time objects, and implemented a slightly hacky fix for the incorrect Kepler dates.
  • I split the mission column into mission and sequence so that it's easier for people to narrow down based on a mission or a particular sequence of quarter, campaign, sector etc.

For readers I'm adding in a reader for the new KBONUS HLSP.

This is a weird one, because there are extensions in the file for each quarter, so we need a way to return a LightCurveCollection as well as a LightCurve. I've added a special case for if quarters are passed.

@jorgemarpa is going to write a tutorial on how to use this reader that I can add to the docs.

@christinahedges christinahedges added the 💪 WIP This is a work in progress! label Nov 3, 2023
@christinahedges christinahedges added this to the 2.5 milestone Nov 3, 2023
@christinahedges christinahedges self-assigned this Nov 3, 2023
@scfleming
Copy link
Collaborator

"I added start and end times for the datasets as astropy.time.Time objects, and implemented a slightly hacky fix for the incorrect Kepler dates." --> which Kepler dates are incorrect? If it's a database issue I'd love to see if that's something we could improve at MAST if there are inaccurracies in any fo the reported dates/times.

@christinahedges
Copy link
Collaborator Author

@scfleming it's the t_min and t_max for Kepler that is incorrect. They are the start and end of the mission, not the start and end of the dataset.

@orionlee
Copy link
Collaborator

orionlee commented Nov 3, 2023

Right now if you search for a TIC, KIC or EPIC explicitly it will only show you TESS, Kepler, or K2 data. This is helpful because it does an object query not a cone search.

A related issue: currently, there is a known bug of Search for TIC doing a cone search #1073

I'm changing this so that it will only do an object query if the ID and author is set

What about ID and mission, e.g., search_lightcurve("TIC229810745", mission="TESS")?
Logically, it seems that an object query would suffice, unless some HLSP uses non TESS/Kepler ID as their target name, say, Gaia.


I split the mission column into mission and sequence so that it's easier for people to narrow down based on a mission or a particular sequence of quarter, campaign, sector etc.

The change would be somewhat backward incompatible, e.g., if someone relies on mission to order the results chronologically, the change would break their codes.

If the full backward compatibility is deemed necessary, an alternative is to keep mission as-is, and expose project (TESS/Kepler/K2) and sequence.

Some of the relevant columns from the current SearchResult.table for reference:

   mission     project sequence_number obs_collection  provenance_name 
-------------- ------- --------------- -------------- -----------------
TESS Sector 09    TESS               9           TESS              SPOC
TESS Sector 35    TESS              35           HLSP         TESS-SPOC
TESS Sector 63    TESS              63           HLSP               QLP
TESS Sector 08    TESS               8           HLSP GSFC-ELEANOR-LITE

Copy link
Contributor

@jorgemarpa jorgemarpa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some things I notices will cause problems


def _warn_bonus_file(filename):
with fits.open(filename, lazy_load_hdus=True) as hdulist:
if hdulist[0].header["KEPMAG"] < 12:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will crash when "KEPMAG" is empty for sources not in the KIC. We should also compare to GMAG

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great, is GMAG always set?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, GMAG always has values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 WIP This is a work in progress!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants