MaterialStack¶
- class pysics.basics.material.material_stack.MaterialStack(**kwargs)¶
A MaterialStack describes a series of materials stacked on top of each other, each with a given height.
- Parameters
- materials_heights: list, required
A list with (material, height) tuples
- name: str and String that contains only ISO/IEC 8859-1 (extended ASCII py3) or pure ASCII (py2) characters, required
The name of the material stack
- display_style: DisplayStyle, optional
A display style for visualisation of the material stack
- size_z: float and number > 0, optional
- solid_height: optional
- define_solid_height()¶
- get_epsilon_at_z(z_coord, environment=<pysics.basics.environment.Environment object>)¶
- get_material_id_at_z(z_coord, material_factory=None)¶
Given an z coordinate(or array of z-coordinates) returns the materials id number. The material factory can be passed but is withdrawn from the tech file by default.
- Parameters
- z_coordarray
Array of z coordinates at which you want the material id.
- material factorymaterial_factory
material factory in which to get the coordinates
- Returns
- material_id array
- define_size_z()¶
- get_number_of_layers()¶
- get_numpy_matrix_representation(environment=<pysics.basics.environment.Environment object>)¶
Make a numpy matrix with for each layer a row that contains: StackID | Layer Height | Layer epsilon | number of layers in stack
- get_unique_id()¶
- get_solid_size_z()¶
returns the height of the stack from bottom to top until the forst non-solid material is encountered
- consolidate()¶
generates a copy where all adjacent layers of identical materials are joined
- consolidate_copy()¶
generates a copy where all adjacent layers of identical materials are joined
- visualize(show=True, linewidth=1.0, titlepad=6.0)¶
Helper function to plot a MaterialStack object with matplotlib.
- Parameters
- show: bool
Defines whether to show the figure, default is True.
- linewidth: float, optional
Width of a line
- titlepad: float, optional
Offset for the title
- clip_copy(z_min=0.0, z_max=None)¶
Performs clipping of a stack between [z_min, z_max] and returns a new MaterialStack.
- Parameters
- z_min: float
Starting clipping point
- z_max: float
Ending clipping point
- Returns
- MaterialStack
Returns a copy