flatspin.astroid#

Generalized Stoner-Wohlfarth Astroid

flatspin.astroid.rotate_points(x, y, theta)#
flatspin.astroid.gsw(h_par, b=1.0, c=1.0, beta=3.0, gamma=3.0, hc=1.0)#

Generalized Stoner-Wohlfarth Astroid (explicit form)

flatspin.astroid.gsw_par(h_perp, b=1.0, c=1.0, beta=3.0, gamma=3.0, hc=1.0)#

Generalized Stoner-Wohlfarth Astroid (explicit form, par version)

flatspin.astroid.gsw_implicit(h_par, h_perp, b=1.0, c=1.0, beta=3.0, gamma=3.0, hc=1.0)#

Generalized Stoner-Wohlfarth Astroid (implicit form)

flatspin.astroid.gsw_astroid(b=1.0, c=1.0, beta=3.0, gamma=3.0, hc=1.0, rotation=0, resolution=361, angle_range=(0, 6.283185307179586))#

Generate samples from the Generalized Stoner-Wohlfarth Astroid

flatspin.astroid.db#

Astroid database table.

Type:

pd.DataFrame

flatspin.astroid.astroid_params(**filter)#

Lookup parameters from the astroid database.

Parameters:

**filter (dict) – column=value to match one row from the database. Consult astroid.db.columns for available column names.

Examples

>>> astroid_params(shape="stadium", width=220, height=80, thickness=20)
{'hc': 0.1898446831994154,
'sw_b': 0.3656109262423056,
'sw_c': 1.0,
'sw_beta': 1.6801798570360171,
'sw_gamma': 2.749154122977873}
Raises:

ValueError – If there are none or multiple matches.