Skip to content

Commit

Permalink
unit fix for new astropy versions + update of output docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronDavidSchneider committed Nov 22, 2023
1 parent cd944b9 commit dda6485
Show file tree
Hide file tree
Showing 5 changed files with 294 additions and 294 deletions.
2 changes: 2 additions & 0 deletions chemcomp/helpers/analysis_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ def import_data(self, files):
try:
with h5py.File(files[i], "r") as f:
units = dict(f["/planet/units"].attrs)
# needed for new versions of astropy
units = {key: unit.decode('utf-8').replace('u.','') for key, unit in units.items()}
keys = list(f["/planet"].keys())
keys = (
[k for k in keys if k in self._used_quantities]
Expand Down
40 changes: 20 additions & 20 deletions chemcomp/planets/_planet_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,28 +74,28 @@ def __init__(self, planet, output):
)

self.dict_of_planet_units = {
"t": "u.s",
"M": "u.g",
"M_a": "u.g",
"M_c": "u.g",
"a_p": "u.cm",
"T": "u.K",
"comp_a": "u.g",
"comp_c": "u.g",
"tau_m": "u.s",
"sigma_g": "u.g/u.cm**2",
"gamma_tot": "u.g*u.cm**2/u.s**2",
"sigma_peb": "u.g/u.cm**2",
"pebble_flux": "u.g/u.s",
"peb_iso": "u.g",
"t": "s",
"M": "g",
"M_a": "g",
"M_c": "g",
"a_p": "cm",
"T": "K",
"comp_a": "g",
"comp_c": "g",
"tau_m": "s",
"sigma_g": "g/cm**2",
"gamma_tot": "g*cm**2/s**2",
"sigma_peb": "g/cm**2",
"pebble_flux": "g/s",
"peb_iso": "g",
}
self.dict_of_acc_units = {
"m_dot": "u.g/u.s",
"m_dot_a": "u.g/u.s",
"m_dot_c": "u.g/u.s",
"m_dot_a_chem": "u.g/u.s",
"m_dot_c_chem": "u.g/u.s",
"M_z": "u.g",
"m_dot": "g/s",
"m_dot_a": "g/s",
"m_dot_c": "g/s",
"m_dot_a_chem": "g/s",
"m_dot_c_chem": "g/s",
"M_z": "g",
}

self.list_of_planet_quantities = [
Expand Down
60 changes: 0 additions & 60 deletions doc/source/Output.rst

This file was deleted.

15 changes: 8 additions & 7 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,14 @@ Included planet physics:

The physical model is in depth explained in `(Schneider & Bitsch 2021a) <https://ui.adsabs.harvard.edu/abs/2021arXiv210513267S/abstract>`_. This wiki is only meant for explanations on the structure of `chemcomp`.

Acknowledgments
---------------
* Aaron Schneider would like to thank Bertram Bitsch for his enormous support during the development of this code and for continuing to use the code together with his students.
* Aaron Schneider would like to thank Cornelis Dullemond for providing the solver which (in adapted version) is used to solve the gas viscous disk equation and dust transport equation.
* Aaron Schneider would like to thank everyone, who has already used chemcomp in their work and has contributed in fixing small bugs.

.. toctree::
:maxdepth: 4
:maxdepth: 2
:caption: Contents

Installation
Expand All @@ -51,15 +57,10 @@ The physical model is in depth explained in `(Schneider & Bitsch 2021a) <https:/
Configuration/Configuration
Structure/Structure
Disk-Only
Output
notebooks/basic_plotting/basic_plotting
Publications
FAQ

Acknowledgments
---------------
* Aaron Schneider would like to thank Bertram Bitsch for his enormous support during the development of this code and for continuing to use the code together with his students.
* Aaron Schneider would like to thank Cornelis Dullemond for providing the solver which (in adapted version) is used to solve the gas viscous disk equation and dust transport equation.
* Aaron Schneider would like to thank everyone, who has already used chemcomp in their work and has contributed in fixing small bugs.

Indices and tables
==================
Expand Down
Loading

0 comments on commit dda6485

Please sign in to comment.