Welcome to iraf.net Friday, April 26 2024 @ 11:33 PM GMT


 Forum Index > Help Desk > Applications New Topic Post Reply
 imcombine
   
Anonymous: Guest
 06/19/2006 04:36AM (Read 11174 times)  



Dear Iraf expert,I happened to notice that the option "scale" in imcombine does not
produce the correct sigma image when the input images have negative
counts. Using scale=none, median or mean I always obtain the same result
as sigma image. The same is not true when the counts are positive, in
this case I obtain results that make more sense. Is there any bug
reported with this respect? Of course I can fix this by multiplying my
images by -1.
I am running IRAF 2.12.2 on Mac OS version 10.3.9.Thanks a lot for your help,
Leonardo

 
 Quote
valdes
 06/19/2006 04:36AM  
+++++
Active Member

Status: offline


Registered: 11/11/2005
Posts: 728
Hello Leonardo,I think your question has to do with what does it mean to "scale" your images. The mode, median, mean, and exposure time scaling options in imcombine are intended for observational data where images that need scaling because the exposure times were varied or the transparency varied. In both cases this only makes sense if the signal is possible. If you had data which was all negative values then this would not happen under this observational model.If your images have different levels because of some variation in the zero point then the zero parameter is more appropriate for your needs.The calculation of the sigma image very straightforward. The images are adjusted by multiplying or adding so that they are supposed to represent the same scene to be combine. Then the images are combined with the desired rejection and combining methods. Finally the scatter (standard deviation) of the individual values about the combined value at a pixel is the sigma value recorded in the output.I hope this helps. I do not believe there is a bug. I did simulations by generating images with noise using the ARTDATA package and then combining them. The sigma image I get, regardless of negative or postive levels, is what I put in provided I understand how I generated the different levels. In my case I added or subtracted mean signal levels so I used the zero option, not the scale option.Yours,
Frank Valdes

 
Profile Email
 Quote
lvanzi
 06/19/2006 04:36AM  
+----
Newbie

Status: offline


Registered: 08/28/2006
Posts: 4
hi Frank,I am not convinced. The dynamic range of my detector is -32000, 32000 so it is absolutely normal for my case to have negative counts. If I take a set of images with low illumination they will have a negative average value. Because of a slight fluctuation of the response of the detector (multiplicative factor) I want to rescale them before averaging. This works fine when the average is positive, when it is negative I must multiply by -1 to make it positive, and when the average is close to 0 I have not hope to make it work.
What do you think?Thanks,
leo

 
Profile Email
 Quote
valdes
 06/19/2006 04:36AM  
+++++
Active Member

Status: offline


Registered: 11/11/2005
Posts: 728
Hi Leo,I'm not saying it is not possible ot get negative values from a detector. But the usual point of basic calibration using biases and overscan is that when no light falls on the detector you get zero with some noise and when there is signal it will be positive with some noise. If the signal is very low it is possible that the some pixels will be negative. However, a negative signal is not physical. That means that using something like an average for scaling which is negative is not useful.So if you use the mean, median, or mode of images for relative scaling this is assuming that it is proportional to a positive signal and so must be positive. However, imcombine does allow you to specify the scale factors explicitly such as in a file. So you are free to decide how images should be scaled such that they represent the same levels for combining.As I noted before, the sigma image calculation does the mathematical determination of the sigma for each pixel and there is certainly nothing wrong with it.That is all the advice and information I can think to give you.Yours,
Frank

 
Profile Email
 Quote
lvanzi
 06/19/2006 04:36AM  
+----
Newbie

Status: offline


Registered: 08/28/2006
Posts: 4
I am having more problems with imcombine. When trying to combine a number of images I get the message "arithmetic exception". After a few atempts with different settings of the parameters I run unlearn and used the default setting. No improve. I tried to logout and login, nothing. I tired to imcombine copies of the same image and had the same problem. On the other hand I can imarith the images succesfully. This used to work with similar data taken with the same detector. I tried to imcombine the old data and it worked perfectly.Any idea?Thanks,
leo

 
Profile Email
 Quote
shashi
 06/19/2006 04:36AM  
+----
Newbie

Status: offline


