Welcome to iraf.net Wednesday, April 24 2024 @ 03:17 PM GMT


 Forum Index > Help Desk > Applications New Topic Post Reply
 imcombine help
   
sa14722
 02/04/2015 05:59PM (Read 1559 times)  
+----
Newbie

Status: offline


Registered: 12/11/2014
Posts: 6
Hello all. I'm at a bit of an impasse using the imcombine function and was hoping someone could shed a little bit of light to my problem.

So I have two images of a galaxy cluster which I'm averaging together using imcombine. However one of the images has a bad pixel region right through the middle (due to a chip gap) where all the pixels have very high values. I want to make it so that when I'm combining the two images I can state an arbitrary value for pixels which would act as a threshold. If a frame has pixels above this threshold then imcombine will simply take the pixel value from the other frame as the output as opposed to combining the bad pixel values from one frame with the good ones from the other. I've been attempting this with the hthreshold algorithm within imcombine, but it doesn't seem to be doing anything different than when I simply combine them.

Alternatively the other option (if the above is impossible) I can think of is to replace the region of bad pixel values within one image with the same region of good values from another. After this I could imcombine them as normal and it would yield the same effect as above. I have created a bad pixel mask for the region of bad pixels but I don't know of a way to replace these with the good pixel values from the same region in another image.

I was wondering if anyone (fitz?) had any idea of getting around this issue. I had a similar inquiry a while back for replacing pixel values, which may be a good reference point: https://iraf.net/forum/viewtopic.php?showtopic=1468733

 
Profile Email
 Quote
fitz
 02/06/2015 06:49PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040

I can't help in explaining whether the imcombine threshold should do what you want or not, but your alternative is easy to do:

PHP Formatted Code
cl> imexpr "(a > 2000 ? b : a)" fixed.fits a=gap.fits b=second.fits


will create an image 'fixed.fits' where every pixel greater than 2000 in the image gap.fits is replaced with the pixels from the 'second.fits' image. You would then imcombine the 'fixed.fits' file to fill the gap in the image you have now.

 
Profile Email
 Quote
sa14722
 02/12/2015 07:42PM  
+----
Newbie

Status: offline


Registered: 12/11/2014
Posts: 6
Quote by: fitz


I can't help in explaining whether the imcombine threshold should do what you want or not, but your alternative is easy to do:

PHP Formatted Code
cl> imexpr "(a > 2000 ? b : a)" fixed.fits a=gap.fits b=second.fits


will create an image 'fixed.fits' where every pixel greater than 2000 in the image gap.fits is replaced with the pixels from the 'second.fits' image. You would then imcombine the 'fixed.fits' file to fill the gap in the image you have now.



Once again this worked nicely. Thanks.

I think I understand how imexpr works now. It's a very powerful tool.

 
Profile Email
 Quote
   
Content generated in: 0.19 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login