Skip to content

Support non-scalar initial guess and bounds in scipp.curve_fit #3437

@SimonHeybrock

Description

@SimonHeybrock

The current implementation assumes that initial guesses (p0) and bounds are scalar, e.g., 0-D variables.

When fitting, e.g., a 1-D function to 2-D data, we may have different initial guess and bounds for each slice of the data, i.e., for each independent fit. curve_fit should be able to support this.

  • Make sure to check coords of initial guesses, if present this should match the data's coord (the coord not participating in the fit).
  • Initial guess must have dims, just like data and we should reject, e.g., plain NumPy arrays which would require positional association of values with data slices.
  • Slice dims for p0 and bounds.
  • Note that different params can have a different set of dims.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions