Skip to content

Commit

Permalink
Fixed issue with finding missing spectra in model grid
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasstolker committed Oct 6, 2024
1 parent 1ae5ec7 commit cf71a79
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 0 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

There are tools available for grid and free retrievals using Bayesian inference, synthetic photometry, interpolating a variety atmospheric and evolutionary model grids (including the possibility to add a custom grid), color-magnitude and color-color diagrams, empirical spectral analysis, spectral and photometric calibration, and analysis of emission lines. The package has been released on `PyPI <https://pypi.org/project/species/>`_ and is actively developed and maintained on `Github <https://github.com/tomasstolker/species>`_.

**Important:** Importing the *species* package had become slow because of the many classes and functions that were implicitly imported. The initialization of the package has therefore been adjusted. Any functionalities should now be explicitly imported from the modules that they are part of.

Documentation
-------------

Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Documentation = "https://species.readthedocs.io"
Repository = "https://github.com/tomasstolker/species"
Issues = "https://github.com/tomasstolker/species/issues"

[tool.setuptools]
packages = []

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}

[tool.setuptools.package-data]
mypkg = ["*.json"]
3 changes: 2 additions & 1 deletion species/util/data_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,8 @@ def add_missing(
print(f" - {item}: {grid_shape[i]}")

flux = np.asarray(database[f"models/{model}/flux"]) # (W m-1 um-1)
flux[flux <= 0.0] = 1e-50
# Should be < and not <= since missing spectra have zero fluxes
flux[flux < 0.0] = 1e-50
flux = np.log10(flux)

count_total = 0
Expand Down

0 comments on commit cf71a79

Please sign in to comment.