View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

A problem with COSMICRAY

lishaokun wrote on Sep 24, 2008

Dear iraf users,

When I run cosmicray to remove cosmic rays for my *.imh files, there is a error:

ERROR: PLIO: reference out of bounds on mask


here are the parameters of COSMICRAY

input = "*.imh" List of images in which to detect cosmic rays
output = "" List of cosmic ray replaced output images (opti
answer = "yes" Review parameters for a particular image?
(crmasks = "") List of bad pixel masks (optional)\n
(threshold = 25.) Detection threshold above mean
(fluxratio = 7.) Flux ratio threshold (in percent)
(npasses = 5) Number of detection passes
(window = "5") Size of detection window\n
(interactive = no) Examine parameters interactively?
(train = no) Use training objects?
(objects = "") Cursor list of training objects
(savefile = "") File to save train objects
(plotfile = "yes") Plot file
(graphics = "stdgraph") Interactive graphics output device
(cursor = "") Graphics cursor input
(mode = "ql")


I don't know why? what should I do?
Can anybody help me?
Thanks a lot.

Yours
S.K.Li

Francisco Valdes wrote on Sep 24, 2008

Hello,

You don't say if this happens on the first or all images or just a few. I can't really say what is wrong without reproducing and debugging it myself. If this happens on all or a particular image then could you make the image available? If so you can put it on a local ftp or http area or put it in ftp://iraf.noao.edu/pub and let me know. I would also need to know what version of IRAF and OS you are using.

Yours,
Frank Valdes

lishaokun wrote on Sep 24, 2008

Hello Frank Valdes

Oh, I am sorry that I don't say it clearly.
This problem happens on my first image, when I type
cosmic
it runs a few seconds, then
ERROR: PLIO: reference out of bounds on mask
cr>


and it quits the program.
When I display the output image file in ds9, it is obvious that some cosmicray pixels have been removed, but I don't know if all of pixels which I want to remove have been done.

I am putting one of my fit file in ftp://iraf.noao.edu/pub its name is 0219r_02.21.45_2_0000.fits

The IRAF versions which I am using are 'NOAO PC-IRAF Revision 2.12.2" with fedora linux and 2.13-beta version with Ubuntu linux.

Thank you
Yours
S.K.Li

Francisco Valdes wrote on Sep 24, 2008

Thank you for the sample image. The problem is due to the image not being strictly 2D. It is 3D with a third dimension of 1; i.e. [2048,2048,1]. It would be nice if IRAF identified this special case but it does not. Some tasks still work with this data but others designed only for 2D images may have problems. In this case it causes the error message you report.

The workaround is to use an image section or convert the image to 2D with imcopy of a section or imslice. This is noted in the bug log attached below.

Yours,
Frank Valdes


NUMBER: 569
MODULE: cosmicrays
SYSTEM: -V2.14.1
DATE:   Mon Oct 13 10:33:15 MST 2008
FROM:   valdes

BUG:    The message

            ERROR: PLIO: reference out of bounds on mask

        occurs when the image is not 2D.  This can be a conceptual problem
        for data which define a higher dimensionality but with length of 1;
        e.g. [2048,2048,1].  This is effectively a 2D image but some
        IRAF tasks designed for 2D images can have problems with this.

        The workaround is simply to use a 2D image section:

            cosmicrays image[*,*,1]

        Of course one can also convert the image to 2D with imcopy or imslice.

STATUS: No updates are currently planned and users should use the workarounds
        noted above.

lishaokun wrote on Sep 24, 2008

Wow! The task COSMICRAY is run. Everything is ok now.

Thank you very much , Frank Valdes

Yours
S. K. Li

Last post on Sep 24, 2008