.interact() tpf is blank
See original GitHub issueProblem description
When plotting sector 8 TESS data with ‘interact()’, pixel data does not plot accurately. Potentially due to the change in postage stamp size for sector 8?
Example
import lightkurve
tpf = lightkurve.search_targetpixelfile('L 98-59').download_all()
tpf[2].interact()
# earlier sectors (tpf[0] and tpf[1]) have no issues
Expected behavior
Environment:
- platform (e.g. Linux, OSX, Windows): OSX
- lightkurve version (e.g. 1.0b6): 1.0.0
- installation method (e.g. pip, conda, source): pip
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
TessTargetPixelFile .interact() throws an exception · Issue #333
Using the example alert data on MAST, TessTargetPixelFile works to read the TPF in, but .interact() crashes with the following error message ...
Read more >Using Target Pixel Files with Lightkurve
The target pixel file (TPF) of a star contains an image for each observing cadence, ... We can download this data product using...
Read more >How to use the lightkurve.utils.LightkurveWarning function in ...
To help you get started, we've selected a few lightkurve.utils.LightkurveWarning examples, based on popular ways it is used in public projects.
Read more >Is there a LATTE Alternative for Use on Windows Machines??
Download works fine. If I try plotting the TPF, the pixel-grid appears including the aperture mask, but the flux is 0 i.e. blank....
Read more >New in lightkurve: inspecting pixel data using tpf.interact()
... using tpf.interact(). News article posted on 11 May 2018 by Michael Gully-Santiago. The new lightkurve Python package for Kepler and K2 data...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Good, glad that the screen stretch resolved the problem!
I suspect all TESS Sector 8 targets will exhibit the same screen stretch default appearance. What’s happening behind the scenes, is that lightkurve computes the 1% and 95% percentile across all finite pixel values in the TargetPixelFile.
Sector 8 is apparently an exception, because 1% of the cadences have extremely low values, and these anomalously-low-values are not automatically masked with quality flags.
We could consider increasing the
lo
threshold default to, say, 5%. That threshold might be too high for other, more typical TPFs. We’ve found 1% and 95% to be decent threshold defaults for a wide range of Kepler and TESS data.If you want to over-ride the hardcoded 1% for yourself, you could install the lightkurve developer version alter line 312 of the file
interact.py
, and relaunch your jupyter-notebook.Yes, stretching helps! Thanks, that’s a good tip!
I tested this on ~50 sector 8 targets, and they all have the same issue. I know sector 8 had some spacecraft anomalies, so I guess that’s not too surprising. I can send you an example notebook if that’ll help!