Full changelog#
This page tracks all of the changes that have been made to cogsworth. We follow the standard versioning convention of A.B.C, where C is a patch/bugfix, B is a large bugfix or new feature and A is a major new breaking change. B/C are backwards compatible but A changes may be breaking.
4.0.1#
Bug fix: SandersBinney2015 lambda functions had incorrect scoping so that their velocity dispersions all used the values from the final bin (inflating heights for most of the disc)
Feature: A couple of internal changes to allow for use with COSMIC 4.0. Particularly,
SSE_settingsis now a parameter of Population and passed to COSMIC when evolving (allowing for use of METISSE or different stellar engines)Bug fix: Concatenating populations duplicated initial_binaries rows due to a typo, fixed.
Bug fix: Concatenating SFHs now properly concatenates the v_x and v_y components if they exist (previously they were ignored and lost in the concatenation)
4.0.0#
The release of version 4 of cogsworth has breaking changes for StarFormationHistory objects and includes several new features.
- Breaking change: There is a new
CompositeStarFormationHistoryclass that allows users to combine multiple SFHs together to create more complex SFHs. This is a major change to the way SFHs are handled in cogsworth, and it may require users to update their code if they were using the old way of combining SFHs. Wagg2022 in particular is now a CompositeStarFormationHistory
- Breaking change: There is a new
Added a model for the Milky Way bar star formation history
Populations can now draw sampling_params directly from an ini_file
- New interoptability with COMPAS is now available, allowing users to run COMPAS directly, or post-process COMPAS outputs, within the cogsworth framework.
You can also switch between COMPAS and COSMIC Populations and compare identical initial conditions with the two codes
Population.initC is now just an alias for Population.initial_binaries to avoid duplicating information
New MIST file formats are accounted for (this was broken in v3.8.1 - well and previous versions - due to changes in the MIST file formats, but should now be fixed)
3.8.1#
Introduce
sampling_maskas an parameter ofPopulationto allow users to specify criteria for sampling initial binaries, this is more flexible than the old m1_cutoffMake cogsworth use the new COSMIC multiprocessing functionality for initial condition sampling, this should speed up sampling for large populations
3.8.0#
Remove
m1_cutoff(see below)Add
bcm_default_timestepas a parameter forPopulationto allow users to specify a default timestep for the detailed output tableMove
binfracfrom being a BSE setting to a parameter in thesampling_paramsofPopulationto allow users to specify the binary fraction when sampling initial conditions without needing to worry about BSE settings (it really should have been here from the start)Add
plot_hrdmethod toPopulation, which uses the function fromcogsworth.plotto create HR diagrams for individual binariesChanged cogsworth plotting routines to apply rcParams as a context decorator rather than globally, no more messing with people’s other plots!
Allow concatenation of populations with orbits (TomWagg/cogsworth#199)
3.7.2#
Bug fix: In the very rare case where a binary disrupts and one star’s orbit integration but the other’s doesn’t, previously only one orbit was removed, leading to shape mismatches. This release fixes that issue.
Bug fix (TomWagg/cogsworth#197): Citations are saved and loaded correctly from files, previously they were not being saved at all, and when loading they were being set to an empty list instead of the correct citations.
New feature (TomWagg/cogsworth#193): Allow user to specify
orbit_integration_retry_settingswhen creating a Population, which is a dictionary with keysmax_retriesandtimestep_multiplierthat control how many times to retry an orbit integration if it fails and how much to reduce the timestep by for each retry. This gives the user control and flexibility over how to handle orbit integration failures.Deprecation: The
m1_cutoffargument toPopulationis now deprecated and will be removed in v3.8+. This can be achieved with a mask and more general cases can be handled with that.
3.7.1#
Bug fix: When integrating orbits with kicks, ensure that the final timestep always hits exactly
t2by appendingt2to the timesteps if it is not already included (previously t2 could be a fraction of dt before t2). This is important for correctly handling SN events that occur right beforet2, ensuring they are included in the integration and event identification.Default change: sample_initial_binaries won’t overwrite initC settings by default anymore, or reset sampled kicks (when initC is explicitly passed to the function).
3.7.0#
Development: Vastly speed up event identification for large populations through vectorisation
Development: Use a generator to yield orbits one at a time when integrating populations, this should reduce memory usage and allow for much larger populations to be integrated without issues
Default change: Update default processes from 8 to the max CPUs available on a machine
3.6.3#
Bug fix: When loading populations, ensure that
error_file_pathis properly converted back toNoneif it was saved as the string ‘None’. Same for saving.
3.6.2#
Enhancement: Added properties to the
Populationclass to allow users to easily access the final positions and velocities of primary and secondary stars in the population. These properties arefinal_pos_primary,final_vel_primary,final_pos_secondary, andfinal_vel_secondary. They return the final positions and velocities of the primary and secondary stars as numpy arrays, which can be useful for analysis and plotting without needing to access the full orbit data.
3.6.1#
Enhancement: Allow users to specify a directory for saving bad orbits when integrating populations by adding an
error_file_pathargument to thePopulationclass. If set, bad orbits will be saved to this directory instead of the current working directory. If set to None, bad orbits will not be saved. This provides more flexibility in managing output files.Development: Default BSE settings are drawn directly from the COSMIC cosmic-settings.json data file
Development: Use new initC IO functions from COSMIC that compress the data a LOT
Development: Add testing for Python 3.11, 3.12, and 3.13
New feature: added optional key word arguments
integratorandintegrator_kwargstoPopulationclass to allow users to specify the integrator settings forgala
3.6.0#
New feature: Move observables to obs module and added obs.mist module to interpolate MIST bolometric corrections. This means we can avoid depending on isochrones which is largely unmaintained at this point.
3.5.1#
Enhancement: Avoid pickling static arguments unnecessarily when evolving orbits, this should speed things up and reduce memory usage.
3.5.0#
New feature: Added support for the latest version of Gala (v1.11.0). This means time-evolving potentials can now be used when integrating orbits for populations, as well as connections to EXP and new interface with the MilkyWayPotential class.
New feature: When saving populations, the versions of
cogsworth,COSMIC, andgalaused to create the population are now stored as attributes in the saved file. This allows for better tracking of software versions for reproducibility.Bug fix: When loading populations, ensure that
bpp_columnsandbcm_columnsare properly decoded from byte strings to regular strings. This resolves issues when these attributes were not of the expected type after loading a saved population.
3.4.0#
New feature: Populations that have had orbits integrated can now be concatenated together using the
pop.concatfunction or simply the+operator. Note that the resulting population will not have orbits, as combining orbits from different populations is non-trivial and not yet implemented. However, the final positions and velocities are available as.final_posand.final_velattributes if they were loaded for the original populations.Bug fix: Ensure that when concatenating populations, the bin_nums are updated correctly to avoid overlaps and that everything remains unique.
3.3.1#
Bug fix: Change
ConstantPlummerSphereto directly accept the Plummer scale radius and mass rather than a Gala potential instance. This avoids indexing issues
3.3.0#
New feature: Added a new star formation history in the
cogsworth.sfhmodule calledConstantPlummerSphere, which allows users to create a population of stars formed at a constant rate within a Plummer sphere potential. This SFH samples stellar positions and velocities according to the Plummer model, providing a more realistic spatial and kinematic distribution for certain astrophysical scenarios.
3.2.3#
Bug fix: When indexing or copying populations, ensure that
bpp_columnsandbcm_timestep_conditionsare preserved correctly. This resolves issues where these attributes were lost or incorrectly set after such operations.Bug fix: When loading populations, ensure that
bpp_columnsandbcm_columnsare only converted toNoneif they are explicitly set to the string ‘None’. Don’t perform check on lists.Bug fix: Saving/loading a SandersBinney2015 sfh now works correctly, previously failed due to bad saving of precomputed interpolations and potential.
3.2.2#
Bug fix: When loading populations, ensure that
bpp_columnsandbcm_timestep_conditionsare properly converted back to lists from numpy arrays. This resolves issues when these attributes were not of the expected type after loading a saved population.
3.2.1#
Bug fix: Ensure masks used in plotting functions are always the correct length to avoid broadcasting issues. Problems arose when orbits were removed after bad integration.
3.2.0#
New feature: Added distribution function based star formation histories in the
cogsworth.sfhmodule, allowing users to create more realistic SFHs based on analytic distribution functions for stellar systems in equilibrium.
3.1.0#
Bug fix: Inclinations of binaries relative to the galactic plane are now drawn from a uniform in cos(i) distribution rather than uniform in i
3.0.0#
- Major breaking change:
cogsworthno longer allows you to use the default BSE settings unless you explicitly setuse_default_BSE_settings=Truewhen creating a Population. This is to avoid users passing settings without acknowledging that they are making choices about the binary physics. This also fixes an issue where the settings in an initC table were being overwritten by BSE_settings
- Major breaking change:
Update default
kickflagto match COSMICv3.6.1with the Disberg distribution instead of Hobbs
2.1.1#
Allow choice of
bppandbcmcolumns as I implemented in COSMIC (see TomWagg/cogsworth#86)
2.1.0#
New feature:
plot_orbitnow shows the location of mergers (either stellar or GW), this can be turned off with theshow_mergerargumentBug fix:
plot_orbithides the SN/merger locations if they occur aftert_max(previously they were shown even though the orbit might not reach them)Bug fix (TomWagg/cogsworth#154): Ensure secondary SNe are still shown for bound binaries in
plot_orbit
2.0.4#
cogsworthis now published 🎉 Citations are updated to match
2.0.3#
Update default
kickflagto match COSMICv3.5.0
2.0.2#
Add some more flexbility to the
plot_cartoon_binaryfunction in terms of fontsizeAllow use of pynbody 2.0 with cogsworth
2.0.1#
Add clearer warning when pynbodyrc is not set up for FIRE (TomWagg/cogsworth#137)
2.0.0#
Major release to go with the release paper submission! 🎉
- New feature: plot_cartoon_binary will now adjust the width of the binary based on the orbital separation and label simultaneous timesteps more clearly, also add a marker for disruption events
- Major change: calls like p.bpp will now raise an error if sampling is not yet done to avoid confusion
- Bug fix: Can now save and load unevolved populations
- Bug fix: Saving sampling_params now works correctly when you have a sampling_params object that includes a dictionary (nested dictionaries were causing crashes before)
1.2.0#
Add some new simple SFHs by @TomWagg in TomWagg/cogsworth#120
Add new orbit plotting functionality by @TomWagg in TomWagg/cogsworth#121
Add new case studies + minor fixes by @TomWagg in TomWagg/cogsworth#122
1.1.2#
Bug fix: saving
sfhobjects withsavenow works correctly (previously failed when they had custom parameters)
1.1.1#
Bug fix:
concatfunctions now accessible in the main namespace
1.1.0#
New feature: Concatenate multiple populations together with
pop.concator simply+(see TomWagg/cogsworth#116)
1.0.0#
Major release with many new features and bugfixes. The main new features are:
Allow for optional dependencies by @TomWagg in TomWagg/cogsworth#54
Personalised citation information framework by @TomWagg in TomWagg/cogsworth#63
Make sample_params an option by @TomWagg in TomWagg/cogsworth#60
Indexing improvements by @TomWagg in TomWagg/cogsworth#69
No more Skycoords except where necessary by @TomWagg in TomWagg/cogsworth#79
Add translation and cartoon helpers by @TomWagg in TomWagg/cogsworth#80
Simplify the way in which we store disruptions to arrays instead of two lists by @TomWagg in TomWagg/cogsworth#82
Avoid pickled storage (speed up orbits save/load) by @TomWagg in TomWagg/cogsworth#84
Change to storing everything directly in a single file instead of 4 by @TomWagg in TomWagg/cogsworth#85
Allow dynamic timestep resolution for
bcm, don’t save otherwise by @TomWagg in TomWagg/cogsworth#89BUG: fix duplicate timestep bug in kicked orbits by @TomWagg in TomWagg/cogsworth#90
Add connections to
LEGWORKby @TomWagg in TomWagg/cogsworth#91Add
hydrosubmodule for creating populations from hydrodynamical zoom-in simulations by @TomWagg in TomWagg/cogsworth#96Change nomenclature from
GalaxytoStarFormationHistoryby @TomWagg in TomWagg/cogsworth#100Improve cluster velocity dispersion by @TomWagg in TomWagg/cogsworth#101
Allow the use of
inifiles to specifyBSE_settingsby @TomWagg in TomWagg/cogsworth#107Add initial velocity storage by @TomWagg in TomWagg/cogsworth#109
Ensure sampling params are saved in Populations by @TomWagg in TomWagg/cogsworth#110
Improve saving and lazy-loading of files by @TomWagg in TomWagg/cogsworth#113
Save binary inclination and phase at each SN to ensure reproducibility by @TomWagg in TomWagg/cogsworth#115
0.3.0#
Made several dependencies optional
Allow users to specify sampling_params to pass to COSMIC and simplify drawing singles stars
0.2.0#
Add new options for action-based initial galaxy distributions
0.1.0#
Add option to copy initial conditions from another Population
0.0.0#
Initial release (woop!)