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_settings is 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 CompositeStarFormationHistory class 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

  • 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_mask as an parameter of Population to allow users to specify criteria for sampling initial binaries, this is more flexible than the old m1_cutoff

  • Make 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_timestep as a parameter for Population to allow users to specify a default timestep for the detailed output table

  • Move binfrac from being a BSE setting to a parameter in the sampling_params of Population to 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_hrd method to Population, which uses the function from cogsworth.plot to create HR diagrams for individual binaries

  • Changed 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_settings when creating a Population, which is a dictionary with keys max_retries and timestep_multiplier that 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_cutoff argument to Population is 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 t2 by appending t2 to 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 before t2, 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_path is properly converted back to None if it was saved as the string ‘None’. Same for saving.

3.6.2#

  • Enhancement: Added properties to the Population class to allow users to easily access the final positions and velocities of primary and secondary stars in the population. These properties are final_pos_primary, final_vel_primary, final_pos_secondary, and final_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_path argument to the Population class. 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 integrator and integrator_kwargs to Population class to allow users to specify the integrator settings for gala

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, and gala used 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_columns and bcm_columns are 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.concat function 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_pos and .final_vel attributes 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 ConstantPlummerSphere to 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.sfh module called ConstantPlummerSphere, 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_columns and bcm_timestep_conditions are preserved correctly. This resolves issues where these attributes were lost or incorrectly set after such operations.

  • Bug fix: When loading populations, ensure that bpp_columns and bcm_columns are only converted to None if 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_columns and bcm_timestep_conditions are 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.sfh module, 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: cogsworth no longer allows you to use the default BSE settings unless you explicitly set use_default_BSE_settings=True when 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

  • Update default kickflag to match COSMIC v3.6.1 with the Disberg distribution instead of Hobbs

2.1.1#

2.1.0#

  • New feature: plot_orbit now shows the location of mergers (either stellar or GW), this can be turned off with the show_merger argument

  • Bug fix: plot_orbit hides the SN/merger locations if they occur after t_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#

  • cogsworth is now published 🎉 Citations are updated to match

2.0.3#

  • Update default kickflag to match COSMIC v3.5.0

2.0.2#

  • Add some more flexbility to the plot_cartoon_binary function in terms of fontsize

  • Allow use of pynbody 2.0 with cogsworth

2.0.1#

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#

1.1.2#

  • Bug fix: saving sfh objects with save now works correctly (previously failed when they had custom parameters)

1.1.1#

  • Bug fix: concat functions now accessible in the main namespace

1.1.0#

  • New feature: Concatenate multiple populations together with pop.concat or simply + (see TomWagg/cogsworth#116)

1.0.0#

Major release with many new features and bugfixes. The main new features are:

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!)