bug-gnuastro
[Top][All Lists]
Advanced

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

Re: Tutorial PSF subtraction


From: Alejandro Serrano Borlaff
Subject: Re: Tutorial PSF subtraction
Date: Tue, 10 Jan 2023 08:36:41 -0800

Hi Mohammad! 

Thanks for pointing out that quick test. I just checked, and the files are definitely there.

(base) aborlaff@chispas PSF_TUTORIAL % ls              
flat jplus-dr2 outer label psf_tutorial.sh

(base) aborlaff@chispas PSF_TUTORIAL % ls outer/stamps/*.fits
outer/stamps/67510-1.fits outer/stamps/67510-5.fits
outer/stamps/67510-2.fits outer/stamps/67510-6.fits
outer/stamps/67510-3.fits outer/stamps/67510-7.fits
outer/stamps/67510-4.fits outer/stamps/67510-8.fits

(base) aborlaff@chispas PSF_TUTORIAL % imgs=outer/stamps/*.fits

(base) aborlaff@chispas PSF_TUTORIAL % echo $imgs
outer/stamps/*.fits

Just to mention, I am running this on MacOS Monterey. Do you think that there might be a different behavior in Mac?

Alex


El mar, 10 ene 2023 a las 7:06, Mohammad Akhlaghi (<mohammad@akhlaghi.org>) escribió:
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


--
==================================================================
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/Borlaff
Twitter: @asborlaff
==================================================================

reply via email to

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