[AstroPy] Re: functional interface for PyFITS?

Joe Harrington jh at oobleck.astro.cornell.edu
Tue Mar 22 11:06:14 CST 2005

> Default should be to check if foo.fits[2] is a valid filename, read it 
> if it is, otherwise read the second extension of foo.fits.

No, that kind of fuzzy-logic behavior is very hard to follow if you're
writing a script and handling error behavior.  What if you have both
foo.fits and foo.fits[2] as filenames, and both have extensions?  How
do you tell which you got, if you weren't sure you had both?  You'd
have to have a relatively complex status variable that knew and
reported all the possible combinations, and you'd have to check it and
process all the possible errors.  Yuk.


More information about the AstroPy mailing list