View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

fixpix interpolation

figueira wrote on Nov 29, 2006

Hello!

I'm in what has already been called here an "iraf moment". I am trying to use FIXPIX to interpolate a few bad pixels, specified in a mask created by the task CCDPROC. I can only get fixpix to interpolate through columns. This produces very wierd results as I have a few image artifacts in which the interpolation is made only in one column Even if I force interpolation to be made through columns in the whole image, only the same pixels are corrected. I started by using the usual values for the BPM (2=line interpolation, 3= column interpolation). I tried to use 1 and 2 instead, respectively, both in the creation of the mask and in the interpolation process (CCDMASK and FIXPIX) and I have exactly the same result.
I found a strange thing, which can be completely unrelated and only reported here due to my ignorance, but here it goes. If I dispay the mask in a ds9 window with the command

display mask.pl 1 zscale- z1=0. z2=2.0

and use the pixel table, for instance, I find that the pixels do not have the value of 1 and 2 but 0.984925 and 1.96985...

I am using Iraf 2.13-BETA2 in MacIntel.

Just let me pose an additionat question: How can I change a mask into a textfile in order to check/change the pixel values?

Thank you very much for your support and my best wishes to you all.

Pedro Figueira

P.S.: I think this problem is related with one reported a while ago in a older version of IRAF.

figueira wrote on Nov 29, 2006

Hello all again!

I checked that the problem is also present if we perform the same tasks in a Sun Workstation. I suspect that i may be something wrong in the way bad pixel masks are created by CCDMASK... If I use a oldschool pixel mask, defined in a text file, interpolation seems to work.

Let me hear your opinion,

Pedro

Mike Fitzpatrick wrote on Nov 29, 2006

Hi Pedro,

I'll leave it to Frank to comment on a possible FIXPIX/CCDMASK bug, I'm sure it would help him if you could post a sample mask (or URL to one). As for some of your other questions:

I found a strange thing, which can be completely unrelated and only reported here due to my ignorance, but here it goes. If I dispay the mask in a ds9 window with the command

display mask.pl 1 zscale- z1=0. z2=2.0

and use the pixel table, for instance, I find that the pixels do not have the value of 1 and 2 but 0.984925 and 1.96985...


When displayed to DS9 from IRAF, DS9 doesn't show the actual pixel values but shows an approximation based on transforming the z1/z2 values to the 200 grey level used in the display. You might try to display with "ztrans=none"

How can I change a mask into a textfile in order to check/change the pixel values?


Pixel masks are treated just like images, so tasks like LISTPIX an EPIX will work. Hope this helps.

Cheers,
-Mike

figueira wrote on Nov 29, 2006

Thank you very much for the clarification on the ds9 issue.

In what concerns the interpolation, I found out that the bad pixel mask was poorly built. I'm working with commissioning data and the quality is many times below recomendable... It was not a fixpix problem at all. I'm very sorry for the misunderstood.

However, I have a new question.. :) "And now for something completely different":

How do you evaluate a FITS header keyword that has the character "-" in its name? If I do something like

ecl> hedit("@object_1.txt", "MJD-N", '(MJD-OBS)', add+, update-, show+, ver-)

I have "ERROR: Image header parameter not found (MJD)". I cannot duplicate the value of the keyword MJD-OBS because he ignores the "-" and everything after it... I tried several possible combinations of ", ', \ and voodoo and nothing worked. I bow to your knowledge.

All the best,

Pedro

Mike Fitzpatrick wrote on Nov 29, 2006

Pedro,

See the description of the '@' operator in the HEDIT help page (and the examples). You would need to do something like

cl> hedit("@object_1.txt", "MJD-N", '(@"MJD-OBS")', add+, update-, show+, ver-) 


-Mike

Last post on Nov 29, 2006