barentsen / dave

Discovery And Vetting of K2 Exoplanets
MIT License
6 stars 3 forks source link

File I/O tries to get C6 target from C3 #9

Closed JeffLCoughlin closed 8 years ago

JeffLCoughlin commented 8 years ago

I went to run one of our C6 PCs (212394689), after doing a git pull just now, via the normal

from dave.pipeline import main cfg=main.loadMyConfiguration() clip = main.runOne(212394689,cfg)

I get the error:

File http://archive.stsci.edu/pub/k2/target_pixel_files/c3/212300000/94000/ktwo212394689-c03_lpd-targ.fits.gz previously returned 404

/home/jeff/KeplerJob/DAVE/GIT/dave/fileio/mastio.py(35)getData() -> raise IOError("File %s previously returned 404" %(remoteUrl))

Looks like it's trying to pull from C3 instead of C6 at MAST. I poked around a bit but couldn't quite figure out where it was getting campaign information from.

More debug: 31 if not forceDownload: 32 if os.path.exists(localUrl): 33 isEmpty = os.stat(localUrl)[6]==0 34 if isEmpty: 35 -> raise IOError("File %s previously returned 404" %(remoteUrl))

fergalm commented 8 years ago

Try

from dave.pipeline import main
cfg=main.loadMyConfiguration()
cfg['campaign'] = 3
clip = main.runOne(212394689,cfg)

Storing the campaign number in the clip is a bit cludgy, and I'm open to suggestions for improvement. Inferring the campaign from the epic is a non-runner because later fields overlap and you it's possible to observe the same epic in two campaigns.

JeffLCoughlin commented 8 years ago

yea nice, cfg['campaign'] = 6 works. Thanks.

mrtommyb commented 8 years ago

Do you want me to write an EPIC to campaign converter? This would make the default campaign number redundant.

On Fri, Mar 4, 2016, 11:50 AM JeffLCoughlin notifications@github.com wrote:

yea nice, cfg['campaign'] = 6 works. Thanks.

— Reply to this email directly or view it on GitHub https://github.com/barentsen/dave/issues/9#issuecomment-192437522.

fergalm commented 8 years ago

What would it do if the same epic is observed in two campaigns? On Mar 6, 2016 10:14 AM, "Tom Barclay" notifications@github.com wrote:

Do you want me to write an EPIC to campaign converter? This would make the default campaign number redundant.

On Fri, Mar 4, 2016, 11:50 AM JeffLCoughlin notifications@github.com wrote:

yea nice, cfg['campaign'] = 6 works. Thanks.

— Reply to this email directly or view it on GitHub https://github.com/barentsen/dave/issues/9#issuecomment-192437522.

— Reply to this email directly or view it on GitHub https://github.com/barentsen/dave/issues/9#issuecomment-192952885.

mrtommyb commented 8 years ago

Freak out. Freak out

fergalm commented 8 years ago

Not the worst thing it could do:

JeffLCoughlin commented 8 years ago

I need to remember that gif.

I'd say if you did write one Tom, for now just select the lowest-number campaign. If there becomes a significant number of targets that we want to search in the future, we can write a stitcher to combine multiple campaigns.

mustaric commented 8 years ago

In general, I don't think this is a high priority problem to solve. For the once off cases, it would be great. But when running thousands of these, they will all be from the same campaign and we will remember to set the value in the clip. Maybe a better warning about why we are not finding data would be helpful.
Can serveTask handle reading in more than one campaign's worth of data?