Cannot write to unmasked output
See original GitHub issueProblem description
When trying to flatten a lightcurve I have just downloaded, I get
TypeError: cannot write to unmasked output
I have tried passing the argument mask=np.zeros([len(lc.time)], dtype=bool)
to see if it would do anything but the same happens.
Example
import lightkurve as lk
import matplotlib.pyplot as plt
import numpy as np
search_results = lk.search_lightcurve("HD 39091", mission="TESS", exptime="short", sector=39)
lc = search_results.download()
lc_f = lc.flatten(window_length=901))
Expected behavior
Get a flattened lightcurve.
Environment
- platform (e.g. Linux, OSX, Windows): Linux, Ubuntu 21.04
- lightkurve version (e.g. 1.0b6): 2.0.11
- installation method (e.g. pip, conda, source): pip
EDIT: Even more weird is that this issue happens only on one computer but not on a different one. I’ve tried uninstalling lightkurve and reinstalling and the same happens.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Source code for astropy.utils.masked.core
The result will be a a subclass of the type of ``data``. mask ... d is not None: raise TypeError("cannot write to unmasked...
Read more >All masked columns are incompatible with writing to votable ...
Here's what I found after a little investigation: Given that masked values are changed to some null value when they are output to...
Read more >Why masked arrays seems to be smaller compared to ...
What I am trying to understand if the masked array consume a lot more memory compared to the unmasked array. – G M....
Read more >Unmasking a service doesn't work if it masked using MCO
Cause: systemd units are only cleaned up when completely removed Consequence: systemd units cannot be unmasked, because masks are not removed unless the ......
Read more >systemd: How to unmask a service whose unit file is empty?
A service unit that is empty (0 bytes) will be parsed by systemd as masked. While systemctl mask <unit> works by symlinking the...
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
Likewise, I am also able to run the CBVCorrector example posted by @astrobel above with Lightkurve v2.1.1. (This is of course consistent with @astrobel’s own findings.)
I am going to close this issue because it looks like the issues reported here have been resolved in Lightkurve v2.1.1. I do encourage anyone who encounters these errors with v2.1.1 or later to comment below or open a new issue.
As a reminder, you can upgrade Lightkurve using:
And you can check the version number as follows:
Update!! Fixed this by running an update: it works just fine with astropy-5.0.3 and lightkurve-2.1.1.