Skip to content

Spectrum Viewer: Fitting Constraints #2842

@samtygier-stfc

Description

@samtygier-stfc

Current Behaviour

Currently the user can only set initial parameters for the fit

Desired Behaviour

Give the user the ability to limit a fitting parameter to a range or fix it to a specific value.

scipy.optimize. minimize has a bounds parameter that allows this (we are using Nelder-Mead which support bounds). The Bounds docs suggest that setting upper and lower to the same value fixes it.

Supporting this may also simplify the pre-fitting steps for Santisteban. Prefitting is running the fitting algorithm with only some of the parameters allowed to vary.

Undesired Behaviour

Importance of Feature

Key feature for 3.1

Additional Context

This is useful in various cases:

  • In a noisy dataset bounds might be needed to prevent the optimiser ending up with a bad result
  • For some experiments the user might know the value of one of the parameters but be interested in how another changes. E.g. the height of the edge at a specific wavelength may relate to the concentration of a material.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Draft

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions