Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Steps with neg sigma #970

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Steps with neg sigma #970

wants to merge 4 commits into from

Conversation

newville
Copy link
Member

@newville newville commented Oct 7, 2024

Description

This allows the step lineshape and StepModel to have values of sigma<0 to signify a step down (from 1 to 0).

See discussion at: https://groups.google.com/g/lmfit-py/c/aBBzQG0uDK4

Type of Changes
  • Bug fix
  • New feature
  • Refactoring / maintenance
  • Documentation / examples
Tested on

Python: 3.12.5 | packaged by conda-forge | (main, Aug 8 2024, 18:31:54) [Clang 16.0.6 ]

lmfit: 1.3.2.post9+g776e14d7.d20241007, scipy: 1.14.0, numpy: 1.26.4, asteval: 1.0.5, uncertainties: 3.2.2.post7+gce16269

Verification

Have you

  • included docstrings that follow PEP 257?
  • referenced existing Issue and/or provided relevant link to mailing list?
  • verified that existing tests pass locally?
  • verified that the documentation builds locally?
  • squashed/minimized your commits and written descriptive commit messages?
  • added or updated existing tests to cover the changes?
  • updated the documentation and/or added an entry to the release notes (doc/whatsnew.rst)?
  • added an example?

Copy link

codecov bot commented Oct 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.24%. Comparing base (776e14d) to head (5debf3d).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #970      +/-   ##
==========================================
+ Coverage   93.13%   93.24%   +0.10%     
==========================================
  Files          10       10              
  Lines        3787     3789       +2     
==========================================
+ Hits         3527     3533       +6     
+ Misses        260      256       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@reneeotten reneeotten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @newville a few minor typos perhaps but other than that looks good to me. Perhaps just squash the commits?

Starts at 0.0, ends at `amplitude`, with half-max at `center`, and
rising with `form`:
Starts at 0.0, ends at `sign(sigma)*amplitude`, has a half-max at
`center`, rsing or falling with `form`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: rsing --> rising

:math:`A` rising to :math:`A/2` at :math:`\mu`, with :math:`\sigma`
setting the characteristic width. The functional forms are defined as:
:math:`\tt{sign}(\sigma)A` rising or falling to :math:`A/2` at :math:`\mu`,
with :math:`\sigma` setting the characteristic width and the sign up the step.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"sign up" is that what you meant?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants