View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

Another problem with imalign

Guest wrote on Jun 19, 2006

Hi,

I know that there is lots of answers to problems connecting to imalign, but I couldn't find just similar to mine.

I have successfully used before imalign, but this is new problem that I haven't solved (with tens of other :).

About the problem. Imcentering goes fine, but imshift somehow gives this error:

# Shifting images:

Killing IRAF task `imshift'
Traceback (innermost last):
File "<CL script CL1>", line 1, in ?
iraf.imalign(_save=1)
File "<CL script immatch.imalign>", line 126, in imalign
boundary_type = Vars.boundary_type, constant = Vars.constant)
IrafError: Error running IRAF task imshift
IRAF task terminated abnormally
ERROR (2, "The number of input images and shifts are not the same.")

Input and output images are in two lists and there is similar ammount of entrys in files, so that isn't the problem. Triming is disabled.

Any solutions?

-Juho Pekka Vehviläinen

Mike Fitzpatrick wrote on Jun 19, 2006

ERROR (2, "The number of input images and shifts are not the same.")


The complaint isn't about the number of input vs output images, it is that you have a different number of images in your input list than the initial guesses in your 'shifts' file, e.g. 5 images in the list but only 3 initial shifts. Write back if I've missed the point.

Cheers,
-Mike

moppi wrote on Jun 19, 2006

Actually I don't use shifts-file at all.

I have in this set 250 images and totally thousands of images so, I don't want to write shifts manually to all of them. Shifts-file is not required I suppose, because I have never used that?

-Juho Pekka Vehviläinen

moppi wrote on Jun 19, 2006

I found source of problem, but still no solution for this.

Imcentering gives this error on cople of images:

Warning: zero marginal vector
Warning: no sources centered in image.fit

After excluding those files from lists it works. Imcentering doesn't give shifts for thous files, which give errors and so in imagelist file and generated shifts differ.

But why imcentering gives that error, anyone? I didn't find anything wrong when I examined those not working images.

-Juho Pekka Vehviläinen

Mike Fitzpatrick wrote on Jun 19, 2006

What are the 'lower' and 'upper' parameters you're using? These are used to determine the threshold level for detecting objects and if set too restrictively may be excluding real data. The IMALIGN task should probably be changed to catch this case, but let me know if tweaking the parameters doesn't help.

Cheers,
-Mike

moppi wrote on Jun 19, 2006

I solved the problem while ago. Error with imcentering was corrected when I increased value of boxsize. I suppose this won't effect to accuracy of aligning. I haven't noticed any inaccuracy yet. Frames which have several cosmic rays, I just discard. As I said earlier I have thousands of pictures totally (one or two bad frames out of hudred won't matter).

Also values of background and lower should be set carefully I noticed, so check those.

-Juho Pekka Vehviläinen

moppi wrote on Jun 19, 2006

Yet more interesting problems with IRAF imalign arises.

I'm using version 2.12.2a-EXPORT of iraf with PyRAF 1.2.1 (2006Mar24) and Python 2.3.5.

I haven't made any changes to iraf that I know. Still, when trying to align one image set it gives this error:

Killing IRAF task `imcentroid'
Traceback (innermost last):
File "<CL script CL1>", line 1, in ?
iraf.imalign(_save=1)
File "<CL script immatch.imalign>", line 105, in imalign
verbose = Vars.verbose, Stderr=Vars.tmpfile)
IrafError: Error running IRAF task imcentroid
IRAF task terminated abnormally
ERROR (501, "segmentation violation")

imalign doesn't print anything else, just crashes like that. Image lists and coordinate files etc. are similar to those I have used successfully before, however it seems that something has changed.

Any ideas what's wrong and how to fix it?

Thanks, Juho Pekka Vehviläinen

Mike Fitzpatrick wrote on Jun 19, 2006

The traceback means the IMCENTROID task died with a segmentation violation (IMALIGN is a script that calls this task). One thing to check is for a typo in the coords file, e.g. a comma instead of a decimal point. This caused a similar error in the distant past, but otherwise this isn't a known problem, please post for information on reproducing it.

-Mike

moppi wrote on Jun 19, 2006

Thanks for a fast reply, it helped.

Solution was quite simple. I had forgotten that in coordinate file numbers should be separated by space not comma.

I think I have worked too much on X-ray data and with different programs. Pretty stupid mistake as I have lot of older data sets, which have correctly formated coordinate file. And for my defence Iraf's error messages are quite cryptic you might say. ;)

-Juho Pekka Vehviläinen

Last post on Jun 19, 2006