Changelog#
Format follows keep a changelog.
2025.06 (Jun 04, 2025)#
All packages now require python >= 3.9.
Added#
mag2expNew submodule for ferromagnetic resonance (FMR) to compute FMR power and phase using the ringown method. For more details refer to the new FMR notebook. (#70)
Additional parameter to control astigmatism in LTEM. (#73)
micromagneticdatamicromagneticmodel
Changed#
ubermagutilChange timestamp format printed to stdout when starting a simulation to isoformat. (#55)
Fixed#
2024.08 (Sep 03, 2024)#
Added#
Changed#
micromagneticmodelRequire the name when initialising the
system. (#85)
Fixed#
micromagneticdataSet
valid="norm"when loading the initial magnetisationdrive.m0. (#69)
- all packages
Full compatibility with
numpy >= 2.0.
2024.06 (Jun 19, 2024)#
Fixed#
Restricted numpy version to be less than 2.0 due to incompatibilities with
the current code base.
2023.11 (Nov 25, 2023)#
Changed#
discretisedfieldThe property
mesh.pointshas been renamed tomesh.cellsto avoid ambiguity. (#508)
Fixed#
2023.10 (Oct 23, 2023)#
The meta-package ubermag now uses calendar-based versioning. We use a style
that is broadly inspired by Ubuntu: we use the year and the month and optionally
a patch (YYYY.0M[.patch]). We omit the number for patch 0 and only add
and increase patch when there are two releases in a month. The versioning is
not related to the type of changes (and a patch does not necessarily mean a
bug fix). For the type of changes please refer to this changelog or the versions
of the individual packages, which follow semantic versioning.
Breaking changes in discretisedfield#
discretisedfield has been refactored to support scalar and (m-dimensional)
vector fields on n-dimensional meshes. As part of this refactoring, several
inconsistencies and ambiguities have been removed. These changes break existing
code! The following summary lists all user-facing changes (removed, renamed,
added functionality). Even though the list below is fairly long, most notebooks
only require a few changes. The most common ones are the switch dim -> nvdim
and adding valid='norm' when creating a field, and the replacement
plane -> sel.
The shape of the domain (i.e. the shape of the region/mesh) is now referred to
as dim, the shape of the field values as vdim (vector/value dimension).
RegionModified: scaling a region is now done with the method
scale, the option to scale a region by multiply it with a number has been removed. Scaling can optionally be done in-place.New: regions can be translated in space with
translate. Translating can optionally be done in-place.Modified: a new method
allclosechecks if two regions are the same within numerical accuracy, the operator now==checks for exact equality.Modified: the operator
|has been replaced with the new methodfacing_surfaceRemoved: properties
p1andp2, usepminandpmaxChanged: the return type of points (e.g.
pmin,pmax,centre) is now anumpy.ndarrayChanged:
unithas been renamed tounitsand is a tuple to supports different units along different directions (only used as labels on plots, not for calculations).New: property
ndimto get the number of dimensions of the space.New: property
dims, names of the spatial dimensions.New: method
rotate90to perform 90 degree rotations of the region.
MeshModified: a new method
allclosechecks if two regions are the same within numerical accuracy, the operator now==checks for exact equality.Modified: inconsistent behaviour of
mesh[subregion]; this operator will now always use closed intervals, i.e. the returned submesh is now always inclusive of endpoints.Modified: the operator
|has been replaced with a new method calledis_aligned.Removed:
axispoints(was deprecated), usepointsinstead.Removed:
neighboursRenamed and modified:
planehas been replaced with a newselmethod. (for details refer to the Field documentation)Removed:
attributesRemoved:
dS; was used for integrals; the new syntax for integrals does not any longer use it (see below).Renamed:
midpointstopointsModified: new method
coordinate_fieldthat was previous part of theFieldclass.New:
scaleandtranslatesimilar to theRegionclass.New: method
rotate90to perform 90 degree rotations of the mesh.
FieldModified: getting the value at a point (
field(...)) now returns anumpy.ndarray.Modified: only field values are returned when iterating over a field. (documentation)
Removed:
coordinate_fieldis now part of theMeshclass.Renamed and modified:
derivative->diff; now supports holes inside the field. (documentation)Modified: new integration syntax. (documentation)
Renamed:
fromfile->from_fileRenamed and modified:
planehas been replaced with a newselmethod. (documentation)Removed:
projecthas been removed, usemeanwith theaxisargument instead.Renamed:
write->to_fileModified:
anglenow takes a vector as reference and does not anymore require sliced fields.Renamed:
dim->nvdimto avoid ambiguities, the new name is also required as an argument when creating a field.Renamed:
components->vdimsRenamed:
units->unitRemoved:
value, to update field values use the new methodupdate_field_valuesinstead, to read data use thearrayproperty.Removed:
zeroclass method; omit thevalueargument to create a field filled with zeros (was already supported before).New: method
resampleto compute field values on a new mesh; the nearest points will be used, interpolation is not supported. (documentation)New: property
validto define parts that contain material; this can be set to the field norm on init using the optionalvalid='norm'argument. (documentation)Modified: new hdf5 format to store all field information (e.g. subregions were missing before). (documentation)
New: Documentation for performing FFT on the
Fieldclass (documentation).New: method
rotate90to perform 90 degree rotations of the field. (documentation).Modified: Differential operators
grad,div,curl, andLaplacianhave been generalised to n dimensions.Plotting with holoviews now uses
field.validto hide data (e.g. based on their norm). Thenorm_filterproperty as well as theDefaultsclass for plotting have been removed. Usevalid="norm"when initialising the field. (#475)
Added#
Changed#
ubermagutilAn additional summary line is printed for the progress bar context manager. Users will see the additional line when using
oommfcormumax3ctime drives or min drives withverbose=2. This was added because the progress bar in the notebook is not persistent across sessions. (#39)
Fixed#
micromagneticmodelWrong value of \(\mu_B\). (#79)
mumax3cBug in mumax3 detection when passing the full path to the mumax3 executable. (commit b2c334d)
Bug in current conversion for Zhang-Li. (#73)
oommfc
0.66.1 (Feb 3, 2023)#
Fixed#
0.66.0 (Oct 20, 2022)#
Added#
discretisedfieldReading and writing for
Fieldobjects now supportspathlib.Pathobjects. Furthermore, the code has been reorganised (mostly invisible for end users, a newiosubmodule has been added). (#158)Subregions are saved in a json file (
<field-name>.<extension>.subregions.json) when saving a field and automatically loaded when a field is loaded from disk and the json file exists. (#158, #163)
micromagneticdataSubregion information is loaded when accessing magnetisation fields (if available). (#35)
Callbacks can be registered in the drive object to apply any sort of processing (e.g. calculating the normalised field or topological charge density) before returning individual fields in a drive. (#35)
Support for slicing in getitem in Drive, e.g.
drive[::2]will return a new drive object that only contains every second magnetisation file. (#35)
oommfcSubregion information is loaded when using
compute(if available). (#116)
Changed#
discretisedfieldmicromagneticdataHoloviews plotting now reads data from disk when it is accessed in the plot. This greatly improves the initial rendering of the plot and can avoid memory problems. Note that on slow file systems updating the plot when moving a slider might take more time. (#35)
Fixed#
discretisedfieldMissing initialisation when computing
field.orientationfor a field with zero norm in some cells. (commit 4a8fca4)
0.65.0 (Jul 17, 2022)#
Changed#
discretisedfieldmicromagneticdataRewrite of the
to_xarraymethod to improve performance and reduced memory consumption. The maximum memory consumption is now roughly equivalent to the on-disk size of the data. The old method had a roughly doubled peak memory consumption. (#33)
micromagneticmodelFix the LaTex representation of Landau-Lifshitz-Gilbert equation in the presence of Zhang-Li and Slonczewski torque terms. (#52)
0.64.0 (Jul 03, 2022)#
mumax3cA new package
mumax3chas been added and allows users to use mumax3 as a new calculator in addition to OOMMF.
0.63.0 (Jun 29, 2022)#
Added#
discretisedfieldSupport for interactive plots based on Holoviews with
Field.hvconvenience method,Field.hv.scalar,Field.hv.vector, andField.hv.contour. Refer to the package documentation for details. (#140)
micromagneticdataTwo new drive classes
OOMMFDriveandMumax3Drivehave been added. Users should not create these directly. Instead the genericDriveclass should be used which automatically creates an object of the correct sub-type depending on the information found for the respective drive. (#29)Interactive Holoviews-based plotting for drives with
drive.hvproperty. It provides the same functionality asField.hv. (#26)
micromagneticmodelUser-defined name for a Zeeman energy term is displayed in its LaTex representation in the Jupyter notebook. (#45)
Containers (
system.energyandsystem.dynamics) have a new methodget(type=...)to get all terms in the container that have the specified type. (# 50)Containers (
system.energyandsystem.dynacmics) now supportcontainer[index](__getitem__) to obtain a term by its index. (#50)
oommfcThe input for OOMMF (
miffile and related files) can now be created without starting the actual simulation usingDriver.write_mif(...). (#104)A drive (call to OOMMF) can be sent to a scheduling system such as Slurm using
Drive.schedule(...). All input files (miffile and related files) are created from the running Python program. The user must pass the submission command of the scheduling system and a “header” file that defines system resources as required for the scheduling system. Furthermore, it is the user’s responsibility to ensure that OOMMF is available inside the scheduled job (e.g. by loading the correct conda environment in the header file). The command line to call OOMMF is added to the header file, the file is saved to the drive directory and subsequently a job is submitted to the scheduling system. (#104)The
OOMMFRunnerclasses take an additional argumentdry_runto return the OOMMF command call instead of calling OOMMF from a subprocess. (#104)
ubermagutil
Changed#
discretisedfieldVector fields with zero values can now be normalised. The rescaling of the vectors is only done for non-zero values. (#149)
mag2expAll functions do now operate on
discretisedfield.Fieldobjects instead ofmicromagneticmodel.Systemobjects. Therefore, measurements can be simulated for data that has not been created with a micromagnetic simulation as long as the data can be represented as adiscretisedfield.Fieldobject. (#31)
micromagneticmodelComparison of
micromagneticmodel.Termobjects (e.g.micromagneticmodel.Exchange) now takes into account all attributes of the two terms. Previously, only the names of the two terms were compared. (#46)
oommfcThe
overheadfunction now runs the simulations in a temporary directory. (#110)
Fixed#
discretisedfieldWrong normalisation of the lightness component in lightness plots if not all angles are covered. (commit 2de6360)
Checks if a point is inside a
Region(point in region) give wrong results if the points are inside the region in some spatial direction and at the region boundary (outside within the numerical precision) in the other spatial directions failed despite the point being in the region. (#153)
micromagneticdatadata[index]returns a drive for drive numbersindexlarger than the maximum drive number on disk (by computing module of index). (#24)
oommfc
0.62.1 (Jun 09, 2022)#
Fixed#
discretisedfieldImporting
discretisedfieldfails on some platforms becauseopenh264is missing. (#146)
0.62.0 (May 22, 2022)#
Added#
discretisedfieldSupport for exporting
Fieldobject to thexarray.DataArraywithto_xarrayinstance method (#123).Support for initiating
Fieldobject from thexarray.DataArraywithfrom_xarrayclass method (#123).New implementation for initialising a field from an other field with much better performance (example: initial field with
n=(100, 100, 10), new field withn=(10, 10, 10), speedup ~1000). This method does e.g. also speed up theField.planemethod (#135).The
__contains__operator for the region (the in operatorregion1 in region2) uses a new method to calculate the distance between the points to improve stability when edge points of the regions are very close and differences are mainly related to floating-point inaccuracies. This is done by introducing a new region propertytolerance_factor(with a default value1e-12) that is internally multiplied with the minimum of the edge lengths to obtain values for relative and absolute tolerance (#135).Refactoring of the matplotlib-based plotting methods for
df.Field(df.Field.mpl...) improve performance of the plot creation (#133).Refactoring of
df.Region.mplto show the correct aspect ratio of the region. This automatically also applies to the matplotlib-based plotting methods ofdf.Mesh. A new keywordbox_aspect(defaultbox_aspect='auto') can be used to set an arbitrary aspect ratio by passing a tuple. For the default value'auto'the aspect of the region is used. You may run into problems with overlapping ticks or axis labels. These cannot currently be dealt with easily in an automatic fashion and require manual adjustment after the plot is created (by passing an axis object) if proper axis ticks and labels are required (#134).New implementation for reading and writing
vtkfiles. Files can now be written in textual (txt), binary (bin) or xml (xml) representation. The field data is now stored to vtk cell data (previously: point data). Some subsequent plotting operations in other tools (e.g. plotting isosurfaces) typically requires a conversion from cell data to point data in that tools first (e.g. by using a filter in Paraview).discretisedfieldcan still read the old vtk files (with the values stored as point data) and tries to do that automatically when the provided file can’t be read with the new method. In particular for writing huge speedups compared to the old implementation are possible (example:n=(200, 200, 100)written in binary representation, speedup > 1000). By default data is written in binary format. (#129)A
unitsproperty has been added to theFieldclass to store the units of the field values. Note, that units are mostly used for plotting and are removed during all mathematical operations. Units are automatically read fromovffiles if present. (#141)An additional class method
coordinate_fieldhas been added to theFieldclass. It takes a mesh and creates a 3d vector field with values equal to the coordinates of the respective cell midpoints. (#144)
micromagneticdataSupport for converting all magnetisation data of a
Driveinto anxarray.DataArraywithto_xarrayinstance method. (#18)Multiple drives of the same type (with the same independent variable
drive.xcan be combined into a newmicromagneticdata.CombinedDrive. Combining is also supported viadrive1 << drive2which “appends”drive1todrive2. The combined drive allows iteration over all magnetisation snapshots of the individual drives. (#22)
oommfcWhen using the
TimeDriverwithverbose=2a simple status bar is displayed to show the simulation progress. Note, that the shown information is only a rough hint as the progress is measured based on the total number of stepsnand the number of files already written to disk. (#100)
ubermagutil
Removed#
Fixed#
discretisedfieldChanges in the calculation of the demag tensor to avoid zero-division problems and
nanvalues in the demag field. (#137)
oommfcUsing the
DockerOOMMFRunnerdid not work in combination with SELinux because the directiories inside the docker image were not readable/writable. TheDockerOOMMFRunnernow has an additional optional argument to enable read/write access with SELinux (#95).
0.61.2 (Mar 17, 2022)#
Fixed#
0.61.0 (Feb 22, 2022)#
General#
Support Cnv, D2d, and T(O) crystallographic class DMI and magneto-elastic (MEL) extensions in conda-installed Ubermag on Windows, in addition to MacOS and Linux.
Added#
discretisedfieldSupport for
filter_fieldin plotting methodField.mpl.lighness.HTML representation for
Region,Mesh,Field, andFieldRotatorinside Jupyter notebook (#105).New implementation for the Field initialisation significantly improves performance when initialising a field with a dictionary. Speedups of up to ~10_000 can be obtained if the dictionary does not contain callables. (#114, #117)
New implementation for reading and writing
ovf(omf) files with huge performance improvements. For aFieldcontaining 1 million cells we obtained the following execution times (on a standard notebook):mode
filesize
reading
writing
old
new
speedup
old
new
speedup
bin4
2.9M
1730 ms
21 ms
82
63000 ms
56 ms
1125
bin8
5.8M
1860 ms
52 ms
52
64000 ms
84 ms
762
text
15M
4920 ms
401 ms
12
69000 ms
4510 ms
15
The new default is
bin8(binary represenation with double precision) instead oftxt(#121).
oommfcEnables Cnv, D2d, and T(O) crystallographic class DMI and magneto-elastic (MEL) extensions on Windows hosts (no more need for Docker).
ExeOOMMFRunnercan be used on Windows. Limitation: On Windows it is not possible to run multiple simulations in parallel without using Docker.OOMMF output is now by default written in binary format (double precision). There is a new option in the driver’s
drivemethod (ovf_format) to change the output format (#77).OOMMF can now run silently without anything printed. To use it pass the option
verbose=0to<DRIVER>.drive. The default isverbose=1which prints one summary line about the used runner and the runtime. This is the old behaviour. (#80).
Changed#
discretisedfieldKeywords for
Field.mpl()renamed toscalar_kwandvector_kw(#108).
micromagneticmodelVariable names for time-dependent fields and currents changed (for consistency reasons).
Fixed#
discretisedfieldSimultaneous use of
filter_fieldandsymmetric_climinField.mpl.scalarresulted in wrong colorbar limits (#106).
oommfcSpecifying two Zeeman fields with H defined via a
df.Fieldbroke the simulation (#191)The name of the hysteresis field of the
HysteresisDriverhas been renamed toB_hysteresis. This solves an issue of having two magnetic fields with the same name if a hysteresis simulation is performed with an additional zeeman field.
0.60.0 (Oct 1, 2021)#
General#
Unified website containing all documentation: https://ubermag.github.io
Versions in sync across all packages
Switch to Jupyter lab 3 (should improve situation with
K3dinside Jupyter lab).
Added#
discretisedfieldFourier transform for
discretisedfield.Field(reference).Custom labels for vector components in
discretisedfield.Field(reference).New plotting interface for
discretisedfield.Fieldanddiscretisedfield.Regionfor bothmatplotlibandK3d. Plotting functions can be accessed asField.mpl.*(and for convenienceField.mpl()) formatplotliband similarly forK3d.Improved lightness plotting and new contour line plot.
Full support for complex values in
discretisedfield.Field.Rotations of
discretisedfield.Fieldobjects (documentation).discretisedfield.Fieldnow supports allnumpy ufuncs.Calculation of the demag tensor and demag field in
discretisedfield.tools(reference).
mag2expNew subpackage
mag2expto simulate experimental measurement (documentation).
micromagneticmodelGeneralisation of OOMMF extensions
DMI_CnvandDMI_D2dto support grains oriented alongx,y, orz(new names, e.g.DMI_Cnv_z) (documentation).Support for arbitrary time-dependence for external magnetic fields (
micromagneticmodel.Zeeman) and spin-polarised currents (micromagneticmodel.Slonczewskiandmicromagneticmodel.ZhangLi) (documentation).
oommfcSupport for OOMMF extension
Xf_ThermHeunEvolver,Xf_ThermSpinXferEvolver, andUHH_ThetaEvolvefor simulations at finite temperature.Control over the default runner in
oommfcviaoommfc.runnerobject (documentation).
ubermagConvenient control over logging of all subpackages via
ubermag.setup_logging(documentation).
ubermagtableFourier transform for
ubermagtable(documentation).
Fixed#
discretisedfieldWrong colourbar positioning in
discretisedfield.mpl*in figures containing multiple subplots.Fixed aspect ratio for
quiverplots indiscretisedfield.Field.
micromagneticmodelCreating a term
micromagneticmodel.Slonczewskitwice with the same dictionary forPorLambdaresults in aValueError
oommfcubermagtable
0.51 (Feb 10, 2021)#
New subpackage
discretisedfield.toolscontaining functions to operate ondiscretisedfield.Fieldobjects.New integration syntax.