General overview
5. place the camera in the previously saved position (see button 6) 6. save the current position of the camera
7. take a snapshot of the current view. The image can be saved in multiple for-mats, including PostScript, PNG or BMP. The image captured is exactly what is displayed in the current view.
1 2 3 4 5 6 7
Figure 2.15 Camera control buttons
The Preference tab of the Visualization Panel contains several controls to cus-tomize the way objects are displayed. The Preferences for drop-down list lets the user pick which object to set preferences for (see Fig. 2.16). There is one entry for each object currently loaded in the SGeMS object database, as well as a <General> preference panel.
The <General> preference panel has controls to:
2.2 A typical geostatistical analysis using SGeMS 17
Figure 2.16 Selecting the object for which to set preferences
Figure 2.17 The Volume Explorer section of the preference panel for a Cartesian grid
• exaggerate the scale along the Z axis
• change the perspective mode: in Perspective view, the front face of a cube appears bigger than the back face, while in Orthotropic view distances and angles are conserved
• toggle the color of the background between white and black
• display the colorbar used for a given object. Although it is possible to display several objects at the same time, only one colorbar can be shown. By default the colorbar is placed on the right hand side of the view and can be moved with Alt + arrow keys or resized with Ctrl + arrow keys.
When visualizing the results of our simple kriging run, only the outer faces of the grid can be seen by default. However, the preference panel forkriging grid
contains options to display only slices or part of the grid (using volume rendering).
Select kriging gridin the Preferences for list. The preference panel is divided into three sections: General, Properties and Volume Explorer. The Volume Explorer section is shown in Fig.2.17.
Figure 2.18 Four slices ofkriging grid
We will first explore the grid by slicing it. Display kriging grid and check Use Volume Explorer. Check Hide Volume so that only slices are visible. Since we have not displayed any slice yet, nothing is visible in the view. By default only three slices can be viewed simultaneously, those orthogonal to X, Y and Z. Check the box next to a slice to display it and use the cursor to move the slice. If more slices are needed, select the orthogonal axis and click the Add button. Figure2.18 shows four slices ofkriging grid, two orthogonal to X, one orthogonal to Y and one orthogonal to Z.
Another useful application of the Volume Explorer is to hide parts of the grid.
For example, it can be used to show only the grid cells with extreme porosity value and hide all the others. Uncheck Hide Volume and enter interval 0.255, 0.303 in the Transparent Rangesline. All cells with a porosity value between 0.255 and 0.303 are hidden as illustrated by Fig.2.19.
It is possible to enter multiple intervals; each interval must be separated by a semi-colon. For example 0.2, 0.25; 0.3, 0.35 would hide all cells with a porosity value in the interval [0.2, 0.25] or the interval [0.3, 0.35].
2.2 A typical geostatistical analysis using SGeMS 19
Figure 2.19 Volume rendering – all cells with a porosity value between 0.255 and 0.303 are hidden (almost completely transparent)
2.2.7 Post-processing the results with Python
Not all the cells of kriging gridmay be of interest. The reservoir modeled by
kriging gridfeatures two main rock types: sand channels aligned in the North–
South direction and background shales (see Fig.2.5). All the 563 data points were sampled in the sand bodies, and were used to estimate porosity in the sand chan-nels. This section demonstrates how to apply a mask and remove the non-sand channel cells fromkriging grid.
File mask.gslibcontains the mask data: it is a Cartesian grid in GSLIB for-mat with a single property attached to each cell. The property is equal to 1 if the cell is in a channel, 0 otherwise. Click Objects → Load Object and browse to the mask file location (or drag-and-drop the file on the Visualization Panel). Since the GSLIB file format does not provide all the information required by SGeMS, a wizard prompting for additional information is popped up. The first screen of the wizard prompts for the type of the object, a Cartesian grid in this case. In the sec-ond screen, provide a name for the grid, e.g.mask, and indicate the number of cells in the grid (100 × 130 × 10), the size of each cell (1 × 1 × 1) and the origin of the
grid (0,0,0). Refer to Section2.3for more details on the parameters characterizing a Cartesian grid in SGeMS.
To apply the mask, SGeMS needs to
1. loop over all cells u1, . . . ,unofkriging grid
2. for a given cell uk, check if the corresponding cell uk inmask has afacies
property equal to 0
3. if yes, remove the porosity value of uk. SGeMS uses value −9966699 as a no-data-value code.
This can easily be accomplished by writing a script. SGeMS can execute scripts written in Python, a very popular and powerful programming language (www.python.orgprovides background on Python as well as tutorials). Although Python is briefly introduced in this section and in Section10.2, the reader is invited to refer to the Documentation section ofwww.python.orgto learn more on writing Python scripts.
Click Scripts → Show Scripts Editor to bring up the scripts editor. From the scripts editor, load script fileapply mask.py. The script is reproduced below:
1 import sgems
2
3 mask=sgems.get_property(’mask’, ’facies’)
4 porosity=sgems.get_property(’kriging grid’,’estimated porosity’)
5
6 for i in range(len(mask)):
7 if mask[i] == 0:
8 porosity[i]= -9966699
9 sgems.set_property(’kriging grid’,’estimated porosity’,porosity)
Following is the line-by-line explanation of the script.
Line 1 tells Python to load SGeMS specific commands (see Section10.2), such assgems.get propertyandsgems.set property.
Line 3 transfers thefaciesproperty of gridmaskinto an array calledmask
Line 4 transfers theestimated porosityproperty of gridkriging gridinto an array calledporosity
Line 6 creates a loop, i will go from 0 to the size of arraymask−1 Line 7 tests if the ith cell of gridmaskis background shale
Line 8 if the ith cell is background shale, discard the estimated porosity value