This class implements the density structure for an ambient density medium defined by a constant density, and an inner and outer radius.
Once the AmbientMedium class has been instantiated, the parameters for the density structure can be set via attributes:
>>> from hyperion.util.constants import au, pc
>>> ambient = AmbientMedium()
>>> ambient.rho = 1.e-20 # cgs
>>> ambient.rmin = 0.1 * au # cm
>>> ambient.rmax = pc # cm
AmbientMedium instances can only be used with spherical polar grids at this time.
Attributes
rho | Density of the ambient medium (g/cm^3) |
rmin | inner radius (cm) |
rmax | outer radius (cm) |
Methods
density(grid) | Return the density grid |
Methods (detail)
Return the density grid
Parameters : | grid : SphericalPolarGrid instance.
|
---|---|
Returns : | rho : np.ndarray
|