Registered: 11/02/2005
Posts: 4
[quote:37412ce0d0="lvanzi"]I am having more problems with imcombine. When trying to combine a number of im[...] I tired to imcombine copies of the same image and had the same problem. On the other hand I can imarith the images succesfully. This used to work with similar data taken with the same detector. I tried to imcombine the old data and it worked perfectly.
leo[/quote:37412ce0d0]Could it be that the newer data have some bugs? Maybe one or more of them could have got corrupted. Does imstat show reasonable values?But to get back to your first question regarding scaling for 'negative' values - this is an issue I have also had to contend with. I think it is particularly relevant for infrared array detectors which are quite non-linear at low signal levels. Best regards,
Shashi

 
Profile Email Website
 Quote
lvanzi
 06/19/2006 04:36AM  
+----
Newbie

Status: offline


Registered: 08/28/2006
Posts: 4
My new frames look fine. I can display, imstat, imhist, imarith them with no problem, I can even average combine them using imarith. It is just imcombine that fails with the "exception" problem.For the issue of negative rescaling, my frames are also IR in fact, since I have a pedestal level of -32000 I tried to remove it by adding that value to the frames. No lack, as the range of ADUs will simply be shifted remainig in the -32000, 32000 range. May be the problem is just this, the fact that my range of ADUs goes from -32000 to 32000.Any suggestion will be really welcome.

 
Profile Email
 Quote
shashi
 06/19/2006 04:36AM  
+----
Newbie

Status: offline


Registered: 11/02/2005
Posts: 4
[quote:fe555252cb="lvanzi"]
For the issue of negative rescaling, my frames are also IR in fact, since I have a pedestal level of -32000 I tried to remove it by adding that value to the frames. No lack, as the range of ADUs will simply be shifted remainig in the -32000, 32000 range. May be the problem is just this, the fact that my range of ADUs goes from -32000 to 32000.Any suggestion will be really welcome.[/quote:fe555252cb]You might consider changing the pixtype using chpixtype and then add the 32000. Is it -32000 or -32768?
All the best,
Shashi

 
Profile Email Website
 Quote
lvanzi
 06/19/2006 04:36AM  
+----
Newbie

Status: offline


Registered: 08/28/2006
Posts: 4
It is in fact -32768 !!!

 
Profile Email
 Quote
robsteele49
 06/19/2006 04:36AM  
++---
Junior

Status: offline


Registered: 05/03/2010
Posts: 28
Since both applications are available I'm wondering if one is considered better than the other. Acccording to what I could determine imcombine was written Aug. 2001 and combine was written Aug. 1996.

Rob Steele (Robert.D.Steele@jpl.nasa.gov)
 
Profile Email
 Quote
pskoda
 06/19/2006 04:36AM  
++---
Junior

Status: offline


Registered: 12/20/2005
Posts: 23
[quote:0ef0dfad89="lvanzi"]hi Frank,I am not convinced. The dynamic range of my detector is -32000, 32000 so it is absolutely normal for my case to have negative counts. If I take a set of images with low illumination they will have a negative average value. Because of a slight fluctuation of the response of the detector (multiplicative factor) I want to rescale them before averaging. This works fine when the average is positive, when it is negative I must multiply by -1 to make it positive, and when the average is close to 0 I have not hope to make it work.
What do you think?Thanks,
leo[/quote:0ef0dfad89]Maybe the first sentence is a key:I have met detectors producing negative values - it is just the result of bad conversion of FITS type from range 0-65535 using BITPIX=16 (some googling in old posts of FITS group can give more ...
It cannot be simply offset by 32768 as there is a mirroring of what is above 32768 goes to the -32767 and then rises towards the zero.On emission-line star with large emission you see it rising up to 32768 and then it is wrapped and the highest part of peek goes from -32767 up to near zeroit may help just to apply rfits with [b:0ef0dfad89]rfits.datatype="ushort"
[/b:0ef0dfad89]
But I do not understand the sentence [quote:0ef0dfad89]If I take a set of images with low illumination they will have a negative average value[/quote:0ef0dfad89]
It means the detector does not have any artificial offset (bias)
What is common for CCD controlers : there should be a trimmer for rising the voltage read at zero light - the real bias (called ZERO in IRAF imagetyp)Best Regards,
Petr Skoda

 
Profile Email
 Quote
   
Content generated in: 0.30 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