Submit a Story  :  IRAF Links  :  Past Polls  :  Calendar  :  Advanced Search  
     iraf.net
FAQ
 Forum FAQForum FAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

imcombine

 
Post new topic   Reply to topic    iraf.net Forum Index -> Applications
View previous topic :: View next topic  
Author Message
Guest
Guest





PostPosted: Mon Jun 19, 2006 4:36 am    Post subject: imcombine Reply with quote

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



Post generated using Mail2Forum (http://www.mail2forum.com)
Back to top
valdes
IRAF Guru


Joined: 11 Nov 2005
Posts: 676

PostPosted: Tue Jun 27, 2006 3:40 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
lvanzi



Joined: 29 Aug 2006
Posts: 4

PostPosted: Tue Aug 29, 2006 7:11 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
valdes
IRAF Guru


Joined: 11 Nov 2005
Posts: 676

PostPosted: Tue Aug 29, 2006 3:33 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
lvanzi



Joined: 29 Aug 2006
Posts: 4

PostPosted: Sat Sep 16, 2006 6:39 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
shashi



Joined: 03 Nov 2005
Posts: 4
Location: Ahmedabad India

PostPosted: Mon Sep 18, 2006 10:02 am    Post subject: Reply with quote

lvanzi wrote:
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


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
Back to top
View user's profile Send private message Visit poster's website
lvanzi



Joined: 29 Aug 2006
Posts: 4

PostPosted: Mon Sep 18, 2006 3:11 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
shashi



Joined: 03 Nov 2005
Posts: 4
Location: Ahmedabad India

PostPosted: Tue Sep 19, 2006 3:06 am    Post subject: Reply with quote

lvanzi wrote:

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.


You might consider changing the pixtype using chpixtype and then add the 32000. Is it -32000 or -32768?
All the best,
Shashi
Back to top
View user's profile Send private message Visit poster's website
lvanzi



Joined: 29 Aug 2006
Posts: 4

PostPosted: Tue Sep 19, 2006 3:17 pm    Post subject: Reply with quote

It is in fact -32768 !!!
Back to top
View user's profile Send private message
robsteele49



Joined: 03 May 2010
Posts: 10
Location: Frazier Park

PostPosted: Thu Apr 07, 2011 6:42 pm    Post subject: imcombine vs. combine Reply with quote

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.
Back to top
View user's profile Send private message
pskoda
Active IRAF User


Joined: 20 Dec 2005
Posts: 23

PostPosted: Tue Apr 26, 2011 3:32 pm    Post subject: Reply with quote

lvanzi wrote:
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


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 zero

it may help just to apply rfits with rfits.datatype="ushort"

But I do not understand the sentence

Quote:
If I take a set of images with low illumination they will have a negative average value



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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    iraf.net Forum Index -> Applications All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2009 phpBB Group
 Copyright © 2005-2011 iraf.net
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.54 seconds