CoolDwarf.opac.kramer package

Submodules

CoolDwarf.opac.kramer.kramer module

karmer.py – Kramer opacity class for CoolDwarf

This module contains the KramerOpac class, which is used to calculate the Kramer opacity for a given temperature and density.

Example usage

>>> from CoolDwarf.opac.kramer import KramerOpac
>>> X, Z = 0.7, 0.02
>>> opac = KramerOpac(X, Z)
>>> temp, density = 1e7, 1e-2
>>> kappa = opac.kappa(temp, density)
class CoolDwarf.opac.kramer.kramer.KramerOpac(X: float, Z: float)

Bases: object

KramerOpac – Kramer opacity class for CoolDwarf

This class is used to calculate the Kramer opacity for a given temperature and density.

Parameters:
Xfloat

Hydrogen mass fraction

Zfloat

Metal mass fraction

Methods

kappa(temp, density)

Calculates the Kramer opacity at the given temperature and density

kappa(temp: float, density: float) float

Function to calculate the Kramer opacity at the given temperature and density

Parameters:
tempfloat

Temperature in Kelvin

densityfloat

Density in g/cm^3

Returns:
kappafloat

Kramer opacity at the given temperature and density in cm^2/g

Module contents