View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

objmasks filename problem

cody wrote on Sep 26, 2012

I am experiencing a strange problem: I have a file that I want to run objmasks on, and it only seems to work if I remove the ".fits" when I type the filename.
So for example, if my file is obs101.fits, then I can only get objmasks to run and produce a mask if I type:
> objmasks obs101
Then the task runs, and the output looks good.

If I instead do:
> objmasks obs101.fits
then nothing happens! It simply returns me to the prompt without outputting anything. This is a problem because I am running objmasks via cl script on a large list of files that I have created with the hselect command. Not all the files in the directory are included, so I unfortunately cannot call objmasks with something like obs*%.fits%% (I did check that this would work though).

Any idea why this is happening, or how I could cut off the .fits extension when calling objmasks? I tried renaming the files without the .fits on the end, but then objmasks doesn't work at all...

Francisco Valdes wrote on Sep 26, 2012

I don't know why this problem occurs. If you are already using a script you can put in a loop to strip the extension on each file name. How you do this depends on how your script is structured. If you would like a solution you could send me your script.

Frank Valdes
valdes@noao.edu

cody wrote on Sep 26, 2012

Thanks, I sent you a PM.

Last post on Sep 26, 2012