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

Change the output format to be very similar to a TESS FFI #20

Merged
merged 11 commits into from
Nov 2, 2018

Conversation

amcody
Copy link
Contributor

@amcody amcody commented Oct 2, 2018

K2mosaic now creates a multi-extension file instead of a single extension image. This should be compatible with TESS FFI format, as well as include the key K2 header keywords. It also allows the user a new option of selecting whether they want background subtracted output images (if available).

To do:
-Figure out why this is so slow!
-Need to pass time keywords to the headers (how?)
-Currently many header keywords are hard coded in. Better to move to a template file?
-Complete image and uncertainty extensions headers
-Decide what to do about WCS, which currently relies on a K2 FFI being stored (AMC doesn't like)

@barentsen when would be a good time to discuss?


### Put tstart/stop and date-obs/end in here! How do we pull in time, and where do we store it??
if self.time is not None:
pass # compute the time values
Copy link
Member

Choose a reason for hiding this comment

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

This will need to be implemented.

@amcody
Copy link
Contributor Author

amcody commented Oct 29, 2018

This pull request is now ready for review, @barentsen! I sent you a sample .fits file on slack- see if you can find any errors in the headers.

@amcody
Copy link
Contributor Author

amcody commented Oct 30, 2018

I fixed a small bug... now let's see if Travis coughs..

@barentsen
Copy link
Member

Sanity check of the times:

Header of https://www.dropbox.com/s/mj1dfk0144raaw0/k2mosaic-c91-ch31-cad125245_wcs.fits says:

DATE-OBS= '2016-04-22T15:02:53.276791Z' / TSTART as UTC calendar date           
DATE-END= '2016-04-22T15:32:18.739675Z' / TSTOP as UTC calendar date

Original TPF says:

> KeplerTargetPixelFile('ref/ktwo200068780-c91_lpd-targ.fits.gz')[2].astropy_time.iso
array(['2016-04-22 15:17:46.080'], dtype='<U23')

Very close, though I don't understand why the latter is not exactly in the middle of DATE-OBS and DATE-END.

@barentsen
Copy link
Member

The comment above is invalid because I was using a TPF from a different channel. Using a TPF from the same channel yields the expected times!

@barentsen
Copy link
Member

This looks great! Thanks for working on this @amcody. Merging in 3 ... 2 ...

@barentsen barentsen changed the title [WIP] Create multi-extension output FITS files including an uncertainty image Change the output format to be very similar to a TESS FFI Nov 2, 2018
@barentsen barentsen merged commit 128b799 into KeplerGO:master Nov 2, 2018
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

Successfully merging this pull request may close these issues.

2 participants