trident-project / trident

A Synthetic Spectral Generation Suite
Other
21 stars 25 forks source link

Add "calculate_ion_fraction" function #204

Closed chummels closed 1 month ago

chummels commented 1 month ago

This PR adds a simple function to Trident for interpolating across the ion_balance files to return a value (or array of values) of ion fractions given coordinates in density, temperature, and redshift provided. Previously, trident would only calculate this by creating a derived field on an input dataset, but it turns out that people just want to get the values out directly. Particularly, this is useful for analytic and semi-analytic models to calculate these values on the fly.