artdata.mknoise task gives low values at saturated pixels
Karsten Brogaard wrote on Jan 26, 2007
Hi,
I have tried to use the task artdata.mknoise to add poisson noise to my images. But for all pixels which are saturated in the original images (value = 65535) I get very low values (~10-100)? Why is that?
Karsten
I have tried to use the task artdata.mknoise to add poisson noise to my images. But for all pixels which are saturated in the original images (value = 65535) I get very low values (~10-100)? Why is that?
Karsten
Mike Fitzpatrick wrote on Jan 26, 2007
Karsten,
I can't seem to reproduce the problem, but my first reaction was that your images are probably of type 'ushort' and so adding noise causes a "wrap-around" to the lower values. You can use the CHPIXTYPE task to change the pixel type to something like 'int' or 'real' to avoid this, but verify first that this is actually what's happening.
Cheers,
-Mike
I can't seem to reproduce the problem, but my first reaction was that your images are probably of type 'ushort' and so adding noise causes a "wrap-around" to the lower values. You can use the CHPIXTYPE task to change the pixel type to something like 'int' or 'real' to avoid this, but verify first that this is actually what's happening.
Cheers,
-Mike
Karsten Brogaard wrote on Jan 26, 2007
You were quite right, changing the pixel type helped!
As an additional question how can I see the pixel type of an image?
And can I use CHPIXTYPE on MEF fits and also get MEF files out? :D
As an additional question how can I see the pixel type of an image?
And can I use CHPIXTYPE on MEF fits and also get MEF files out? :D
Mike Fitzpatrick wrote on Jan 26, 2007
The IMHEAD task will tell you the image pixel type, e.g.
For MEF files the FITSUTIL package has a similar task called FXHEADER that will print the BITPIX for each image extension. If you want to change all of the extensions you need to do them individually, but the MSCCMD task in the MSCRED package can automate this. Both FITSUTIL and MSCRED are external packages you need to load/install separately.
Cheers,
-Mike
ecl> imhead dev$pix dev$pix[512,512][short]: m51 B 600sFor MEF files the FITSUTIL package has a similar task called FXHEADER that will print the BITPIX for each image extension. If you want to change all of the extensions you need to do them individually, but the MSCCMD task in the MSCRED package can automate this. Both FITSUTIL and MSCRED are external packages you need to load/install separately.
Cheers,
-Mike
Last post on Jan 26, 2007