Sorry for the follow-up Mohammad,
While $imgs now contains the list of files, it seems that the stored variable cannot be correctly interpreted by astarithmetic:
(astro) aborlaff@chispas PSF_TUTORIAL % imgs=$(ls outer/stamps/*.fits)
(astro) aborlaff@chispas PSF_TUTORIAL % echo $imgs
outer/stamps/67510-1.fits
outer/stamps/67510-2.fits
outer/stamps/67510-3.fits
outer/stamps/67510-4.fits
outer/stamps/67510-5.fits
outer/stamps/67510-6.fits
outer/stamps/67510-7.fits
outer/stamps/67510-8.fits
(astro) aborlaff@chispas PSF_TUTORIAL % astarithmetic $imgs $numimgs 3 0.2 sigclip-mean -g1 --output=outer/stack.fits --wcsfile=none
FITSIO status = 104: could not open the named file
failed to find or open the following file: (ffopen)
outer/stamps/67510-1.fits
outer/stamps/67510-2.fits
outer/stamps/67510-3.fits
ou
ter/stamps/67510-4.fits
outer/stamps/67510-5.fits
outer/stamps/67510-6.fits
oute
r/stamps/67510-7.fits
outer/stamps/67510-8.fits[1#]
astarithmetic: opening the given extension/HDU in the given file
It is my impression that the program interprets the whole string as a single file, which is a strange behavior.
Best,
Alex
==================================================================
Ex Luna, Scientia
Alejandro S. Borlaff, PhD - NASA / BAERI Researcher
NASA Space Science and Astrobiology Division (Code ST)
NASA Ames Research Center, N245-6, Moffett Field, California (94035) USA
Webpage :
https://borlaff.github.io/GitHub:
https://github.com/BorlaffTwitter: @asborlaff
==================================================================