# Effective gain when stacking N frame images

I am trying to understand how to derive the effective gain in [electrons / ADU] when stacking N frame images in different (summed, averaged, or medianed) ways. I found the effective gains for the three kinds of stacking methods on page 20 in IRAF/DAOPHOT user's manual.

1. The image is the sum of N frames: effective gain = gain

2. The image is the average of N frames: effective gain = N * gain

3. The image is the median of N frames: effective gain = 2.0 * N * gain / 3

To calculate photometry errors, I need to take these effective gains into consideration. I would appreciate if you explain how to derive these results. Thank you.

• I believe the last one must be some kind of approximation. The median of N frames should approach the average when $N$ is large. Please can you point to a page number in the document your referenced. Mar 3, 2023 at 18:30
• @ProfRob Thank you for your comment. I see, it seems the result of median stacking is somewhat tricky. It says on the page 20 (I added it to the main text). Mar 4, 2023 at 1:38