It is now possible trace magnetic field lines through PLUTO data. The code for doing this is exactly the same as for MAS data.
Variables from MAS 2T and/or WTD runs can now be read (te, tp, zp, zm, ep, em, heat).
Removed a couple of un-needed dependencies from the package.
Fixed the erroneous MAS current density normalization.
Standardized the MAS normalization constants to all be correct to 8 significant figures.
sample_at_coords()erroring for some valid model data.
Fixed the Matplotlib tracing example in the gallery.
MAS output files with timestamps > 3 digits long can now be read in.
psipy.model.variable.Variable.sample_at_coordswill now return
NaNfor any sample points that are out of bounds, and raise a warning letting the user know some points were out of bounds.
The radial coordinate input to the sphere methods on
psipy.visualization.pyvista.MASPlotteris now required to be a
Quantity(with length units) instead of a plain numpy array.
Fixed the in-situ sampling example.
Fixed the multiple-time step sample data only returning a single file.
Fixed radial coordinate units in PLUTO outputs.
Running psipy on Python 3.10 is now officially supported.
psipy now requires the
pooch package to handle sample data.
Tracing field lines
psipy can now trace field lines through models that have all three
components of the magnetic field available. For more information see new pages
in the guide and new examples in the gallery.
Fixed density units assigned to MAS models.
Loading PLUTO files was broken in version 0.2; this has now been fixed, and tests added to ensure this doesn’t happen again in the future.
Support for multiple timesteps
Support for reading in model outputs across multiple timesteps has been added,
where each timestep is stored in an individual file.
psipy.io.mas.read_mas_file() will automatically read in all the MAS
output files it finds in the given directory. The time coordinate values can be
queried with the new
Variable.time_coords property of variables.
The following methods have been updated to support this:
Variable.sample_at_coordsnow accepts a
targument to interpolate across timesteps.
Variable.contour_equatorial_cutall now accept a
t_idxargument, which is the time index at which to plot the cuts. This defaults to
When loading a set of netCDF files they will be lazily loaded along the time dimension (ie. only one file will be read into memory at any one time).
When loading a set of HDF4 or HDF5 files all of them will be read into memory, so beware loading lots of them! Support for lazy loading may be implemented for HDF4 or HDF5 files in the future.
Variable.plot_equatorial_cut now support animation creation. If multiple
timesteps are loaded in the
Variable and the timestep isn’t specified, a
Animation object will be returend instead of
a single plot being created. See the example gallery for more information on
how to save the animation to disk.
Other new features
convert_hdf_to_netcdf()to convert a set of HDF files to netCDF files. This is useful for creating animations from large datasets, as psipy can keep track of a number of netCDF files without reading them all into memory at once.
Accessing a variable from a model output multiple times will now return the same object, instead of making two copies of the variable in memory.
Added the ability to change the units and radial coordinates of a
There are two new examples showing how to do this in the example gallery.
First PsiPy release.