mammos_entity#
Entity (Quantity and EMMO ontology label).
Exposes the primary components of the MaMMoS entity package, including the Entity class for ontology-linked physical quantities, pre-defined factory methods for common magnetic entities (Ms, A, Ku, H), and the loaded MaMMoS ontology object.
Functions
|
Create an Entity representing the exchange stiffness constant (A). |
|
Create an Entity representing the magnetic flux density (B). |
|
Create an Entity representing the maximum energy product of the hysteresis loop. |
|
Create an Entity representing the external magnetic field (H). |
|
Create an Entity representing the external coercive field (Hc). |
|
Create an Entity representing the magnetic polarisation (J). |
|
Create an Entity representing the spontaneous magnetic polarisation (Js). |
|
Create an Entity representing the uniaxial anisotropy constant (Ku). |
|
Create an Entity representing the magnetization. |
|
Create an Entity representing the remanent magnetisation (Mr). |
|
Create an Entity representing the spontaneous magnetization (Ms). |
|
Create an Entity representing the temperature (T). |
|
Create an Entity representing the Curie temperature (Tc). |
|
Concatenate objects into a unique flat Entity. |
Classes
Create a quantity (a value and a unit) linked to the EMMO ontology. |
- mammos_entity.A(value=0, unit=None)[source]#
Create an Entity representing the exchange stiffness constant (A).
- Parameters:
- Returns:
An Entity object labeled “ExchangeStiffnessConstant”.
- Return type:
- mammos_entity.B(value=0, unit=None)[source]#
Create an Entity representing the magnetic flux density (B).
- Parameters:
- Returns:
An Entity object labelled “MagneticFluxDensity”.
- Return type:
- mammos_entity.BHmax(value=0, unit=None)[source]#
Create an Entity representing the maximum energy product of the hysteresis loop.
- Parameters:
- Returns:
An Entity object labelled “MaximumEnergyProduct”.
- Return type:
- class mammos_entity.Entity[source]#
Create a quantity (a value and a unit) linked to the EMMO ontology.
Represents a physical property or quantity that is linked to an ontology concept. It enforces unit compatibility with the ontology.
- Parameters:
ontology_label – Ontology label
value – Value
unit – Unit
Examples
>>> import mammos_entity as me >>> import mammos_units as u >>> Ms = me.Entity(ontology_label='SpontaneousMagnetization', value=8e5, unit='A / m') >>> H = me.Entity("ExternalMagneticField", 1e4 * u.A / u.m) >>> Tc_kK = me.Entity("CurieTemperature", 0.1, unit=u.kK) >>> Tc_K = me.Entity("CurieTemperature", Tc_kK, unit=u.K)
- property axis_label: str#
Return an ontology-based axis label for the plots.
The axis label consist of ontology label and unit: - The ontology label is split with spaces at all capital letters - The units are added in parentheses.
- Returns:
A string for labelling the axis corresponding to the entity on a plot.
Examples
>>> import mammos_entity as me >>> me.Entity("SpontaneousMagnetization").axis_label 'Spontaneous Magnetization (A / m)' >>> me.Entity("DemagnetizingFactor").axis_label 'Demagnetizing Factor'
- property ontology: owlready2.entity.ThingClass#
Retrieve the ontology class corresponding to the entity’s label.
- Returns:
The ontology class from mammos_ontology that matches the entity’s label.
- property ontology_label: str#
The ontology label that links the entity to the EMMO ontology.
Retrieve the ontology label corresponding to the ThingClass that defines the given entity in ontology.
- Returns:
The ontology label corresponding to the right ThingClass.
- Return type:
- property ontology_label_with_iri: str#
The ontology label with its IRI. Unique link to EMMO ontology.
Returns the self.ontology_label together with the IRI (a URL that points to the definition of this entity.) IRI stands for Internationalized Resource Identifier.
If only the IRI is desired, one can use self.ontology.iri.
- Returns:
- The ontology label corresponding to the right ThingClass,
together with the IRI.
- Return type:
- property q: mammos_units.Quantity#
Quantity attribute, shorthand for .quantity.
- mammos_entity.H(value=0, unit=None)[source]#
Create an Entity representing the external magnetic field (H).
- Parameters:
- Returns:
An Entity object labeled “ExternalMagneticField”.
- Return type:
- mammos_entity.Hc(value=0, unit=None)[source]#
Create an Entity representing the external coercive field (Hc).
- Parameters:
- Returns:
An Entity object labeled “CoercivityHcExternal”.
- Return type:
- mammos_entity.J(value=0, unit=None)[source]#
Create an Entity representing the magnetic polarisation (J).
- Parameters:
- Returns:
An Entity object labeled “MagneticPolarisation”.
- Return type:
- mammos_entity.Js(value=0, unit=None)[source]#
Create an Entity representing the spontaneous magnetic polarisation (Js).
- Parameters:
- Returns:
An Entity object labeled “SpontaneousMagneticPolarisation”.
- Return type:
- mammos_entity.Ku(value=0, unit=None)[source]#
Create an Entity representing the uniaxial anisotropy constant (Ku).
- Parameters:
- Returns:
An Entity object labeled “UniaxialAnisotropyConstant”.
- Return type:
- mammos_entity.M(value=0, unit=None)[source]#
Create an Entity representing the magnetization.
- Parameters:
- Returns:
An Entity object labelled “Magnetization”.
- Return type:
- mammos_entity.Mr(value=0, unit=None)[source]#
Create an Entity representing the remanent magnetisation (Mr).
- Parameters:
- Returns:
An Entity object labelled “Remanence”.
- Return type:
- mammos_entity.Ms(value=0, unit=None)[source]#
Create an Entity representing the spontaneous magnetization (Ms).
- Parameters:
- Returns:
An Entity object labelled “SpontaneousMagnetization”.
- Return type:
- mammos_entity.T(value=0, unit=None)[source]#
Create an Entity representing the temperature (T).
- Parameters:
- Returns:
An Entity object labelled “ThermodynamicTemperature”.
- Return type:
- mammos_entity.Tc(value=0, unit=None)[source]#
Create an Entity representing the Curie temperature (Tc).
- Parameters:
- Returns:
An Entity object labelled “CurieTemperature”.
- Return type:
- mammos_entity.concat_flat(*elements, unit=None)[source]#
Concatenate objects into a unique flat Entity.
At least one of the inputs must be an Entity with a ontology_label. The unit of the first Entity is accepted unless the optional argument unit is defined.
Arrays are flattened according to np.flatten in order=”C”.
Modules
Support for reading and writing Entity files. |