[AstroPy] Executable Script fitsheader

Peter Dzwig pdzwig at summaventures.com
Wed Sep 11 05:38:54 EDT 2019


I tend to agree, although it is some time since I used Windows as a
serious compute environment, I seem to recall that cmd.exe lacked a lot
of the support that Powershell gives/gave better support.

Should this be reported to astropy as a bug?

Peter Dzwig

On 10/09/2019 22:54, Simon Conseil wrote:
> Hi,
> 
> Usually for this kind of script the shell takes care of the wildcard
> expansion (e.g. with bash/zsh on Linux/MacOS).
> 
> I don't know much about Windows, a quick search seems to show cmd.exe
> does not support wildcard expansion, but Powershell does
> (https://superuser.com/questions/460598/is-there-any-way-to-get-the-windows-cmd-shell-to-expand-wildcard-paths).
> 
> Simon
> 
> 
> Le 10/09/2019 à 19:04, James Dull a écrit :
>> Thanks for all of the input.
>>
>> I should have provided more information. I have the same set-up as
>> described below and get the same error.
>> I am using Windows 10.
>>
>> Jim
>>
>> On Tue, Sep 10, 2019 at 8:44 AM j. vickroy <jgv.home at gmail.com> wrote:
>>
>>> Sorry I do not have an answer, but since there have been no responses,
>>>  here is what I'm seeing:
>>>
>>> C:\Pictures\Astro>fitsheader *.fit
>>> ERROR: [Errno 22] Invalid argument: '*.fit'
>>> [astropy.io.fits.scripts.fitsheader]
>>>
>>> My setup is:
>>>
>>>    - Microsoft Windows 10 fully-updated
>>>    - Python 3.7.3
>>>    - astropy 3.2.1
>>>
>>>
>>> When I have some time, I will look at fitsheader.py to see what the
>>> problem is.
>>>
>>> Regards,
>>> /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
>>>
>>>
>>> _______________________________________________
>>> AstroPy mailing list
>>> AstroPy at python.org
>>> https://mail.python.org/mailman/listinfo/astropy
>>>
>>
>> _______________________________________________
>> AstroPy mailing list
>> AstroPy at python.org
>> https://mail.python.org/mailman/listinfo/astropy
> 
> _______________________________________________
> AstroPy mailing list
> AstroPy at python.org
> https://mail.python.org/mailman/listinfo/astropy
> 

-- 

Dr. Peter Dzwig


More information about the AstroPy mailing list