pyrex.custom.layered_ice.ice_model.LayeredIce¶
-
class
pyrex.custom.layered_ice.ice_model.
LayeredIce
(layers, index_above=1, index_below=None)¶ Class describing ice divided into multiple layers.
Supports building layers made of any typical ice model. Most methods dispatch to the matching methods of the layers and combine the results appropriately. In all methods, the depth z should be given as a negative value if it is below the surface of the ice.
- Parameters
- layersarray_like
Array containing the ice models for each layer of the ice. Each ice model should have an
index
method for calculating the index of refraction at a depth as well as a range attribute describing the depth range of the ice layer.- index_abovefloat or None, optional
Index of refraction above the uppermost ice layer. If None, uses the index of refraction at the uppermost boundary.
- index_belowfloat or None, optional
Index of refraction below the lowermost ice layer. If None, uses the index of refraction at the lowermost boundary.
- Attributes
- layerslist
List of ice models for each layer of the ice.
index_above
float or None, optionalThe index of refraction above the ice’s valid range.
index_below
float or None, optionalThe index of refraction below the ice’s valid range.
Methods
contains
(point)Determines if the given point is within the ice’s valid range.
Calculates the corresponding depth for a given index of refraction.
index
(z)Calculates the index of refraction of the ice at a given depth.
Determines the layer of ice at a given depth.