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

Addressing github issue 1278 #1330

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

isabelangelo
Copy link

Addressing issue #1278 , stitch() now saves all columns from all component lightcurves in the stitched lightcurve. If a column is missing from one of the component lightcurves, all its will be filled with -999. This also helps with saving and reading in .fits files since it preserves relevant columns across Kepler/TESS/simulated lightcurve objects.

lc_vstack = vstack(lcs, join_type="outer", metadata_conflicts="silent")
for col in lc_vstack.columns:
if col not in ['time','flux','flux_err']:
lc_vstack[col] = lc_vstack[col].value.filled(-999)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't love this approach of using -999 as a magic number! What about using something like:

lc_vstack[col].fill_value = np.nan

in the cases when there is missing data?

Copy link
Author

Choose a reason for hiding this comment

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

I definitely agree, we did try that but the problem is that it only works when the column datatype is float, and some of the columns in the lightcurve objects have int datatypes. But hard coding in the -999 didn't feel great either.

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.

None yet

2 participants