GBTAmmoniaSurvey / GAS

observing scripts and files related to the GBT Ammonia Survey (GAS, PI: Jaime E Pineda & Rachel Friesen)
MIT License
6 stars 13 forks source link

BUGFIX: corrupted FITS file #55 #108

Closed jpinedaf closed 8 years ago

jpinedaf commented 8 years ago

Brute force attempt to check the presence of corrupted FITS files. I could not find a simple way to check the validity of the file. This BUGFIX loops over all files and if it fails in opening any of them then it removes it from the filelist

keflavich commented 8 years ago

:+1: this is a good catch-all for corrupted files. It would probably be good to note somewhere (this issue?) if any corrupted files are found and what corrupted them, if it is known.

low-sky commented 8 years ago

I'm just wondering if it's an sdfits fill issue and we can recover the actual scans.

jpinedaf commented 8 years ago

I will run the gbtpipeline manually on this scan/feed to see if the filled data is also corrupted.

@keflavich At this moment we are not storing the warning... is there a simple way to redirect std.out into warnings.log? I did see that this could be done for the logger

logging.basicConfig(filename='example.log',level=logging.DEBUG)

but I could not find it for warning, or are they related?

keflavich commented 8 years ago

You could just replace the warnings.warn with logging.basicConfig(filename='example.log',level=logging.WARN). There might be another approach, but I don't have it handy.