Skip to content

Image fitting: MAD calculation of images with nans #1318

@YuHsuan-Hwang

Description

@YuHsuan-Hwang

Describe the bug
(Found by @acdo2002) The MAD (median absolute deviation) calculation becomes lower when more additional nans are included in the fitting data. When std is 0 (with a large number of nans), the fitting fails.

Screenshots or videos
image

To Reproduce
Steps to reproduce the behavior:

  1. Fit the entire image and the fitting fails.

Expected behavior
The MAD calculation does not change when additional nans are included (and the fitting result does not change).
Fitting the entire image does not fail.

Platform info (please complete the following information):

  • OS [e.g. macOS Monterey]: macOS Big Sur
  • Browser [e.g. chrome, safari, electron app]: chrome
  • Browser version [e.g. 22]: 117
  • Backend branch [e.g. dev, v3b2 release]: dev, v4
  • Frontend branch [e.g. dev, v3b2 release]: dev, v4

Additional context
Download test image

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions