Skip to content

Image gain restoration #73

@ysBach

Description

@ysBach

I remember previously astroscrappy.detect_cosmics returned the cleaned array multiplied by gain factor, but now it does not. (I could not find CHANGELOG.. )

astroscrappy.detect_cosmics(np.ones((100,100)), gain=3)[1]
array([[1., 1., 1., ..., 1., 1., 1.],
       [1., 1., 1., ..., 1., 1., 1.],
       [1., 1., 1., ..., 1., 1., 1.],
       ...,
       [1., 1., 1., ..., 1., 1., 1.],
       [1., 1., 1., ..., 1., 1., 1.],
       [1., 1., 1., ..., 1., 1., 1.]], dtype=float32)

It used to be

array([[3., 3., 3., ..., 3., 3., 3.],
       [3., 3., 3., ..., 3., 3., 3.],
       [3., 3., 3., ..., 3., 3., 3.],
       ...,
       [3., 3., 3., ..., 3., 3., 3.],
       [3., 3., 3., ..., 3., 3., 3.],
       [3., 3., 3., ..., 3., 3., 3.]], dtype=float32)

if my memory is correct, and this is why I used my custom function to do nccd.data = cleanarr / gain.

Now I find my processed images have extremely small counts & SNR (as I have gain ~ 10).

How can I write a code which incorporates both versions of astroscrappy within a single function?
(e.g., for inbkg, bkg, pssl stuff, I could use try-except clause)

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