Hoki

Latest version: v1.7.1

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

Scan your dependencies

Page 1 of 2

1.6.0

New Features
- `csp` subpackage: Create Complex Stellar Populations from the BPASS Simple Stellar Populations! Use them to predict transient rates originating from your population.
- `data_compiler` module: Includes the `ModelDataCompiler` which allows you to compile a subset of the BPASS stellar library into an `pandas.DataFrame` that is easy to search and operate on! This allows you to do some advances model searches to match your stellar population or your transient progenitor.

New tutorials in `hoki_tutorials` repository
- **[Complex Stellar Populations](https://github.com/HeloiseS/hoki_tutorials/blob/release/Complex%20Stellar%20Populations.ipynb):** Shows you how to make Complex Stellar Populations
- **[Model Data Compiler](https://github.com/HeloiseS/hoki_tutorials/blob/release/ModelDataCompiler.ipynb):** Shows you how to compile the data you're interested in from individual text files into a table
- **[Model Search](https://github.com/HeloiseS/hoki_tutorials/blob/release/Model%20Search.ipynb):** Shows you some of the basics of searching through the models with these data formats

Other features in pre-release
`data_compiler` comes with another compiler to bring spectral data together into a data product easier to manage for some applications. Contact Max Briel if you are interested.

Updates and upcoming deprecation
- The `age` subpackage is the new home of `AgeWizard`. It comes with an AgeWizard v2.0 of sorts that can take into account observational errors in Luminosity and Temperature when comparing to HR Diagrams.

- `age_utils` is still there for backwards compatibility until v2.0 of hoki but you will get a Deprecation Warning everytime

Associated Data Products
Pre-compiled tables for the stellar libraries with the fiducial IMF (Kroupa with maximum mass 300 solar masses) were compiled by H. F. Stevance and made available [here](https://zenodo.org/record/4064300#.X3fm63VfhNw) under the following DOI

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4064300.svg)](https://doi.org/10.5281/zenodo.4064300)

1.5.1

Patch for the submission of our revised manuscript of "A_systematic_aging_method_I: NGC 300 ...."


Feature Patch

The `AgeWizard` algorithm has been slightly amended. [[PR39]](https://github.com/HeloiseS/hoki/pull/39). Here is a summary of the changes:
* The individual star age probability distribution functions are now such that the **probability that a star has an age older than the current age of the Universe is 0**
* The **total probability density function is now calculated from the individual star PDFs, not from their un-normalised distributions**. The original algorithm effectively leads to a higher weighting of stars found in densely populated regions of the HRD and CMDs. As a result, stars in the giant branch carried a significantly lower weight than main sequence stars. This is problematic because these stars carry the most reliable information about age since their evolutionary phase is much shorter lived than the Main Sequence. Consequently, normalising the distributions over time before combining them is a first step towards making the age determination more accurate. Further steps can be taken by the human and these will be described in soon-to-come tutorials and publications. Feel free to contact hfstevancegmail.com if you need more detail about this.

New Feature
- Creating of the `stats` package [[PR23]](https://github.com/HeloiseS/hoki/pull/23) [[PR34]](https://github.com/HeloiseS/hoki/pull/34/)

Currently this only contains the `starcounts.py` module, which implements the method of [Dorn-Wallenstein & Levesque 2020](https://ui.adsabs.harvard.edu/abs/2020ApJ...896..164D/abstract) to retrieve the underlying count ratio of the

- Compatibility with BPASS v2.2.2 (which includes Gaia Filters) [[PR22]](https://github.com/HeloiseS/hoki/pull/22) [[29]](https://github.com/HeloiseS/hoki/pull/29). Note that BPASS data for Gaia filters are not public yet but you may contact Jan J. Eldridge if you need them (jj.eldridgeauckland.ac.nz).


Bug Fixes:
- HRD plotting - one type had the wrong x axis [[PR33]](https://github.com/HeloiseS/hoki/pull/33)

1.5.0

Summary

At the core of v1.5 is the `age_utils` module and the `AgeWizard` pipeline.
The utilities provided in there allow the easy implementation of the age determination method for resolved stellar populations that is presented in Stevance et al. in prep.

Other more general upgrades were implemented as well and are summarised below.

New Features
New Modules
- hoki.age_utils: Utilities to find ages using BPASS models.
- hoki.utils.exceptions: Hoki specific error messages and warniings created to help debugging
- hoki.utils.hoki_objects: contains the class HokiObject()

New Classes

`hoki.age_utils`
- `AgeWizard`: Toolkit and pipeline to find ages by comparing observational data to model HRDs or CMDs.

`hoki.utils.exceptions`
- `HokiWarning`
- `HokiUserWarning`
- `HokiDeprecationWarning`
- `HokiFormatWarning`
- `HokiFormatError`
- `HokiFatalError`
- `HokiKeyError`

New Functions
- `find_coordinates`: Matches observational data to model CMD or HRD and retrieves their postional coordinates in Temperature-Luminosity space or Colour-Magnitude space
- `normalise_1d`: Divides a 1D array by its total sum
- `calculate_individual_pdfs`: Calculates the Age Probability Distribution Functions of an ensemble of sources by comparing them to a requested HRD or CMD
- `calculate_distributions`: Searches through CMD/HRDs to collate the age distributions for a set of locations on the CMD/HRDs

Upgrades


Update to Colour Magnitude diagrams

- `CMD.make()` now has a parameter `mag_filter` and `col_filters` instead of `filter1` and `filter2` so that the Magnitude Axis filter can be independent of the colour combination
- `CMD.at_log_age()` now has tests and is included in the tutorials.

Update to hoki classes

Hoki classes like HRDiagrams or CMD are now all HokiObjects. At the moment all they inherit are the following class attributes:


t = hoki.constants.BPASS_TIME_BINS
dt = hoki.constants.BPASS_TIME_INTERVALS
time_weight_grid = hoki.constants.BPASS_TIME_WEIGHT_GRID

---
Associated Pull Requests:
- Update to AgeWizard
- Update to CMD
- The AgeWizard Pull Request

Closed Issues: 2, 6, 7, 9

1.4.0

First Official Release!
----
`hoki` has been reviewed and accepted by JOSS!

It is now out of beta, but will remain in continuous development as the needs of the community and BPASS models evolve.

Many thanks to ygrange and KshitijAggarwal for their review, and our editor arfon.

Fixes
-----
- A bug in the tutorials was uncovered be the referees and fixed
- Clarifications added to the tutorials and READ ME.
- Paper has been finalised! And the pdf is in the `paper` subdirectory

1.3.2b

Identical to the v1.3.1 release but a lot of unnecessary template files and folders left over from setting up the package have been removed to clean up to repository.

This is the last release prior to submission to the [Journal of Open Source Software](https://joss.theoj.org/).

---
_Corresponding [pypi release](https://pypi.org/project/hoki/1.3.2b0/)_

1.3.1beta

New Feature
-------------------
* `load.nebular_lines()` has been added to load the nebular emission line data into data frames with the correct column names. The nebular emission line data download link and more info can be found on this page: https://bpass.auckland.ac.nz/4.html

Dev Feature
----------------
* `OUTPUTS_PATH` variable created in `hoki.constants`, as well as the `outputs_path` setting in yaml. This is mostly to make my life easier so I'm not counting it as a "feature" of hoki, although it could be later if I added a way in the code to easily change that setting

Bug Fixes
---------------
* `HRDiagrams.plot()` would crash if `abundances` was not given a tuple. Added safeguards to check the type and let the user know what type is expected.
* Now automatically turns `hr_type` into a string to avoid giving people an error if they typed the right code but forgot quotes.
* `spec.dopcor` only accepted wavelength columns under the name 'WL' - now it finds the wavelength within the given dataframe based on column index. The default is 0 because most of the time wavelength is the first column, but this is an option that users can now change.

---
_Corresponding [pypi release](https://pypi.org/project/hoki/1.3.1b0/)_

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.