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

Backfield Curve Unmixing #13

Open
maxwellbrown opened this issue Feb 14, 2024 · 7 comments
Open

Backfield Curve Unmixing #13

maxwellbrown opened this issue Feb 14, 2024 · 7 comments
Assignees

Comments

@maxwellbrown
Copy link
Collaborator

Develop MaxUnmix for python. I think Mike Volk may have done this. He did email me today, so I can reach out to him about this.

@Swanson-Hysell
Copy link
Member

There is some code in PmagPy that @botaoxiongyong developed in this regard that is illustrated here:

Screenshot 2024-02-14 at 8 48 11 AM

The code that @botaoxiongyong developed is here: https://github.com/botaoxiongyong/pyIRM
and is implemented in this notebook: https://github.com/botaoxiongyong/pyIRM/blob/master/pyIRM/pyIRM.ipynb

@duserzym has experimented with approaches to do such unmixing in Python as well.

@maxwellbrown
Copy link
Collaborator Author

Very nice. Thanks, Nick and Jiabo @botaoxiongyong.

@duserzym
Copy link
Collaborator

Very cool functions!

The way the best fit and the uncertainty bounds are determined are different than MaxUnmix. Worth adding more detailed description once added to RockmagPy!

@josh-feinberg
Copy link
Collaborator

Yes, we spent a lot of time discussing this when developing MaxUnmix and it was an issue for some of the reviewers too. Definitely want to add detailed descriptions of how data are being processed.

@Swanson-Hysell
Copy link
Member

Our idea here is that we can develop a VSM_backfield.ipynb that:

  • plots the data
  • calculates Bcr
  • calculates the derivative
  • fit coercivity spectra

@duserzym
Copy link
Collaborator

I made an attempt with package lmfit committed at 77c5518. The method follows the example given here: https://lmfit.github.io/lmfit-py/model.html in lmfit which implements the method of https://www.astro.rug.nl/software/kapteyn/kmpfittutorial.html#confidence-and-prediction-intervals which is based on J. Wolberg, Data Analysis Using the Method of Least Squares, 2006, Springer. It does not require resampling and refitting of the data. I believe both Max Unmix and Jiabo's methods resample data to generate uncertainty regions. More info here: https://www.astro.rug.nl/software/kapteyn/kmpfittutorial.html#confidence-and-prediction-intervals

@duserzym
Copy link
Collaborator

@peat22 Hi Peat there is an issue with the exported backfield measurements in MagIC format that does not exist in the Excel format.

If you take a look at columns magn_mass and treat_dc_field in the measurement table of my SSRM2022C MagIC export (https://github.com/PmagPy/RockmagPy-notebooks/tree/main/example_data/SSRM2022C), you will find that for some specimens, the values in these two fields sometimes go wrong in the middle of the experiments. The magn_mass will miss the negative signs, and jump to either very big values or very small values. I am guessing this has to do with counting character positions when parsing the VSM data in the IRMDB when exporting into MagIC format.

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

No branches or pull requests

4 participants