Plotting API - Map (Geo-technical)#
This notebook provides the user a guide to how a map can be shown using a Blueback Investigation. Check out the API documentation to view all the functions available for the model intersection view:
Import dependencies :
[103]:
import cegalprizm.investigator as investigator
from cegalprizm.investigator import InvestigatorConnection
from cegalprizm.investigator.views import MapView
Connect to Investigator and assign the investigation to a variable :
[112]:
invconnection = InvestigatorConnection(use_licensed_features=True)
inv = invconnection.investigation_from_file("Surface.invpy")
To create a map view of the investigation use the MapView() function with the investigation(inv) as the input parameter. To plot the map, use the .plot() function which takes as input parameters the specific view, in this case the map view. You can also provide the width (defaults to 900) and the height (defaults to 600) of the figure.
[115]:
map_view = investigator.MapView(inv)
map_view.show_colorscale(True)
investigator.plot(map_view)
[115]:

By default, the model intersection view will display the first property in your investigation. You can change the property by using the .set_property() function:
[116]:
map_view = investigator.MapView(inv)
map_view.set_property('Gamma')
investigator.plot(map_view)
[116]:

If you have multiple surfaces in your investigation you can chose which one to display using the .set_surface() function:
[120]:
map_view = investigator.MapView(inv)
map_view.set_property('Porosity')
map_view.set_surface('T_Etive')
investigator.plot(map_view)
[120]:

If the surface has a depth attribute you can display it using the .show_depth_property() function:
[119]:
map_view = investigator.MapView(inv)
map_view.set_surface('T_Etive')
map_view.show_depth_property()
investigator.plot(map_view)
[119]:

When displaying a depth map you can also display the contour lines using the .show_contours() function:
[8]:
map_view = investigator.MapView(inv)
map_view.set_surface('T_Etive')
map_view.show_depth_property()
map_view.show_contours(True)
investigator.plot(map_view)
[8]:

The .set_interpolate() function sets whether the edges of the map data should be interpolated:
[15]:
map_view = investigator.MapView(inv)
map_view.set_property('Porosity')
map_view.set_interpolate(True)
investigator.plot(map_view)
[15]:

The map view can also be used to visualize grid properties. Let’s use an investigation that contains model and well datasets:
[122]:
inv = invconnection.investigation_from_file("Wells+Model.invpy")
If you have multiple 3D grids in your investigation you can select the one you want to work with using the .set_grid() function. To select the k-layer to be displayed on the map use the .set_k() function:
[50]:
map_view = MapView(inv)
map_view.set_property('Porosity')
map_view.set_grid('GEO Grid')
map_view.set_k(64)
investigator.plot(map_view)
[50]:

You can also display the wells on the map using the .show_boreholes() function which has 3 boolean parameters representing: the wellhead symbol, well name and the well path. If you have multiple wells in the investigation you can select the ones you want to show using the .set_boreholes() function.
[75]:
map_view = investigator.MapView(inv)
map_view.set_property('Porosity')
map_view.show_boreholes(True,True,True)
map_view.set_boreholes(['B9','B8'])
investigator.plot(map_view)
[75]:

Using the .set_zone_property() function you can generate zone properties such as mean, min, max, net, volumeheight and thickness. Use the .set_zone() function to select the zone:
[92]:
map_view = MapView(inv)
map_view.set_property('Porosity')
map_view.set_zone('N2')
map_view.set_zone_property('mean')
investigator.plot(map_view)
[92]:

Using the multi_plot() function alongside the create_zone_views() function we can generate the same zone property for multiple zones in our model:
[96]:
map_view = MapView(inv)
map_view.set_grid('GEO Grid')
map_view.set_property('Porosity')
map_view.set_zone_property('mean')
investigator.multi_plot(map_view.create_zone_views(['T1','T2','T3']))