Extract and sum green layers from DSLR images

Affiliation
American Association of Variable Star Observers (AAVSO)
Fri, 07/24/2015 - 13:45

When I stack the two green layers from an DSLR image, is better choose the sum or the average?

 

and yet,

 

if I stack n images, which of two step is better?

1) Stack all images, then extract the two green layers from the resulting image, and finally stack the two green layers.

or

2) Extract the two green layers from each image, then stack this two green layers, and finally stack all the resulting green layers.

 
Regards,

 

Luigi

Affiliation
American Association of Variable Star Observers (AAVSO)
Stacking DSLR images

 

I median combine the two green channels from each image.   Then if you are going to stack you would stack that combined image with others so it would be method 2.

Barbara

Affiliation
American Association of Variable Star Observers (AAVSO)
Hi Barbara,
thanks for your

Hi Barbara,

thanks for your answer.

I know that some people prefer to sum images while others prefer to make the average. Now, is it the first time I hear the median, but this is undoubtedly due to my ignorance.

Is there a reason why is convenient to choose the median?

 

Regards,

 

Luigi

Affiliation
American Association of Variable Star Observers (AAVSO)
Sum or average

 

Hi Luigi, Barbara,

Sum or average of the two greens has no  importance as the magnitude results from the ratio of the flux of the target and a comparison. The only point is all stars shall be processed the same way. In my VSF technique the resulting factor two or one on green shall then be used. In conventional transformation that has no importance. 

In case of low values it's better to work with the overall sum for a series. Imaging software often work with integer types, the rounding of an average could introduce a significant error in some operation like the background subtraction. 

I don't recommend to use median: for two values only it has no meaning. Then for stacking images this would work only if the noise is the only variable in images. This is usually not true, we always have extinction variations (and other causes) between images that are stronger than the noise. One way would be to normalize the images before the median but it would not work on local variations that also exist. The risk is a loss of SNR: at extreme the median would select only one image from a series with no noise reduction at all !

What is only important is the total sum of electrons of a series for the two green channels, the order in which the sums are made has no importance. It's useful to make the calculation in electrons instead ADU as it reflects the true flux from the star and permits the SNR estimation. 

Clear Skies !

Roger

Affiliation
American Association of Variable Star Observers (AAVSO)
Roger, sorry to return on the same subject

Roger, sorry to return on the same subject, but I would like to be sure that I understand what you said.

I seemed to understand that no matter the order in which the sums are made.

In reference to my first post, for stacking n images and make the process as simple as possible, in my case it would be better to choose the procedure 1).

 

a) Sum the n images.

b) Then, extract the two green layers from the resulting sum.

c) Finally, sum those two green layers.

 

Is it correct to proceed in this way?

 

Regards,

 

Luigi

Affiliation
American Association of Variable Star Observers (AAVSO)
How to proceed?

Hi Luigi:

Asking for guidance on the forum is a fine idea but sometimes you just get statements of opinion rather than hard data. I would propose that a better answer to your questions might come from your own testing of your alternatives mentioned in your first forum post above. You seem to have a preferred "simple" alternative? The alternatives to test are few and conducting the effort yourself would give you practice at the process. It would also help you truly understand what factors may be most important in achieving the "best" result.

You could report your results, state your own conclusion, and ask for comment (if any is needed?).

Just a thought!  wink

Ken

Affiliation
American Association of Variable Star Observers (AAVSO)
DSLR Green extraction

Hi Luigi,

In principle it's ok, no problem, as the math guys say: sum is a commutative operation. But I have a question:

Apparently you don't use the process that has been proposed at Citizen Sky ( The R G G B layers are extracted by a de-bayer bi-linear process in the related IRIS tutorial, it delivers only one G data, as an RGB image, that is then separated in three R, G, B images ). Could you say in few words what process you use ?  How do you make the images registration before stacking ? (CFA images can't be properly registered with IRIS, we shall either separate the colors before doing separate registration for each color, or convert to RGB before a color image registration).

Clear Skies !

Roger

PS: Why such discussion is not ok on this forum ? it was usual at Citizen Sky.

Affiliation
American Association of Variable Star Observers (AAVSO)
Discussion

Hi Roger:

Perhaps your question about "discussion is not ok on this forum" was directed at my post?

As I said - "Asking for guidance on the forum is a fine idea..."

However, I have also found that the best way to learn how and why to carry out a process is to try one self and experiment! I suspect Luigi has the skill to answer his own question and should try? 

So both approaches are helpful and I certainly support both. I did not intend to propose that this is not the case.

Ken

Affiliation
American Association of Variable Star Observers (AAVSO)
Hi all

Hi all,

Roger

at first I used Iris, but later I preferred to use MaximDL that seems more intuitive.

Yes, Iris delivers only one G data, instead MaximDL allows to extract the two G channels separately.

In MaximDL I first convert the raw images in fit format. Then stack the images choosing "sum", and finally I extract the two green layers from this image and sum them to get the final image.

 

Ken,

you are right, but I'm still at the beginning, and, for the moment, I would try to use the usual procedures to avoid making big mistakes. 

 

Regards,

 

Luigi

You can also use rawtran

You can also use rawtran program if you're familiar with command-line tools. It allows to extract both green channels separately.

Affiliation
American Association of Variable Star Observers (AAVSO)
My 10 cents...

Luigi

In the spring, I followed the course AAVSO-Photometry II DSLR with Mark Blackford.
It's a good place to start ...

We have worked on several software (Iris, MaximDL, AIP4Win), and work on several methods.
I think the best is yet to AIP4Win in format 'FIT'.
It makes the "debayerisation" in once time for the 'G' spectre and handles the photometry.
Calibrations(Flats, Bias and Dark) can be in the same time.
The photometry preparation is by-against hard work but you make it one time.
The software cost around 100$ and come with a great book.
I only have some problem with Windows 8 (read 'hate'), in Windows 7 all work well.

For image acquisition and basic calibration, I still use MaximDL ...by habit.
Don't know if it's help, but this method to work well for me.

JBD ;0)

Affiliation
American Association of Variable Star Observers (AAVSO)
Rawtran,

Hi Dominik

This is the first time I read about Rawtran. In my own software I use dcraw.exe from Dave Coffin as a preprocessor to extract the CFA image from the CR2 (as most of imaging software do in fact !). It works very well but a little bit slow. I did search Rawtran on the web but got just nothing. Could you say more on that Rawtran ? How to get it ?

Clear Skies !

Roger

Affiliation
Magyar Csillagaszati Egyesulet, Valtozocsillag Szakcsoport (Hungary) (MCSE)
IRIS script for calibration and slitting green channels

Dear Friends,

I use the following IRIS script (only the name and the date of the raw files needs modification accoring to your needs):

convertraw sscyg150720p img 20
pr img biasdark master-flat cal 20
cosme_cfa2 cal calx cosme 20
cfa2pic calx conv 20
setspline 1
coregister2 conv reg 20
noffset2 reg roff 0 20
copyadd roff sscyg150720p10s 20 10
split_rgb2 sscyg150720p10s sscyg150720p10sr sscyg150720p10sg sscyg150720p10sb 2
copyadd roff sscyg150720p20p 20 20
split_rgb2 sscyg150720p20p sscyg150720p20pr sscyg150720p20pg sscyg150720p20pb 1
load sscyg150720p20p1
savejpg sscyg150720pc 1

 

In this case the script processes 20 SS Cyg images and at the end you get the sum of all the 20 images splitted into the RGB channels + the subsum of 10-10 images splitted into the RGB channels. You only need a master-flat and a biasdark (sum of master-dark and master-bias images).

Clear skies,

Robert