bug-gnuastro
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tutorial PSF subtraction


From: Mohammad Akhlaghi
Subject: Re: Tutorial PSF subtraction
Date: Tue, 10 Jan 2023 16:06:49 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1

Hi Alex,

Thanks a lot for sharing this issue.

Are there any files in your 'outer/stamps/*.fits'?

It looks like the problem originates from the 'imgs=outer/stamps/*.fits' line. Let me explain:

When there are files that match your wildcard pattern ('outer/stamps/*.fits' in this case), the shell will expand the '*' and replace the full names of all matched files. However, when no files match, the shell will just return the raw string (which is what is happening here). You can test this with this simple test:

$ echo "abc" > junk.txt
$ imgs=ju*.txt
$ echo $imgs
junk.txt

$ imgs=JU*.txt
$ echo $imgs
JU*.txt

$ rm junk.txt

The output of the first 'echo $imgs' is the actual names of the files. But the second time we defined 'imgs', we used 'JU' instead of 'ju' (just as an example of a non-matching pattern). Therefore you see that the 'echo $imgs' after the second definition just shows your pattern, and not the file names.

If my guess is right, you are probably not running the command in the proper directory.

I look forward to the result of this test ;-),
Cheers,
Mohammad



reply via email to

[Prev in Thread] Current Thread [Next in Thread]