View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

question on xdimsum

Guest wrote on Jan 07, 2007

Hello,

I am trying to reduce some images with xdimsum, but I encountered a
problem during xfirstpass: I was marking the reference star manually
through the images (xdshifts), then was asked to select the reference
star, as well as other promising looking stars. After the selection, a
file was generated. As soon as I quit that file, the code crashed with
the following error message:

Log file .stars open
# COL LINE COORDINATES
# R MAG FLUX SKY PEAK E PA ENCLOSED GAUSSIAN
DIRECT
348.81 725.04 348.81 725.04
6.78 11.62 225900. -0.3906 25622. 0.24 60 2.92 2.35
2.26
553.63 714.98 553.63 714.98
6.67 13.32 47026. -2.967 5843. 0.16 55 2.94 2.22
2.22
255.30 497.56 255.30 497.56
6.89 14.14 22158. 20.07 2730. 0.81 12 2.48 2.42
2.30
ERROR on line 213: can not open `' for appending
xdshifts (inlist=@tmp$xfirstpass3958im, refim=dlr2302k_10.0050.sub,
shiftlist=, cradius=5., datamin=INDEF, datamax=INDEF, background=INDEF,
niterate=3, maxshift=5., chkshifts=yes)
xdshifts (inlist=@tmp$xfirstpass3958im, refim=dlr2302k_10.0050.sub,
shiftlist=, cradius=5., datamin=INDEF, datamax=INDEF, background=INDEF,
niterate=3, maxshift=5., chkshifts=yes)
xfirstpass (mode=h)

This actually also happened for the demo data, so I don't think it's
because of my data files. Could you advice how to solve this (I
installed iraf included in the scisoft package; I am using a powerbook
G4 Mac)?

Thanks a lot!

Yen-Ting Lin

Post generated using Mail2Forum (http://www.mail2forum.com)

Mike Fitzpatrick wrote on Jan 07, 2007

I think the error is caused by not specifying a 'shiftlist' output filename. The error message itself it coming from the CL when trying to append to a filename based on the shiftlist param, and from your output this is empty. It doesn't appear that you can use STDOUT as an option so specify the name of a file to create.

-Mike

Yen-Ting Lin wrote on Jan 07, 2007

Hi fitz,

Thanks for your comment. And I know what's causing the trouble now-- If you look at line 49 of xdshifts.cl, it checks to see if the shift list exists; if yes, then it quits. If not, it proceeds, and in this case, the name "tshiftlist" is an empty string (since no shiftlist file is given in xfirstpass). And thus the files exam_lst, align_lst, and stars_lst are called .exam, .align, and .stars, respectively (lines 58-60).

The code then goes on to do its job, until after calculating the relative shifts, it tries to output/append the results to a file (lines 193, 194), which happens to be tshiftlist (still is an empty file, ""). But of course it makes not much sense to append things to "" (hence the error message: "ERROR on line 213: can not open `' for appending"), so cl complained and crashed.

So this is a very strange logic: on the one hand it doesn't allow you to provide a name for the shiftlist, on the other hand it is guaranteed to crash if no name/file is provided. Am I missing something? I didn't have a shiftlist to start with, which is the reason that I need to use the interactive step of xdshifts to generate one.

As a workaround, I commented out the steps in xdshifts and xfirstpass where the existence of the shiftlist is checked, and the codes ran fine. But since this problem didn't happen to others, maybe it's my approach to the xdimsum package that's causing the problem...

Yen-Ting

Last post on Jan 07, 2007