Skip to content

Add possibility to modify initial guesses / limits of parameters of analyze_peak() function (DRT) #17

Description

@nathan-kuehr

Hey, the minimising algorithms that are used for the peak analysis usually work well, but actually are highly dependent on the data you put in. If the sigma and / or alpha values are too small / close to ±1, then the slope of the skew normals may attain numerical zero at the next data point, i.e. we have vanishing gradients in the optimiser. This is problematic as non-zero DRT datapoints which are close by won't have any effects now. The problem is illustrated below. I plotted the estimated polarisation as well.

Image Image

For the second image, I modified the minimal possible sigma value to 1e-3, which disallows for too small sigmas. We can see that now, it correctly fits the skew normal to the data points. In the first one, the closest local minimum seems to be a value of sigma which is very very small. The notion of "too small", however, is dependent on the spacing / sampling of the test data.

That's why it would be nice to be able to adapt these parameters, without having to manually modify the local copy of the library. Maybe via a kwargs that is passed to the _generate_parameters function.
Or even cooler, adaptive sigmas that depend on the spacing of the data points.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions