Skip to content

fgain in CLIPPED combine mode #29

@hgao-astro

Description

@hgao-astro

swarp/src/coadd.c

Lines 1368 to 1369 in bf4f496

sigmaeff = sqrtf(sumw + f1f2o2*(1.0/infields[o1]->fgain
+ 1.0/infields[o2]->fgain)),

swarp/src/coadd.c

Line 1411 in bf4f496

float sigmaeff = sqrtf(*(pixwstack+i)+amu/infields[o]->fgain);

The doc says that setting the gain to 0 means infinity. However, this seems not properly implemented in the clipping, where a zero gain leads to infinite sigma and thus no clipping.

My use case is to provide SWARP with absolute weight maps computed as inverse variance and to turn off RESCALE_WEIGHTS. The variance already includes both background noise and Poisson noise of the sources. To avoid double counting, I need the second term to be zero and the gain to be infinitely large. I can manually set the gain to a very large value in the header keywords of resampled images before coadding. But it would be nice to see that SWarp can handle this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions