Plonk

Latest version: v0.7.4

Safety actively analyzes 687918 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

0.7.4

Changed

- Moved from Travis CI to GitHub actions for tests/CI.
- Moved to src layout.
- Version is now set in `src/plonk/__init__.py` which is read in `setup.cfg`.
- Update MANIFEST.in.
- Renamed master branch to main. Changes reflected in docs.
- Restructure docs, including changing from reStructuredText to Markdown using myst-parser.

0.7.3

Added

- Add add_alias method to Profile.
- Add disc_viscosity, alpha_shakura_sunyaev, epicyclic_frequency, midplane_stokes_number profiles.
- Add utils vector_array_names like dust_array_names.
- Add plotting of multiple dust or vector profiles.
- Add extra test data to complement the test suite.
- Add function to set missing header values on converted Phantom-HDF5 files.

Changed

- Renamed toomre_Q profile to toomre_q.
- Use cache context manager to generate some Snap attributes so as to not cache some arrays in memory.
- Some profiles have been removed when making non-radial profiles.
- The analysis.total module now uses sink particles in computing summed quantities.
- Moved some quantities from particles to discs as they are not generic but appropriate for discs simulations.
- Rename interpolate arguments: number_of_pixels -> num_pixels and density_weighted -> weighted. And weighted is a named argument (i.e. not just caught with **kwargs) to image, vector, and interpolate
- Rename `load_ev` to `load_time_series`.
- Rename `load_sim` to `load_simulation`.
- Replaced Snap.set_gravitational_parameter to Snap.set_central_body. A central body is required to calculate orbital dynamics quantities, e.g. eccentricity, on the particles.
- Refactored plonk.load_snap. Much of the code that was in the phantom reader module was, in fact, more general. Now, some of that code lives in Snap.load_snap which requires defining three functions in the reader modules: snap_properties_and_units, snap_array_registry, and snap_sink_registry
- Use figshare to host sample datasets not Anaconda Cloud.

Deprecated

- `load_ev` is deprecated in favour of `load_time_series`.
- `load_sim` is deprecated in favour of `load_simulation`.

Fixed

- Fix units labels in Profile.plot.
- Fix units of internal energy.
- Fix bugs in rotation to face-on and edge-on.
- Fix bugs in disc position and inclination angles.

0.7.2

Added

- Add label argument to Profile.plot.
- Add dust_array_names utility function. This makes a list of array names broken into sub-species.
- Add plonk.animate function to provide a common interface to animation functions.
- Always cache arrays during plotting using the caching context manager.
- Added function name to logging messages.

Changed

- Analysis particles functions with dust quantites are now for the dust "mixture method" (i.e. 1-fluid).
- Remove '_tot' as an array suffix for dust arrays. This was causing confusion as it makes no sense to sum stopping times.
- Rename base_array_name to base_profile_name.
- Change interpolate to return dimensionful quantity.
- Moved utils functions from each sub-package to modules in utils sub-package.
- Moved animation, animation_particles, animation_profiles from plonk namespace to plonk.visualize namespace.
- Renamed animation to animation_images.

Fixed

- Fix bug in setting default units for dimensionless arrays.
- Fix bugs in Profile related to units.
- Fix bug in std dev shading in Profile.plot.

0.7.1

Added

- Use a TOML config file to configure options.
- Add default_units and set_units on Snap and Profile.
- Sinks are iterable.
- Plot error bars on profiles.

Changed

- Renamed subsnaps_by_type to subsnaps_as_dict.
- Renamed units_defaults to array_units.
- Name mapping, units, aliases are no longer hard coded and are now in config.toml.
- If no units specified in image/plot/vector functions then use the default units on the Snap if available.
- Renamed some analysis.particles functions.
- Sinks analysis functions take a Sinks object as arguments.
- Profile.plot "std_dev_shading" argument changed to "std", and now is a string not a bool.

Fixed

- Fixed bug in using Snap for snaps with no sinks.
- Fixed bug in accessing a single Sink if a np.int rather than int was passed in.
- Fixed bug in reading Phantom datasets without knowing units.

0.7.0

Added

- Added plonk.image to make image plots (with interpolation and then matplotlib imshow).
- Added plonk.vector to make vector plots (with interpolation and then matplotlib quiver).
- Added plot_smoothing_length function to plot the smoothing length on particles, or accretion radius on sink particles.
- Added pretty_array_name function to prettify array names.
- Added visualize_sim as a method on Simulation objects.
- Allow getting subsets of Sinks.
- Added ax_kwargs to plotting functions for passing to ax.set.
- Added xlim, ylim on visualize.plot.
- Added units_dict function to return a units dictionary for passing to plotting functions.
- Added bulk load and unload functions on Snap for loading/unloading multiple arrays into/out-of memory.
- Add context manager for caching arrays on Snap.
- Added public methods on Snap: family for accessing particle families, and array for accessing particle arrays. These are already accessible via __getitem__ but this makes the underlying methods available.
- Add function to add missing units to array on Snap.

Changed

- Removed plonk.particle_plot in favour of plonk.plot.
- Changed plonk.plot to produce particle plots
- Renamed MultiVisualization and plot_snaps to VisualizeSimulation and visualize_sim.
- Changed units system from cgs to SI.
- Simplified animation functions by only allowing one axes per animation.
- Changed default units to more conventional SI units, e.g. Pascal for pressure and Joule for energy.
- Simplified tree and neighbours functions on Snap. Now there is only one tree for a Snap. If you want a tree for just, say, dust particles, then first create a SubSnap and get the tree on that.
- Changed _Sinks into Sinks, i.e. a public class.
- All plotting functions/methods use the same argument for setting units.
- Renamed Snap.available_arrays argument "all" to "verbose".
- Changed Snap.units to Snap.code_units.
- Use pretty_array_name for plots labels.
- Rename Snap.unset to Snap.reset and allow for unloading cached arrays.
- When setting Snap.cache_arrays to False, no longer unload currently cached arrays.

Fixed

- Fixed writing Snap.to_dataframe units.

0.6.2

Changed

- Use setup.cfg for setuptools, and pyproject.toml (and setup.cfg) for config of tools.
- Version is set in setup.cfg and imported into plonk via importlib_metadata.
- Changed API documentation.
- Moved sph module from utils sub-package to analysis.

Deprecated

- plonk.particle_plot will be removed.
- plonk.plot will change from image plots to particle plots, and plonk.image and plonk.vector will be added to replace plonk.plot.
- Default units will change from cgs to SI.

Fixed

- Fixed bug in Profile with getting number of mixture dust species.
- Fixed bugs in animation functions (due to making physical units on by default).
- Fixed issues with colorbar size matching height of plots.

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.