Swiftest

Latest version: v2024.11.1

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

Scan your dependencies

Page 1 of 5

2024.11.1

Bug Fixes

- Some versions of Cython would raise an exception of a long double array was passed to the `swiftest.SwiftestDataset.xv2el` or `swiftest.SwiftestDataset.el2xv` methods. All input values are now cast to `np.float64` before being passed to the Cython methods. (66 67) by [David Minton](profminton)

2024.11.0

Bug Fixes

- Fixed impact angle calculation in the Hyodo and Genda (2020) model. Previously it was measured from the zenith rather than from the horizon. 61
- Fixed issue that was causing EL or XV inputs to get erased. When calling the `clean()` method, the data `Dataset` needs to be reset to the first time frame rather than getting overridden by the `init_cond` Dataset, because `init_cond` gets scrubbed of unneeded values. 63
- Override the `rotation` and `compute_conservation_values` options to set them to `True` when using SyMBA, and issue a warning if the user tries to turn them off. 63
- Added a check for SyMBA rotation and energy parameters in the Fortran side and a corresponding unit test. 63

Breaking Changes

- Support for `python 3.9` has been dropped and the minimum versions of some dependencies were changed in order to allow for `numpy>=2`.

| Package | Old | New |
|----------|-----------|-----------|
| python | 3.8 | 3.10 |
| numpy | ==1.26.4 | >=1.26.4 |
| xarray | 2024.2.0 | 2024.10.0 |

Contributors
kaustubanand
profminton

2024.09.2

Internal Changes
- Added Python 3.13 for aarch64 Linux to the ignore list for cibuildwheel for due to incompatibility with the hdf5 python package. profminton

2024.09.1

Bug Fixes
- Added a `.compute()` method call to to the the `particle_type` call in the indexer inside of the internal `_scrub_init_cond()` method to allow for proper operation when dask is turned on. profminton

Breaking Changes
- Removed `initial_conditions_from_data` method, as its core functionality is the same as `save`. 46 profminton


Internal Changes
- Added support for macos-15 (Sequoia) to the build process. profminton

2024.09.0

Bug Fixes
- Fixed degree/radian unit conversion problem with rotation rate vectors when returning from Fraggle. 58
- Fixed rotation distribution and direction bias problems with collision fragments generated by Fraggle. 58

Internal Changes
- Added a new test to ``test_fraggle.py`` called ``test_rotation_direction``, which tests to ensure that the rotation state of a target in a disruptive collision is consistent with what is expected. rotation rate conversion during collisions 58

Contributors
- profminton
- kaustubanand

2024.08.0

This is a major update with a number of important improvements, bug fixes, and new features.

New Features

- The collision module has been updated to include a new model for small impacts based on [Hyodo and Genda (2020)](https://doi.org/10.3847/1538-4357/ab9897). The new model is activated when the ratio of the projectile to the target body is less than 1/500. [GH53](https://github.com/MintonGroup/swiftest/issues/54)
- The core compiled library now stores angular quantities in degrees, just as the Python API does. This will help to prevent floating point errors from accumulating when passing values back and forth between the Python and Fortran code. [GH53](https://github.com/MintonGroup/swiftest/issues/53)
- Added a deep cleaning option that removes the simdir directory completely, which can be called with the `swiftest.Simulation.clean` method by passing `deep=True` as an argument.
- Added a new argument to `swiftest.Simulation` called `clean` that, when set to `True`, will perform a deep cleaning of the simdir directory before starting a new run. This is useful for ensuring that the simdir is completely clean before starting a new run.

Bug Fixes

- Fixed several issues related to repeatability with restarted runs. A new suite of tests was added to ensure that restarted runs create output that is bit-identical with the original run. [GH53](https://github.com/MintonGroup/swiftest/issues/53)
- Changed the defaults and behaviors of read_data and read_init_cond to prevent an issue where bodies get added multiple times when running scripts from the same simdir without doing a deep clean in between.
- Fixed problems where parameters like unit conversion factors were not being set properly when reading in a parameter file. Parameter input files are now processed the same way as arguments passed to the `swiftest.Simulation.set_parameter` method. [GH53](https://github.com/MintonGroup/swiftest/issues/53)
- Fixed issue where the inner radius limit was not being set based on the central body radius.
- Fixed issues getting initial conditions files built correctly when using an old data file as a source.
- Fixed problem where the energy and momentum values were computed after the dump step, causing the values to be out of sync.

Breaking Changes

- Switched to using `np.longdouble` for the unit conversion attributes, which includes `swiftest.Simulation.MU2KG`, `swiftest.Simulation.KG2MU`, `swiftest.Simulation.TU2S`, `swiftest.Simulation.S2TU`, `swiftest.Simulation.DU2M`, `swiftest.Simulation.M2DU`, and `swiftest.Simulation.GU`. This was done to ensure that the precise value is passed back and forth to the compiled core library, otherwise floating point conversion errors can accumulate and cause the simulation to diverge on restarts. Be aware when making use of these values, and their equivalents in `swiftest.Simulation.param`, that not all external libraries support `np.longdouble`, and so you may need to cast it as `float`. [GH53](https://github.com/MintonGroup/swiftest/issues/53)
- Changed the default display style to `progress` and renamed the `standard` display style to `classic`.
- Changed the default collision model to `Fraggle` instead of `Merge`.

Internal Changes

- Switched to an automated versioning system based on git tags. This will allow us to automatically increment the version number with each new release. [GH53](https://github.com/MintonGroup/swiftest/issues/53)
- Updated methods for extracting and saving initial conditions from old files, including a major overhaul of the modify_body method that is more robust.
- Improved handling of initial conditions retrieval and saving from specific frames.

Contributors
- profminton
- kaustubanand

Page 1 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.