Skip to content

Conversation

@chris-ashe
Copy link
Collaborator

@chris-ashe chris-ashe commented Jul 4, 2024

Description

The use of gamfun() from maths_library.f90 within plasma_profiles.py for the temperature profile has been removed and replaced with scipy.special.gamma

Checklist

I confirm that I have completed the following checks:

  • I have justified any large differences in the regression tests caused by this pull request in the comments.
  • I have added new tests where appropriate for the changes I have made.
  • If I have had to change any existing unit or integration tests, I have justified this change in the pull request comments.
  • If I have made documentation changes, I have checked they render correctly.
  • I have added documentation for my change, if appropriate.

Copy link
Collaborator

@j-a-foster j-a-foster left a comment

Choose a reason for hiding this comment

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

All looks good to me. I'm assuming where you've removed maths_library that it's only imported to call gamfun?

…scipy.special.gamma instead"

This reverts commit 34219f9.
@chris-ashe
Copy link
Collaborator Author

chris-ashe commented Jul 4, 2024

@j-a-foster Have reverted the commit as it was causing problems with init.f90 and their is still some function used from maths_library.f90

@chris-ashe chris-ashe requested review from timothy-nunn and removed request for timothy-nunn July 4, 2024 12:43
Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com>
Copy link
Collaborator

@timothy-nunn timothy-nunn left a comment

Choose a reason for hiding this comment

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

Line 52 (integrate.simpson) needs to become sp.integrate...

@timothy-nunn timothy-nunn merged commit 1ab7cb1 into main Jul 8, 2024
@timothy-nunn timothy-nunn deleted the 3243-remove-gamfun-and-replace-it-with-the-analytical-solution-from-scipy branch July 8, 2024 08:55
chris-ashe added a commit that referenced this pull request Jul 8, 2024
…cipy (#3244)

* Refactor plasma_profiles.py and profiles.py to use scipy.special.gamma instead of maths_library.gamfun

* Refactor maths_library.f90 to remove gamfun function and use scipy.special.gamma instead

* Black format

* Update unit tests

* Revert "Refactor maths_library.f90 to remove gamfun function and use scipy.special.gamma instead"

This reverts commit 34219f9.

* Update process/profiles.py

Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com>

* chore: Update scipy import in profiles.py

---------

Co-authored-by: Timothy <75321887+timothy-nunn@users.noreply.github.com>
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.

Remove gamfun and replace it with the analytical solution from scipy

4 participants