Sarracen

Latest version: v1.2.3

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

Scan your dependencies

1.2.3

New Features

- `centre_of_mass()` has been added to SarracenDataFrame. It returns the [x, y, z] point of the centre of mass.
- Rotations can be performed around the centre of mass by specifiying `rot_origin='com'`.
- `read_phantom()` will create a `mass` column if multiple particle species (itypes) are present so that different particles resolve the correct mass. If there is only a single particle species, then it follows previous behaviour of adding `mass` to `params`.

Bug fixes:
- `read_phantom()` has reliable detection of default int and real precision (for 32-bit and 64-bit precision).
- Slicing and filtering operations on a SarracenDataFrame (e.g., drop, loc, etc) will correctly determine if any special columns are present (x, y, z, mass, smoothing length, density). Previously it would inherit values from the parent data frame, which would not make sense if any of those columns were filtered out.
- `calc_density()` in SarracenDataFrame no longer assumes `params` contains `mass`.
- Numba deprecation warning with kernels has been resolved.
- Interpolation no longer tries to round x/y limits when they are within 1.0e-4 of an integer. This rounding was problematic when the x/y bounds were smaller than this.

Deprecations
- The default value for `rot_origin=` when rendering and interpolation is currently the midpoint of the x/y/z bounds. This is deprecated and will change to [x, y, z] = [0, 0, 0] in a future release.

1.2.2

New Features
- Sarracen will now default to use GPU if a CUDA-supported device is present.

Bug fixes:
- read_phantom() would return an extra empty data frame when `separate_types='all'` was specified and the dump file had no sink particles. This has now been fixed.
- render() will now play nicely with custom colour bar labels. Use `cbar_kws={'label': 'your_custom_label'}` as an argument inside render().

Acknowledgments
- Thank you to Antoine Alaguero for the PR fixing the colour bar label issue.

1.2.1

Bug fixes:
- render(): vmin= and vmax= now play nicely with log_scale=True.

1.2.0

New Features:
- hmin= option added to render and interpolation functions. If True, this will impose a minimum smoothing length for all particles equal to 0.5 * grid cell size. This addresses the situation where particles with small smoothing lengths might not contribute to any grid cells. With hmin, all particles are guaranteed to contribute to at least one grid cell. (This is not a problem for exact interpolation though.)

Bug fixes:
- Exact interpolation would often exclude grid cells around the periphery of a particle's smoothing volume. This has been fixed so that all cells that intersect the smoothing volume of a particle receive their contribution.

Acknowledgments
- Thank you to Josh Borrow for notifying us of the bug with exact interpolation.

1.1.0

New Features:
- Normalized interpolation has been added to rendering and interpolation, and is turned on by default.
- Density-weighted interpolation has been added to rendering and interpolation. It is on by default for column-integrated views. If the target quantity is A, then using density-weighted interpolation will interpolate rho*A. In this case, the normalization is over the density.
- read_phantom() has a new parameter ignore_inactive=, which defaults to True. If ignore_inactive=True, then Sarracen will not read particles with h < 0, that is, dead or accreted particles whose smoothing lengths have been set to a negative value.

Bug fixes:
- The safety check on y-limits during interpolation was mistakenly comparing the lower x-limit instead of y-limit.

1.0.1

Initial public release.

Thank you to Andrew Harris for building all the backbone structure and getting this project off the ground!

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.