ModelIntersectionView#
- class cegalprizm.investigator.ModelIntersectionView(investigation: cegalprizm.investigator.inv.investigation.Investigation)#
A class representing a ModelIntersectionView
The view defines how a model intersection should be displayed. It allows control of both what data should be displayed and how the the data should be rendered.
Functions
__init__
(investigation)copy
()Create a copy of this view
create_borehole_views
([borehole_names])Creates a copy of this view for each borehole specified
create_property_views
([property_names])Creates a copy of this view for each property specified
Gets the east-west range of the model
get_json
()Gets the json string representing the current view
Gets the north-south range of the model
set_borehole
(borehole_name)Sets the borhole for which the intersection should be shown
set_colorscale_location
(inside_viewport, ...)Set where in the plot the points colorscale is to be shown.
set_east_west
(value)Set the location of the east-west intersection
set_grid
(grid)Sets the grid to be shown in the view
set_i
(value)Set the i slice to show
set_j
(value)Set the j slice to show
set_north_south
(value)Set the location of the north-south intersection
set_property
(property_name)Sets the property to be shown in the view
show_colorscale
(show)Set whether the points colorscale is shown
show_colorscale_frame
(show_frame)Set whether the frame should be shown around the points colorscale
- copy()#
Create a copy of this view
- Returns
the copied view
- Return type
- create_borehole_views(borehole_names: Union[str, Sequence[str]] = 'all') List[cegalprizm.investigator.views.predefined_view_tuple.PredefinedViewTuple] #
Creates a copy of this view for each borehole specified
- Parameters
borehole_names (Union[str, Sequence[str]], optional) – Defaults to ‘all’. - ‘all’ will duplicate the view for all the valid boreholes in the investigation - a list of boreholes to be used
- Returns
a list of views; one per specified borehole
- Return type
List[PredefinedViewTuple]
- create_property_views(property_names: Union[str, Sequence[str]] = 'all') List[cegalprizm.investigator.views.predefined_view_tuple.PredefinedViewTuple] #
Creates a copy of this view for each property specified
- Parameters
property_names (Union[str, Sequence[str]], optional) – Defaults to ‘all’. - ‘all’ will duplicate the view for all the valid properties from the investigation - a list of property names to be used
- Returns
a list of views; one per specified property
- Return type
List[PredefinedViewTuple]
- get_east_west_range() Tuple[float, float] #
Gets the east-west range of the model
- Returns
A tuple containing the value range for the east-west intersections
- Return type
Tuple[float, float]
- get_json() str #
Gets the json string representing the current view
- Returns
The json string
- Return type
str
- get_north_south_range() Tuple[float, float] #
Gets the north-south range of the model
- Returns
A tuple containing the value range for the north-south intersections
- Return type
Tuple[float, float]
- set_borehole(borehole_name: str)#
Sets the borhole for which the intersection should be shown
- Parameters
borehole (str) – The borehole name
- Raises
ValueError – if the breohole is not valid
- set_colorscale_location(inside_viewport: bool, location: str)#
Set where in the plot the points colorscale is to be shown.
Valid locations outside viewport are ‘left’ or ‘right’ Valid locations inside viewport are ‘top-left’ or ‘top-right’ or ‘bottom-left’ or ‘bottom-right’
- Parameters
inside_viewport (bool) – If True, the colorscale will be shown inside the viewport
location (str) – A string indicating the desired location of the colorscale
- Raises
ValueError – if the location is not a valid string
- set_east_west(value: Union[float, int])#
Set the location of the east-west intersection
- Parameters
value (Union[float, int]) – The location of the intersection to be used
- Raises
ValueError – if the value is not valid
- set_grid(grid: str)#
Sets the grid to be shown in the view
- Parameters
grid (str) – The name of the grid to be used
- Raises
ValueError – if the property_name is not a valid property
- set_i(value: int)#
Set the i slice to show
- Parameters
value (int) – The i slice index to be used
- Raises
ValueError – if the value is not valid
- set_j(value: int)#
Set the j slice to show
- Parameters
value (int) – The j slice index to be used
- Raises
ValueError – if the value is not valid
- set_north_south(value: Union[float, int])#
Set the location of the north-south intersection
- Parameters
value (Union[float, int]) – The location of the intersection to be used
- Raises
ValueError – if the value is not valid
- set_property(property_name: str)#
Sets the property to be shown in the view
- Parameters
property_name (str) – The name of the property to be used
- Raises
ValueError – if the property_name is not a valid property
- show_colorscale(show: bool)#
Set whether the points colorscale is shown
- Parameters
show (bool) – Should the colorscale be shown
- show_colorscale_frame(show_frame: bool)#
Set whether the frame should be shown around the points colorscale
- Parameters
show (bool) – Should the colorscale be shown