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

LightCurveCollection.stitch() fails with TableMergeError when the collection has a mix of CDIPS and SPOC lightcurves #1411

Open
orionlee opened this issue Mar 5, 2024 · 0 comments
Assignees

Comments

@orionlee
Copy link
Collaborator

orionlee commented Mar 5, 2024

Problem description

LightCurveCollection.stitch() fails with TableMergeError when the collection has a mix of CDIPS and SPOC lightcurves.

The culprit is that CDIPS lightcurve's quality column is type str while SPOC lightcurve's quality column is of type int.
(The issue would occur when there is a mix of CDIPS and most of the TESS HLSPs as well, as most of them have int type quality.)

The issue is similar to #954: the incompatibility here is different.

Example

import lightkurve as lk

# the tic has CDIPS in sector 11, SPOC in sector 64
sr = lk.search_lightcurve("TIC245486342", mission="TESS", sector=[11, 64])
sr = sr[np.isin(sr.author, ["SPOC", "CDIPS"])]
sr.download_all().stitch()

The error:

TableMergeError: The 'quality' columns have incompatible types: ['int32', 'str32']

Expected behavior

The incompatible columns due to different datatype, e.g., quality here, should be excluded from stitch. A warning should be issued (the behavior of issue #954 fix).

Environment

  • lightkurve version (e.g. 1.0b6): 2.4.2
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

3 participants