Welcome to iraf.net Thursday, May 02 2024 @ 09:44 AM GMT
spacermase |
02/18/2010 02:23AM (Read 1148 times)
|
|
|
Status: offline
Registered: 06/09/2009
Posts: 9
|
This is probably something of a neophyte question, but I've been working with .pl masks generated by the objmasks package. When I try to perform image arithmetic on them (say, "imarith image - mask output"), it goes through fine (no errors), but the output image is exactly the same as the input image. Am I doing something wrong, or do masks simply not work that way?Thanks!
|
|
|
|
fitz |
02/18/2010 02:23AM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
Masks do indeed behave like images, e.g.[code:1:d333b5dabd]
ecl> imexpr "(a > 500 ? 500 : 0)" a=dev$pix output=test.pl
10% 20% 30% 40% 50% 60% 70% 80% 90% 100% - done
ecl> imarith dev$pix - test.pl testout.fits
ecl> imstat dev$pix,testout.fits
# IMAGE NPIX MEAN STDDEV MIN MAX
dev$pix 262144 108.3 131.3 -1. 19936.
testout.fits 262144 104. 110.7 -1. 19436.
[/code:1:d333b5dabd]As you can see the mask has values of 500 that were subtracted from the output image.In your case, is it possible you're just not noticing that a mask value of one was indeed subtracted? Are you assuming the mask contains the pixels values (it doesn't) and you're doing this to subtract objects from the image? If so, have a look at MASKEXPR as a way to use the mask to do expressions on images.-Mike
|
|
|
|
| |
|
Content generated in: 0.06 seconds |
|