Skip to content

Commit

Permalink
Correct metallicity definition
Browse files Browse the repository at this point in the history
  • Loading branch information
pllim committed Feb 27, 2018
1 parent c8d5461 commit c54a048
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions doc/source/appendixa.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ The atlas data files are organized in a similar naming convention as
:ref:`pysynphot-appendixa-kurucz1993`, and are easily accessible using
`~pysynphot.catalog.Icat` (also see :ref:`pysynphot-spec-atlas`).

The example below generates a spectrum with metallicity :math:`\log Z = +0.1`,
The example below generates a spectrum with metallicity ``[M/H] = +0.1``,
temperature :math:`T_{\textnormal{eff}} = 10000 \textnormal{K}`, and gravity
:math:`\log g = 3.0`:

Expand Down Expand Up @@ -112,7 +112,7 @@ absolute flux is needed, the model spectrum must be

The following example shows the header from one of the atlas data files.
This file contains all the models for a star of metallicity
:math:`\log Z = 0.0` (``p00``) and effective temperature
``[M/H] = 0.0`` (``p00``) and effective temperature
:math:`T_{\textnormal{eff}} = 8000 \textnormal{K}` (``8000``), which cover a
range of gravities from :math:`\log g = +1.0` (``g10``) to
:math:`\log g = +5.0` (``g50``).
Expand Down Expand Up @@ -157,7 +157,7 @@ HISTORY and effective temperature but different gravity.

The example below shows you how to manually select the flux for a specific
model characterized by a given metallicity, effective temperature, and gravity.
The filename ``kp01_10000`` means :math:`\log Z = +0.1` (``p01``) and
The filename ``kp01_10000`` means ``[M/H] = +0.1`` (``p01``) and
:math:`T_{\textnormal{eff}} = 10000 \textnormal{K}` (``10000``). The column
name ``g30`` means :math:`\log g = 3.0`:

Expand Down Expand Up @@ -196,7 +196,7 @@ The atlas data files are organized in a similar naming convention as
:ref:`pysynphot-appendixa-kurucz1993`, and are easily accessible using
`~pysynphot.catalog.Icat` (also see :ref:`pysynphot-spec-atlas`).

The example below generates a spectrum with metallicity :math:`\log Z = +0.1`,
The example below generates a spectrum with metallicity ``[M/H] = +0.1``,
temperature :math:`T_{\textnormal{eff}} = 10000 \textnormal{K}`, and gravity
:math:`\log g = 3.0`:

Expand Down
6 changes: 3 additions & 3 deletions doc/source/spectrum.rst
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ you want, as shown in the example above.
However, three of the atlases (:ref:`pysynphot-appendixa-ck04`,
:ref:`pysynphot-appendixa-kurucz1993`, and :ref:`pysynphot-appendixa-phoenix`)
have a grid of basis spectra which are indexed for various combinations of
effective temperature (:math:`T_{\textnormal{eff}}`) in Kelvin, log metallicity
(:math:`\log Z`), and log surface gravity (:math:`\log g`). They are best
effective temperature (:math:`T_{\textnormal{eff}}`) in Kelvin, metallicity
(``[M/H]``), and log surface gravity (:math:`\log g`). They are best
accessed with a special `~pysynphot.catalog.Icat` class.
You may specify any combination of the properties, so long as each is
within the allowed range, which differs from atlas to atlas. For example,
Expand All @@ -277,7 +277,7 @@ which means that no spectrum can be constructed for effective temperatures
below 3499 K or above 50001 K (i.e., an exception will be raised).
The example below obtains the spectrum for a
:ref:`pysynphot-appendixa-kurucz1993` model with
:math:`T_{\textnormal{eff}} = 6000 \; \textnormal{K}`, :math:`\log Z = 0`, and
:math:`T_{\textnormal{eff}} = 6000 \; \textnormal{K}`, ``[M/H] = 0``, and
:math:`\log g = 4.3`:

>>> sp = S.Icat('k93models', 6440, 0, 4.3)
Expand Down
6 changes: 3 additions & 3 deletions pysynphot/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
Spectra are constructed from basis spectra which are indexed for various
combinations of effective temperature (:math:`T_{\\textnormal{eff}}`),
metallicity (:math:`Z`), and log surface gravity (:math:`\\log g`).
metallicity (``[M/H]``), and log surface gravity (:math:`\\log g`).
The user may specify any combination of :math:`T_{\\textnormal{eff}}`,
:math:`Z`, and :math:`\\log g` so long as each parameter is within the range
``[M/H]``, and :math:`\\log g` so long as each parameter is within the range
for that parameter defined by the catalog.
For example, the :ref:`pysynphot-appendixa-ck04` catalog contains spectra for
Expand Down Expand Up @@ -96,7 +96,7 @@ def __init__(self,catdir,Teff,metallicity,log_g):
self.parameter_names = ['Teff','metallicity','log G']

filename = locations.CAT_TEMPLATE.replace('*',catdir)
self.name="%s(Teff=%g,z=%g,logG=%g)"%(catdir,Teff,metallicity,log_g)
self.name="%s(Teff=%g,metallicity=%g,logG=%g)"%(catdir,Teff,metallicity,log_g)

if filename in CATALOG_CACHE:
indices = CATALOG_CACHE[filename]
Expand Down

0 comments on commit c54a048

Please sign in to comment.