iraf icon indicating copy to clipboard operation
iraf copied to clipboard

String concatenation with `//` doesn't work with `.fits` files and with `@` list processing

Open dxwayne opened this issue 5 months ago • 11 comments

The error was first encountered with:

!ls -1 *fits > l.l

The l.l file could be called l.txt -- but Unix doesn't care about extensions and l.l is easy to type on an American keyboard.

So now I want to zero subtract a zeromaster.fits file from each original... and make a new file z_<basefilename> using the concatenation sequence of // for files in the list-file (@l.l):

zerocombine @l.l - zeromaster.fits z_//@l.l

but the at-cost (@) breaks this very old common usage pattern. The filename turns up with a Unicode sequence.

I tried with cl and it was broken there too, under pyraf like

cat > foo.cl
imstat z_//@l.l
<eof>

then cl < foo.cl the same error occurs.

Fix:

adding set LC_ALL=en_US.UTF-8 in loginuser.cl, to fix the problem at the user level.

Real question, given the legacy of cl and pyraf being strictly ASCII, should this be added to login.cl so the user does not have to figure out to make a ~/.iraf and come up with a loginuser.cl file?

dxwayne avatar Sep 13 '24 22:09 dxwayne