View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

cosmicrays ERROR: PLIO: reference out of bounds on mask

Michael Weber wrote on May 12, 2014


I am trying to run cosmic rays on 2D echelle spectra. It has been working until a recent (minor) setup change: the 2D image got slightly bigger.

I am running PC-iraf 2.16 on a debian/linux version 6.0.9.

It runs fine if I run a sub image (e.g. 1:500,1:500), but not if I use the full image (4110,2167).

Some help or hints would be greatly appreciated.


Francisco Valdes wrote on May 12, 2014


Hi,

The file size is not particularly large and I don't know the source of the problem. I would need to reproduce the problem with your data to help much more. What version of IRAF are you using and what OS? This might already be a known issue. If this doesn't help lets communicate about getting your image my sending me mail at valdes@noao.edu.

I would comment that you can certainly try and use cosmic ray detection on the 2D image. But the structure of echelle or slitlet spectral data does not lend itself to this type of detection. Cosmic rays in echelle data might be better address during extraction from 2D to 1D in the apextract package; that is if you plan to extract the spectra to 1D.

Frank Valdes


Michael Weber wrote on May 13, 2014


Dear Frank,

thanks for the fast answer.

I am maintaining a pipeline which does both, first runs cosmic rays, and later uses the "clean" option during extraction. As such it is not a critical problem, but I am still curious.

We use PC iraf 2.16 (not 2.16.1), the 32bit Linux release.

If you want I can send/upload a file.

kind regards,

Michael


Francisco Valdes wrote on May 14, 2014


Hello Michael,

Thanks for the test image. I don't have access to the exact configuration you have. I ran the cosmicrays task using default parameters on a 64-bit Mac and a 32-bit Linux (CentOS I think) with IRAF V2.16.1. Apart from taking quite a bit of time it worked. At least with the default parameters I used there are quite a lot of modified pixels (I subtracted the input from the output and displayed the result).

I can make some general statements. The mask code from which the error comes has not changes between 2.16 and 2.16.1. There has only been one change in cosmicrays to fix a problem with 64-bit systems. The cosmic rays are internally tracked with a pixel mask which is quite efficient for sparse flags but can take a lot of memory if the number of flagged pixels gets large. So maybe some resource such as memory is being hit which, I know, is possible to cause a memory corruption that could lead to various errors.

I still think cosmicrays is not a good tool for echelle data, though if it works for you I can't argue with that. I don't know how you tune the thresholds but if you play around with that maybe you will find the error goes away or occurs depending on how many pixels are identified and modified by the task. If it is an image size issue and, as I surmise, you are fairly experienced with IRAF, you might be able to work around the problem by doing the cleaning in a couple of pieces; i.e. do the left half and the right half separately. The only other suggestion would be to upgrade to V2.16.1. There may have been some change in the core system that helps with the problem of potential memory corruption.

Let me know if you have questions or any ideas of how the problem could be reproduced here.

Cheers,

Frank

Michael Weber wrote on May 21, 2014


Thanks for looking into this for me, I now moved to the current patch level and to 64bit, and things look good.

As a side remark: I disabled the cosmics-search on the 2d-frames, since it is very slow and does not make much sense.

kind regards,

Michael

Last post on May 21, 2014