[AstroPy] Executable Script fitsheader

j. vickroy jgv.home at gmail.com
Tue Sep 10 11:10:09 EDT 2019


As a quick followup ...

line 262 in function print_headers_traditional of 
...\Python\Python37\Lib\site-packages\astropy\io\fits\scripts\fitsheader.py 
is:

for idx, filename in enumerate(args.filename):  # support wildcards

filename, immediately after line 262, is simply "*.fit" which indicates 
args.filename has not been previously expanded if a wildcard has been 
specified.

At least that is the the behavior when running fitsheader.py from the 
C:\Windows\System32\cmd.exe shell on Microsoft Windows 10.

/jimv


On 9/9/2019 4:47:18 PM, "James Dull" <dull4.ja at gmail.com> wrote:

>I would like to extract header information from several hundred fits 
>files and put it into a csv file. I ran across the executable script 
>information fitsheader that appears to do just that. It works perfectly 
>for a single file. However, when I follow the online command for that 
>uses a wildcard so multiple files can be completed in a single pass I 
>get "unrecognized command"
>
>Something similar happens with the other scripts if I use a wildcard.
>
>I feel I'm missing something simple.
>
>The command I'm using is: fitsheader --table ascii.csv *.fits > 
>keywords.csv
>
>thanks
>Jim
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20190910/7570d909/attachment.html>


More information about the AstroPy mailing list