Skip to content

Adding Curie temperature estimation functionality to rockmagpy#776

Merged
apivarunas merged 5 commits into
PmagPy:masterfrom
apivarunas:adding-curie-estimates
Dec 4, 2025
Merged

Adding Curie temperature estimation functionality to rockmagpy#776
apivarunas merged 5 commits into
PmagPy:masterfrom
apivarunas:adding-curie-estimates

Conversation

@apivarunas

Copy link
Copy Markdown
Collaborator

This PR is me porting over to rockmag.py my attempt ( #726 ) at addressing #709 in ipmag.py. Since the X-T plotting functionality in rockmag.py looks pretty robust and uses the same np.gradient logic for the derivatives I put in that PR, I figured that the useful thing I could do would be to add the Curie temperature estimation.

I've not only done it but added a significantly better version of the inverse temperature estimation, wherein the user can do it interactively by dragging a line in a Bokeh plot. pats self and Copilot on the back...

The derivative-based estimates are easy and automatic.

Additional thought: If this passes muster, I can make one more commit in in #726 by simply removing(!) the curie.py function from ipmag.py, and close that loop. Then, the rock magnetic functions live in rockmag.py and there isn't duplication.

@apivarunas apivarunas requested a review from duserzym September 7, 2025 04:25
@apivarunas apivarunas requested review from Swanson-Hysell and removed request for duserzym October 16, 2025 19:03
@apivarunas apivarunas requested review from Copilot and removed request for Swanson-Hysell November 6, 2025 21:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new function estimate_curie_temperature to the pmagpy/rockmag.py module for estimating Curie temperature from high-temperature susceptibility curves using multiple methods including first derivative minimum, second derivative maximum, and zero-crossing analysis, with an optional interactive inverse susceptibility method using Bokeh.

Key changes:

  • New estimate_curie_temperature function with support for multiple estimation methods and interactive visualization
  • Additional Bokeh imports (ColumnDataSource, PointDrawTool, CustomJS, Div) to support interactive fitting

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pmagpy/rockmag.py Outdated
Comment thread pmagpy/rockmag.py Outdated
Comment thread pmagpy/rockmag.py Outdated
Comment thread pmagpy/rockmag.py Outdated
Comment thread pmagpy/rockmag.py Outdated
Comment thread pmagpy/rockmag.py Outdated
Comment thread pmagpy/rockmag.py Outdated
Comment thread pmagpy/rockmag.py Outdated
Comment thread pmagpy/rockmag.py Outdated
Comment thread pmagpy/rockmag.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 15 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pmagpy/rockmag.py Outdated
Comment thread pmagpy/rockmag.py
Comment thread pmagpy/rockmag.py Outdated
Comment thread pmagpy/rockmag.py Outdated
Comment thread pmagpy/rockmag.py Outdated
Comment thread pmagpy/rockmag.py Outdated
Comment thread pmagpy/rockmag.py
Comment thread pmagpy/rockmag.py
Comment thread pmagpy/rockmag.py Outdated
Comment thread pmagpy/rockmag.py
@apivarunas apivarunas merged commit 05c6da9 into PmagPy:master Dec 4, 2025
2 checks passed
@apivarunas apivarunas deleted the adding-curie-estimates branch December 4, 2025 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants