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.
- mammos_entity.A(value=0, unit=None)#
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)#
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)#
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(ontology_label, value=0, unit=None, **kwargs)#
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. Inherits from mammos_units.Quantity and enforces unit compatibility with the ontology.
- Parameters:
- Return type:
mammos_units.Quantity
Examples
>>> import mammos_entity as me >>> m = me.Ms(800000, 'A/m') >>> m SpontaneousMagnetization(value=800000.0, unit=A / m)
- property axis_label: str#
Return an ontology based axis label for the plots.
- Returns:
A string for labelling the axis corresponding to the entity on a plot.
- 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 quantity: mammos_units.Quantity#
Return the entity as a mammos_units.Quantity.
Return a stand-alone mammos_units.Quantity object with the same value and unit, detached from the ontology link.
- Returns:
A copy of this entity as a pure physical quantity.
- property si: mammos_entity.Entity#
Return the entity in SI units.
- Returns:
Entity in SI units.
- to(*args, **kwargs)#
Modify the unit of the entity in accordance to the EMMO ontology.
Override method to convert from one unit to the other. If the coversion requires equivalencies, the method returns a astropy.unit.Quantity otherwise it returns an Entity with modified units.
- Parameters:
unit – The string defining the target unit to convert to (e.g., ‘mJ/m’).
equivalencies – List of equivalencies to be used for unit conversion.
copy – If True, then the value is copied. Otherwise, a copy will only be made if necessary.
- Returns:
mammos_units.Quantity if equivalencies are used to convert the units, mammos_entity.Entity if equivalencies are not used to convert the units.
- Return type:
mammos_units.Quantity | mammos_entity.Entity
- mammos_entity.H(value=0, unit=None)#
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)#
Create an Entity representing the external coercive field (Hc).
- Parameters:
- Returns:
An Entity object labelled “CoercivityHcExternal”.
- Return type:
- mammos_entity.Ku(value=0, unit=None)#
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)#
Create an Entity representing the magnetization.
- Parameters:
- Returns:
An Entity object labelled “Magnetization”.
- Return type:
- mammos_entity.Mr(value=0, unit=None)#
Create an Entity representing the remanent magnetisation (Mr).
- Parameters:
- Returns:
An Entity object labelled “Remanence”.
- Return type:
- mammos_entity.Ms(value=0, unit=None)#
Create an Entity representing the spontaneous magnetization (Ms).
- Parameters:
- Returns:
An Entity object labelled “SpontaneousMagnetization”.
- Return type:
- mammos_entity.T(value=0, unit=None)#
Create an Entity representing the temperature (T).
- Parameters:
- Returns:
An Entity object labelled “ThermodynamicTemperature”.
- Return type:
- mammos_entity.Tc(value=0, unit=None)#
Create an Entity representing the Curie temperature (Tc).
- Parameters:
- Returns:
An Entity object labelled “CurieTemperature”.
- Return type: