Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncertainty and mask not returned from combine() #774

Closed
mwcraig opened this issue May 22, 2021 · 1 comment · Fixed by #775
Closed

Uncertainty and mask not returned from combine() #774

mwcraig opened this issue May 22, 2021 · 1 comment · Fixed by #775
Milestone

Comments

@mwcraig
Copy link
Member

mwcraig commented May 22, 2021

From Tim-Oliver Husser @thusser on slack:

Just took me an hour to find this "feature" in combiner.py:

def _calculate_size_of_image(ccd,
                             combine_uncertainty_function):
    # If uncertainty_func is given for combine this will create an uncertainty
    # even if the originals did not have one. In that case we need to create
    # an empty placeholder.
    if ccd.uncertainty is None and combine_uncertainty_function is not None:
        ccd.uncertainty = StdDevUncertainty(np.zeros(ccd.data.shape))

Is this really, what you want? The docstring for combine_uncertainty_function in combine() says:

    combine_uncertainty_function : callable, None, optional
        If ``None`` use the default uncertainty func when using average, median or
        sum combine, otherwise use the function provided.
        Default is ``None``.

So to me it seems totally valid to not give a combine_uncertainty_function (since it should use the default of the combine method). But in that case no uncertainties are returned from combine() . The fix would be easy, just wondering whether there is a reason for this?

@mwcraig mwcraig added this to the 2.2.0 milestone May 22, 2021
@mwcraig mwcraig changed the title Uncertainty not returned from combine() Uncertainty and mask not returned from combine() May 23, 2021
@mwcraig
Copy link
Member Author

mwcraig commented May 23, 2021

Turns out that the mask isn't returned either unless the first input image has a mask....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant