Closed jvines closed 4 years ago
Oh this is #142 again I think. We need to put in an error message to better handle this one.
Can you please remove your ~/.eleanor/metadata directory and try again? It downloads some data behind the scenes to use for the corrections and in this case I think it only got some of them, but thinks all are there and is getting confused and failing.
OK. I did that and now I get
-------------------------------------
AttributeErrorTraceback (most recent call last)
<ipython-input-5-07bdbfe9cc9a> in <module>
----> 1 data = eleanor.TargetData(star, height=15, width=15, bkg_size=31, do_psf=True, do_pca=True)
2
3 q = data.quality == 0
/anaconda3/lib/python3.7/site-packages/eleanor-1.0.3-py3.7.egg/eleanor/targetdata.py in __init__(self, source, height, width, save_postcard, do_pca, do_psf, bkg_size, crowded_field, cal_cadences, try_load, language)
223 self.center_of_mass()
224
--> 225 self.set_header()
226
227
/anaconda3/lib/python3.7/site-packages/eleanor-1.0.3-py3.7.egg/eleanor/targetdata.py in set_header(self)
1280 self.header.append(fits.Card(keyword='BKG_LVL', value=self.bkg_type,
1281 comment='Stage at which background is subtracted'))
-> 1282 self.header.append(fits.Card(keyword='URL', value=self.source_info.ELEANORURL,
1283 comment='URL eleanor files are located at'))
1284
AttributeError: 'Source' object has no attribute 'ELEANORURL'
:(
I'm going to defer to @afeinstein20 here, because I think she was doing some cleaning up in those functions.
Adina, it looks like self.eleanorurl is presently commented out, but is still trying to be recorded in the header. Now that everything is from mast, how should we handle what's recorded here in the FITS header? Maybe just whether it was made with local postcards or ones from MAST, and if MAST then also store self.postcard_path?
Jose, for right now can you please go back one commit ("git checkout 509f90ca8e33d02c4d0db068fc640462eba937ba") and verify that it works on your end from that version?
(Note github seems to be shortening the hash here, at least on my view. If you click on it you can get the full hash.)
@benmontet I reverted back to that hash value (you don't need the full hash for the checkout so everything is OK) and it worked!
Thanks for the help :) I'll keep an eye out for when the issue is fully solved 👍
Perfect! I'll leave this open as a reminder that we need to sort out that header issue. Good luck, and let us know if you run into anything else strange!
Okay I changed around what's stored in the header so this should be sorted moving forward, you should be able to use the latest version from here!
Hi,
Following the example in the documentation I ran:
And got a LinAlgError alongside some warnings. The warnings I think are harmless, but for completion I'll add them as well:
Warnings:
The error traceback is:
I don't know what might be causing this as I have ran the tutorial in the past and it has worked. I tried varying the height, width and bkg_size values to no avail, so any help would be appreciated!
Thank you!