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

fix 'linear' mode for RectangleModel (lmfit#815) #816

Merged
merged 1 commit into from
Nov 1, 2022

Conversation

arunpersaud
Copy link
Contributor

Description

Fix the linear mode for RectangleModel. Also update the documentation and update the tests. (#815)

Tests:

  • Using numpy functions now allows lineshape.rectangle to handle single floats, so the tests needed to be updated
  • added tests for step and rectangle to make sure we get A/2 at mu1 (and mu2)

Docs:

  • update to reflect code and make brackets in LaTeX equations a bit nicer
Type of Changes
  • Bug fix
  • New feature
  • Refactoring / maintenance
  • Documentation / examples
Tested on

Python: 3.10.8 (main, Oct 13 2022, 09:48:40) [Clang 14.0.0 (clang-1400.0.29.102)]

lmfit: 1.0.0.post473+g125c830.d20221024, scipy: 1.9.3, numpy: 1.23.4, asteval: 0.9.27, uncertainties: 3.1.7

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?

@newville
Copy link
Member

@arunpersaud Thanks - I think this is good. I would intend to merge in a couple of days unless there are any other concerns or comments.

@reneeotten
Copy link
Contributor

@arunpersaud looks good to me, thanks! If you'd be willing to amend your commit message and add "Closes: #815" as the last line of the body that would be great as it will close the Issue automatically when the PR gets merged (then please remove the reference to the issue from the commit summary).

Fix the linear mode for RectangleModel. Also update the documentation
and update the tests.

Tests:
  * Using numpy functions now allows lineshape.rectangle to handle
    single floats, so the tests needed to be updated
  * added tests for step and rectangle to make sure we get A/2 at
    mu1 (and mu2)

Docs:
  * update to reflect code and make brackets in LaTeX equations a bit nicer

Closes: lmfit#815
@arunpersaud
Copy link
Contributor Author

just updated the commit message.

@newville
Copy link
Member

@reneeotten OK to (squash and) merge?

@reneeotten reneeotten merged commit 3219116 into lmfit:master Nov 1, 2022
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.

3 participants