Residual calculation
Residual calculation compares a map with marker values at well locations and reports the difference (the residual) for every well. Use it to check how closely a structural map honours the well data, to find the wells where the map is too high or too low, and to keep the result for further analysis.
For each well in the selected scope the wizard takes the well-path position of the marker, samples the map at that position, reads the selected marker attribute and calculates the residual with the chosen formula. The results are shown in the wizard as summary statistics and a table, and can be stored as a point set in the Points branch of the Data manager.
Requirements
- At least one map in the project. Internal topography and External topography can also be used as the map when they are loaded.
- At least one marker set or zone set that contains picked markers.
- Wells in which the selected marker is picked. Wells without that marker are reported and produce no result row.
Opening the wizard
Open the wizard from the Modelling ribbon tab → Map calculator group → Residual calculation.
You can also start it from the map you want to check: in the Data manager, right-click a map under Maps and choose Calculate residuals with markers. That map is then already selected in the wizard.
The wizard opens as one dialog. The Input data, Well selection and Output groups are on the left, the Residual summary and the Residuals table are on the right, and the Save to workflow, Run, Save and Close buttons are along the bottom.

Input data
- Map — the map to check. Project maps are listed as map type followed by map name, for example Time maps - Topo_Time.
- Marker dataset — the marker or zone set to compare the map with. Entries are listed as user and set name, and zone sets are marked (Zones).
- Marker / top — the marker (or zone) inside the selected dataset.
- Attribute — which marker value to compare with the map: TVDSS, TVD, MD or any custom attribute defined for that marker. For a zone set only TVD is offered.
- Residual formula — Marker - Map (default) subtracts the map value from the marker value; Map - Marker is the opposite sign.
- Bounding polygon — Not required (default), or one of the project polygons to limit the calculation to an area. Wells outside the polygon are left out of the result.
Well selection
The Well selection group defines which wells take part in the calculation. The list shows a Well column with the well name and a Well path column with its position in the Data manager tree.
- Scope — the group of wells to work with: All wells, a well filter (Filter: and the filter name), a Data manager well folder (Folder: and the folder name) or a well section (Section: and the section name). Choosing a scope marks the wells that belong to it in the list.
- All wells — the default. Every well of the selected scope is used and the list is read-only.
- Selected wells — makes the list editable so that you can tick individual wells. Select all ticks or clears all of them, and the counter to the right of it shows how many of the listed wells are ticked.
Output
- Residual points name — the name of the resulting point set. g-Space suggests Residual_<map>_<marker>, with spaces and slashes replaced by underscores, and keeps the suggestion in step with your selections until you type a name of your own.
- Store result in Points — on by default. The residuals are written as a point set in the Points branch when you click Save. Turn it off to review and export the residuals without creating a point set.
- Open result table — off by default. When it is on, the new point set becomes the active table after saving. It applies only together with Store result in Points.
Running the calculation
- Click Run to calculate without saving anything. The Residual summary and the Residuals table are filled with the computed values, so you can change the selections and run again.
- Click Save to calculate and keep the result. If a point set with the same name already exists, g-Space asks whether to replace it. If Store result in Points is off, a message reports how many wells were calculated and no point set is created.
- Click Close to leave the wizard without saving.
The Run, Save and Save to workflow buttons stay disabled until every selector has a value, at least one well is selected, and a residual points name is entered when the result is to be stored.
Residual summary
- Count — the number of rows in the residuals table.
- Mean residual, Min residual, Max residual and Standard deviation — statistics of the calculated residuals. Rows without a residual are ignored, and all four show - when nothing could be calculated.
- Skipped wells — appears when the selected marker is not picked in some of the wells; those wells produce no row. Point at the line to see their names. They are also listed in a message after Save.
Residuals table
The table has the columns Well, East / X, North / Y, Map value, Marker value and Residual. Enable Show absolute residual to add an Absolute residual column.
- Where the map has no value at the well position, Map value and Residual show missing. The row is kept in the table and in the saved point set, but it does not contribute to the summary statistics.
- Click a column header to sort the table. Rows without a value always stay at the end, whichever direction you sort in.
- Select cells and press Ctrl+C to copy them; the column headers are included when the whole table is selected.
- Click Export CSV... to write the table to a comma-separated (.csv) or tab-separated (.tab) file. Run the calculation first, otherwise there is nothing to export.
The residual point set
With Store result in Points on, Save creates a point set under Points with one point per calculated well, placed at the well-path position of the marker. Each point carries the following attributes:
- Well name and Marker name — the well and the marker the residual belongs to.
- Marker value, Map value and Residual value — the compared values and their difference.
- Residual formula used — the formula applied to the point, or missing where the map had no value at that position.
Residual value is already assigned as the value attribute of the set, so the points are colour-coded by residual wherever point colouring by value is used. Otherwise the set behaves like any other Points object: display it on the Location map over the map you checked, open it in the Table view, or export it.
Save to workflow
Click Save to workflow to store the current settings as a Residual calculation job in the current workflow instead of calculating now. The job keeps the map, marker dataset, marker, attribute, residual formula, bounding polygon, well selection, output name and output options, and it calculates the residuals and writes the point set when the workflow is executed.
Reopening a saved job restores those settings in the wizard, and the buttons change to Save and Cancel. If a saved selection no longer exists in the project, that selector is left empty and a warning under Input data names what is missing; choose replacements before saving, because the job cannot be saved or run while a reference is unresolved.
See Also