find out what version of a package is running?
Ann wrote on Mar 20, 2009
We're trying, with limited success, to upgrade to a new version of mscred. Is there an easy way, upon starting IRAF and loading mscred, to get IRAF to tell us what version of mscred it's finding, and where in the directory structure it's looking when it loads the package?
Thus far we've only been able to try running the command (setinstr('','','instrmsc',rev-) that's giving us a problem; this gives a run of errors, including one that says "mscred.version = "V4.8: December 30, 2003." This would be simpler if, as we troubleshoot the installation, we could start up IRAF and issue a command to get it to share this info with us. Any help would be greatly appreciated!
It appears that "version" is one of the parameters for mscred, and I'm assuming it would load up differently if we had the 4.9 version installed -- hopefully that thinking is correct!
-- Ann
Thus far we've only been able to try running the command (setinstr('','','instrmsc',rev-) that's giving us a problem; this gives a run of errors, including one that says "mscred.version = "V4.8: December 30, 2003." This would be simpler if, as we troubleshoot the installation, we could start up IRAF and issue a command to get it to share this info with us. Any help would be greatly appreciated!
It appears that "version" is one of the parameters for mscred, and I'm assuming it would load up differently if we had the 4.9 version installed -- hopefully that thinking is correct!
-- Ann
Mike Fitzpatrick wrote on Mar 20, 2009
Try "show mscred" to get the path to the package being loaded. This value is set in the hlib$extern.pkg file but can be overridden in your login.cl/loginuser.cl -- either way this should be the package that gets loaded when you type 'mscred'.
Note that the 'version' parameter is simply documentation and not a standard thing for packages, changing the value won't change the package being loaded. As a parameter though, you might also try "cl> unlearn mscred" to be sure you're getting the value from the package and not an old version from the uparm directory.
If you still have problems, please post the errors you are getting from the SETINSTR command.
-Mike
Note that the 'version' parameter is simply documentation and not a standard thing for packages, changing the value won't change the package being loaded. As a parameter though, you might also try "cl> unlearn mscred" to be sure you're getting the value from the package and not an old version from the uparm directory.
If you still have problems, please post the errors you are getting from the SETINSTR command.
-Mike
Ann wrote on Mar 20, 2009
Mike,
OK, that helped -- the directory (/usr/local/iraf/extern/mscred) seems to match up to where we've installed the update.
I was trying to run a script to help me set up instrument parameters and then run ccdproc to do some basic preprocessing to a set of images from the VATT. The script crashed, so now I'm trying to run the commands one at a time. Here's what I do upon starting IRAF, and what I get:
**********
ms> show mscred
/usr/local/iraf/extern/mscred/
ms> mscred
ms> setinstr.site=""
ms> setinstr.dir="home$"
ms> setinstr('','','instrmsc',rev-)
** Syntax error
**: mscred.pixeltype = "real real"
^
** Syntax error
**: mscred.verbose = yes
^
** Syntax error
**: mscred.logfile = "logfile"
^
** Syntax error
**: mscred.plotfile = ""
^
** Syntax error
**: mscred.backup = ""
^
** Syntax error
**: mscred.bkuproot = ""
^
** Syntax error
**: mscred.instrument = ""
^
** Syntax error
**: mscred.ampfile = "amps"
^
** Syntax error
**: mscred.ssfile = "subsets"
^
** Syntax error
**: mscred.im_bufsize = 0.065536
^
** Syntax error
**: mscred.graphics = "stdgraph"
^
** Syntax error
**: mscred.cursor = ""
^
** Syntax error
**: mscred.version = "V4.8: December 30, 2003"
^
** Syntax error
**: mscred.$nargs = 0
^
**:
^
ERROR: syntax error
cl ()
setinstrument (site=, telescope=, instrument=instrmsc, review=no)
ms>
**********
In my $home directory, I have a file called instrmsc.dat, which looks OK to me; the only lines that aren't commented out are as follows:
exptime EXPTIME
imagetyp IMAGETYP
#subset TELFILTE
subset FILTER
I'll check to make sure those "translations" between IRAF and the header match up, but otherwise I'm at a loss!
-- Ann
OK, that helped -- the directory (/usr/local/iraf/extern/mscred) seems to match up to where we've installed the update.
I was trying to run a script to help me set up instrument parameters and then run ccdproc to do some basic preprocessing to a set of images from the VATT. The script crashed, so now I'm trying to run the commands one at a time. Here's what I do upon starting IRAF, and what I get:
**********
ms> show mscred
/usr/local/iraf/extern/mscred/
ms> mscred
ms> setinstr.site=""
ms> setinstr.dir="home$"
ms> setinstr('','','instrmsc',rev-)
** Syntax error
**: mscred.pixeltype = "real real"
^
** Syntax error
**: mscred.verbose = yes
^
** Syntax error
**: mscred.logfile = "logfile"
^
** Syntax error
**: mscred.plotfile = ""
^
** Syntax error
**: mscred.backup = ""
^
** Syntax error
**: mscred.bkuproot = ""
^
** Syntax error
**: mscred.instrument = ""
^
** Syntax error
**: mscred.ampfile = "amps"
^
** Syntax error
**: mscred.ssfile = "subsets"
^
** Syntax error
**: mscred.im_bufsize = 0.065536
^
** Syntax error
**: mscred.graphics = "stdgraph"
^
** Syntax error
**: mscred.cursor = ""
^
** Syntax error
**: mscred.version = "V4.8: December 30, 2003"
^
** Syntax error
**: mscred.$nargs = 0
^
**:
^
ERROR: syntax error
cl ()
setinstrument (site=, telescope=, instrument=instrmsc, review=no)
ms>
**********
In my $home directory, I have a file called instrmsc.dat, which looks OK to me; the only lines that aren't commented out are as follows:
exptime EXPTIME
imagetyp IMAGETYP
#subset TELFILTE
subset FILTER
I'll check to make sure those "translations" between IRAF and the header match up, but otherwise I'm at a loss!
-- Ann
Mike Fitzpatrick wrote on Mar 20, 2009
Try
This will reset any strange parameters, be sure the MSCRED package is loaded first so you unlearn that version of the script and not the one from the IMRED package. You can type "which setinst" to print the package name containing the task you're actually using. Using your dat file, everything seems to work for me (w/ mscred v4.9, the script itself hasn't change in a long while so v4.8 should be the same).
-Mike
cl> unlearn setinstrumentThis will reset any strange parameters, be sure the MSCRED package is loaded first so you unlearn that version of the script and not the one from the IMRED package. You can type "which setinst" to print the package name containing the task you're actually using. Using your dat file, everything seems to work for me (w/ mscred v4.9, the script itself hasn't change in a long while so v4.8 should be the same).
-Mike
Ann wrote on Mar 20, 2009
Mike,
The unlearn didn't help (I also got an error telling me that "which" isn't found, but I don't think that's a big deal).
But I think I may have caught the problem, though I don't know why it's a problem. I also have a file called instrmsc.cl in the same directory, but when I moved it, setting the instrument seemed to work fine. The next step, though, doesn't work. I think that's because instrmsc.cl is meant to set some parameters for ccdproc, which I then apply to a list of fits file. instrmsc.cl looks like:
*************************************
mscred.pixeltype = "real real"
mscred.verbose = yes
mscred.logfile = "logfile"
mscred.plotfile = ""
mscred.backup = ""
mscred.bkuproot = ""
mscred.instrument = ""
mscred.ampfile = "amps"
mscred.ssfile = "subsets"
mscred.im_bufsize = 0.065536
mscred.graphics = "stdgraph"
mscred.cursor = ""
mscred.version = "V4.8: December 30, 2003"
mscred.$nargs = 0
********************************************
It also goes through setting all the ccdproc parameters. I tried running this cl script first, the idea being I could just rename it so that the filenames wouldn't confuse setinstrument, but then I get basically the same syntax error.
Is setinstrument perhaps running the .cl file, rather than just checking the .dat file, and that's why I get the syntax error with it but not when I delete it? I've never used setinstrument before, so I'm not sure how it functions.
-- Ann
The unlearn didn't help (I also got an error telling me that "which" isn't found, but I don't think that's a big deal).
But I think I may have caught the problem, though I don't know why it's a problem. I also have a file called instrmsc.cl in the same directory, but when I moved it, setting the instrument seemed to work fine. The next step, though, doesn't work. I think that's because instrmsc.cl is meant to set some parameters for ccdproc, which I then apply to a list of fits file. instrmsc.cl looks like:
*************************************
mscred.pixeltype = "real real"
mscred.verbose = yes
mscred.logfile = "logfile"
mscred.plotfile = ""
mscred.backup = ""
mscred.bkuproot = ""
mscred.instrument = ""
mscred.ampfile = "amps"
mscred.ssfile = "subsets"
mscred.im_bufsize = 0.065536
mscred.graphics = "stdgraph"
mscred.cursor = ""
mscred.version = "V4.8: December 30, 2003"
mscred.$nargs = 0
********************************************
It also goes through setting all the ccdproc parameters. I tried running this cl script first, the idea being I could just rename it so that the filenames wouldn't confuse setinstrument, but then I get basically the same syntax error.
Is setinstrument perhaps running the .cl file, rather than just checking the .dat file, and that's why I get the syntax error with it but not when I delete it? I've never used setinstrument before, so I'm not sure how it functions.
-- Ann
Ann wrote on Mar 20, 2009
Mike,
As an experiment, I tried running the individual commands in the instrmsc.cl file on the IRAF command line, one by one, and none of them gave me a syntax error that way. Perhaps I need to edit the cl file?
By the way, thanks so much for your help and attention. I'm brand new at IRAF, trying to reduce some images that we need before a new observing run next week, and noone else in my group has experience reducing mosaic data. You're rescuing me from a very bad weekend!
-- Ann
As an experiment, I tried running the individual commands in the instrmsc.cl file on the IRAF command line, one by one, and none of them gave me a syntax error that way. Perhaps I need to edit the cl file?
By the way, thanks so much for your help and attention. I'm brand new at IRAF, trying to reduce some images that we need before a new observing run next week, and noone else in my group has experience reducing mosaic data. You're rescuing me from a very bad weekend!
-- Ann
Mike Fitzpatrick wrote on Mar 20, 2009
The instrmsc.cl file is the instrument setup file and is supposed to be there. I can reproduce your problem only if that file has lines that end in "\r\n" instead of just "\n".
Some text editors will add the CR '\r' automatically, or e.g. copying from a windows machine is a common way for this to happen. In any case, if you were to just cut-n-paste from this forum and use say 'vi' to rewrie the file the problem should go away. To do it in iraf you could do something like
-Mike
Some text editors will add the CR '\r' automatically, or e.g. copying from a windows machine is a common way for this to happen. In any case, if you were to just cut-n-paste from this forum and use say 'vi' to rewrie the file the problem should go away. To do it in iraf you could do something like
cl> util
cl> translit instrmsc.cl '\\r' '' delete+ > tmp
cl> move tmp instrmsc.cl
-Mike
Ann wrote on Mar 20, 2009
That did it! Thanks again!
-- Ann
-- Ann
Last post on Mar 20, 2009