Welcome to iraf.net Friday, March 29 2024 @ 01:37 PM GMT
grayro |
05/11/2016 05:26PM (Read 2306 times)
|
|
|
Status: offline
Registered: 03/15/2014
Posts: 23
|
Hi,
I am trying to get a cl script to run from the linux command line, with the ultimate goal of running it from a system command in a C program. The name of the script is RWF1b.cl, and it works perfectly in the cl environment. From my reading of IRAF documentation, I understand that one way to do this is to utilize the host cl scripting capability of IRAF. I am using a locally installed iraf with a global login.cl in the .iraf directory under my home directory. I can invoke cl from any directory and run my script successfully.
To convert my script into one that utilizes the host cl scripting capability, I have placed the following lines at the top of that script:
#!/home/grayro/iraf/bin.linux64/ecl.e -f
set home = "/home/grayro/.iraf/"
set imdir = "/home/grayro/.iraf/imdir/grayro/"
set cache = "/home/grayro/.iraf/cache/grayro/"
set uparm = "home/grayro/.iraf/uparm"
set userid = "grayro"
set $IRAFARCH = "linux64"
images
plot
dataio
lists
tv
utilities
noao
vo
imred
digiphot
apphot
ccdred
but when I try to run it, I get the following errors:
ERROR: cannot open `uparm$pipe22101' for writing
"printf ("$task $voclientd = $%s/voclientd\nkeep\n", osfn("vojava$" ..."
line 62: votools$votools.cl
called as: `votools ()'
Error while reading login.cl file - may need to rebuild with mkiraf
Fatal startup error. CL dies.
It seems to be choking when it tries to load vo. I do not understand why it encounters an error while reading the login.cl file. I thought the -f flag on the first line prevented it from looking for a login.cl file. Would you please enlighten me? Or, if there is a better way to go about doing what I want to do, please let me know.
Thanks, Richard
|
|
|
|
fitz |
05/11/2016 06:07PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
As a first guess I'd suggest you not load the VO package unless you plan to use those capabilities. If you do, then you need to change the first line to call the 'vocl.e' binary rather than the older 'ecl.e' that lacks certain features used by the VO package.
Secondly, 'IRAFARCH' is a unix environment variable, the complementary CL variable is 'arch' where the value would be ".linux64" (note the leading dot before the architecture name.
|
|
|
|
grayro |
05/11/2016 06:13PM
|
|
|
Status: offline
Registered: 03/15/2014
Posts: 23
|
Hurray! That did it! Thanks!
Richard
|
|
|
|
grayro |
05/11/2016 06:59PM
|
|
|
Status: offline
Registered: 03/15/2014
Posts: 23
|
Hi,
I ran into another problem, about 15 minutes into the script. The script had just finished combining 10 flat field images, subtracted off a bias and a dark, and then apparently choked on an imstat statement, or possibly an imarith statement: the relevant block is as follows:
files orig/FlatSv*.fit \$this->_split2($m[0]) FlatSv.lis
rfits @FlatSv.lis * flatSv
imcombine flatSv* TMP combine=average reject=avsigclip
imarith TMP "-" BIAS TMP1
imarith TMP1 "-" DARK45s FTMP
imstat("FTMP",fields="midpt",format-) | scan(y)
imarith("FTMP","/",y,"FLATSv")
imdelete TMP
imdelete FTMP
imdelete TMP1
imdelete flatSv*
FTMP was created but not FLATSv. The error message was:
ERROR: cannot open `uparm$pipe22633' for writing
called as: `cl ()'
Error while reading login.cl file - may need to rebuild with mkiraf
Fatal startup error. CL dies.
I don't know what or why it can't open uparm$pipe22633 for writing.
I am currently running the original cl script, and it got past that point without difficulty.
Richard
|
|
|
|
grayro |
05/12/2016 03:13PM
|
|
|
Status: offline
Registered: 03/15/2014
Posts: 23
|
I figured out the problem. I had defined my uparm environment variable incorrectly. It should have been
set uparm = "home$uparm/"
instead of what I had yesterday.
Thanks. Richard
|
|
|
|
| |
|
Content generated in: 0.13 seconds |
|