Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge FreeMagnetismInterface feature enhancement (#232)
* ENH: add free interface in addition to free layer for magnetism. * FIX: length of vectors not equal when dthetaM is not defined Also fixed issue with magnetic profile calculation when drhoM[-1] = 0. * FIX: Make thetaM behave the same as rhoM Removed conditions at lines 514 and 521. Also added same statement at line 520 as is used for rhoM. This should now behave in the same way as FreeInterface. * Lint * FIX: nans in mono.py as result of divide by zero Removed divide by zero when z[-1]=0. * FIX: changed FreeMagnetismInterface thetaM above or below default value when not specified If only tabove or tbelow are specified then they are made equal. If neither are specified they are made the same as DEFAULT_THETA_M. This is to get around the issue when interfacing with a non-magnetic layer where the thetaM value should not change. * Additional Edits for FreeMagnetismInterface Additional edits as suggested by Paul K. * create self-extracting version of unstable windows .exe.zip * numba required for readthedocs build * set max initial ylim on spin asymmetry plot * add link to unstable release page * ENH: add free interface in addition to free layer for magnetism. * FIX: length of vectors not equal when dthetaM is not defined Also fixed issue with magnetic profile calculation when drhoM[-1] = 0. * FIX: Make thetaM behave the same as rhoM Removed conditions at lines 514 and 521. Also added same statement at line 520 as is used for rhoM. This should now behave in the same way as FreeInterface. * Lint * FIX: nans in mono.py as result of divide by zero Removed divide by zero when z[-1]=0. * FIX: changed FreeMagnetismInterface thetaM above or below default value when not specified If only tabove or tbelow are specified then they are made equal. If neither are specified they are made the same as DEFAULT_THETA_M. This is to get around the issue when interfacing with a non-magnetic layer where the thetaM value should not change. * Additional Edits for FreeMagnetismInterface Additional edits as suggested by Paul K. * ENH: add free interface in addition to free layer for magnetism. * FIX: length of vectors not equal when dthetaM is not defined Also fixed issue with magnetic profile calculation when drhoM[-1] = 0. * FIX: Make thetaM behave the same as rhoM Removed conditions at lines 514 and 521. Also added same statement at line 520 as is used for rhoM. This should now behave in the same way as FreeInterface. * Lint * FIX: nans in mono.py as result of divide by zero Removed divide by zero when z[-1]=0. * FIX: changed FreeMagnetismInterface thetaM above or below default value when not specified If only tabove or tbelow are specified then they are made equal. If neither are specified they are made the same as DEFAULT_THETA_M. This is to get around the issue when interfacing with a non-magnetic layer where the thetaM value should not change. * Additional Edits for FreeMagnetismInterface Additional edits as suggested by Paul K. * ENH: add free interface in addition to free layer for magnetism. * FIX: Make thetaM behave the same as rhoM Removed conditions at lines 514 and 521. Also added same statement at line 520 as is used for rhoM. This should now behave in the same way as FreeInterface. * Additional Edits for FreeMagnetismInterface Additional edits as suggested by Paul K. * ENH: add free interface in addition to free layer for magnetism. * FIX: length of vectors not equal when dthetaM is not defined Also fixed issue with magnetic profile calculation when drhoM[-1] = 0. * FIX: Make thetaM behave the same as rhoM Removed conditions at lines 514 and 521. Also added same statement at line 520 as is used for rhoM. This should now behave in the same way as FreeInterface. * Lint * FIX: nans in mono.py as result of divide by zero Removed divide by zero when z[-1]=0. * FIX: changed FreeMagnetismInterface thetaM above or below default value when not specified If only tabove or tbelow are specified then they are made equal. If neither are specified they are made the same as DEFAULT_THETA_M. This is to get around the issue when interfacing with a non-magnetic layer where the thetaM value should not change. * Additional Edits for FreeMagnetismInterface Additional edits as suggested by Paul K. * ENH: add free interface in addition to free layer for magnetism. * FIX: Make thetaM behave the same as rhoM Removed conditions at lines 514 and 521. Also added same statement at line 520 as is used for rhoM. This should now behave in the same way as FreeInterface. * Additional Edits for FreeMagnetismInterface Additional edits as suggested by Paul K. * ENH: add free interface in addition to free layer for magnetism. * FIX: length of vectors not equal when dthetaM is not defined Also fixed issue with magnetic profile calculation when drhoM[-1] = 0. * FIX: changed FreeMagnetismInterface thetaM above or below default value when not specified If only tabove or tbelow are specified then they are made equal. If neither are specified they are made the same as DEFAULT_THETA_M. This is to get around the issue when interfacing with a non-magnetic layer where the thetaM value should not change. * Additional Edits for FreeMagnetismInterface Additional edits as suggested by Paul K. * Linting and bringing in line with master * Maint: Serialize `FreeMagnetismInterface` * Tidying up to minimise changes When updating the branch to the latest version from the master branch a lot of merge conflicts had to be gone through. Here I am correcting where I accepted minor changes that do not matter to the code but deviate from the master branch unnecessarily. * Fix: Serializing/De-serializing of FreeInterface * Tidy up imports * Sorting Merge conflicts * Further import tidy up * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Updated dataclass types for `FreeMagnetismInterface` * minor fixup on stored attribute types (they are always stored as Parameter after init, even ones that are supplied as float to the init function) * fixes to FreeInterface class, adding magnetism and setting last element of z to 1 if it is zero * add FreeMagnetismInterface class * add FreeMagnetismInterface to names * FIX: Limits of rhoM should be +- inf in `FreeMagnetism` * ENH: add magnetism attr to `FreeLayer` * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Paul Kienzle <[email protected]> Co-authored-by: Brian Benjamin Maranville <[email protected]> Co-authored-by: Paul Kienzle <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information