Stretched exponential - #245
henrikjacobsenfys wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #245 +/- ##
==========================================
+ Coverage 98.47% 98.51% +0.03%
==========================================
Files 57 58 +1
Lines 5512 5646 +134
Branches 952 961 +9
==========================================
+ Hits 5428 5562 +134
Misses 42 42
Partials 42 42
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| r""" | ||
| The stretched exponential (Kohlrausch-Williams-Watts) relaxation, Fourier transformed to energy. | ||
|
|
||
| The model is defined in time, as $I(t) = A e^{-(|t| / \tau)^\beta}$. To evalaute the Fourier |
| ``scipy.stats.levy_stable`` is mathematically the same function, but it is 70-100x slower and not | ||
| accurate for $\alpha$ close to 1. | ||
|
|
||
| Instad, the integral is evaluated in the complex plane described in :func:`_kww_shape`. |
|
|
||
| @property | ||
| def width(self) -> DescriptorNumber: | ||
| r""" |
There was a problem hiding this comment.
width returns a DescriptorNumber, whereas every other component's width is a Parameter.
Anything that does comp.width.fixed, comp.width.make_dependent_on(...) or puts it in a FitBinding will fail.
|
I ran Fable on this PR and it found an issue I can't comment on, since I don't know science well enough. =====================================================================
So a component with
At Note this is not a bug in Suggested fix (pick one):
Either way, add a test that a narrow small-$\beta$ component on a coarse |
Implementing the Fourier transform of a stretched exponential. It's not trivial to make it fast and correct at the same time. Claude did that for me. I have updated the text and read through the whole thing.