Importing LAS Well Logs
This guide covers importing geophysical well log data in LAS 2.0 (Log
ASCII Standard) format into VRGS. Use it whenever you receive wireline or
LWD data — gamma ray, resistivity, density, neutron, sonic, image-log
channels, etc. — packaged as a .las file from a contractor, public
repository, or in-house log database.
VRGS continues to accept its native JSON well-log format alongside LAS. The LAS importer produces the same internal structure, so curves imported from either source render and serialize identically.
What is LAS 2.0?
LAS is the industry-standard ASCII interchange format for geophysical
well logs, maintained by the Canadian Well Logging Society (CWLS). A LAS
2.0 file is a plain text file organised into named sections, each
beginning with a tilde (~):
| Section | Purpose |
|---|---|
~V | Version + WRAP flag |
~W | Well information (name, location, KB elevation, depth range, NULL value) |
~C | Curve definitions (mnemonic, unit, description) |
~P | Optional parameters (mud, bit size, run conditions) |
~O | Free-form "other" comments |
~A | ASCII data block — depth + one column per curve |
A minimal LAS file looks like this:
~V
VERS. 2.0 : CWLS LOG ASCII STANDARD - VERSION 2.0
WRAP. NO : ONE LINE PER DEPTH STEP
~W
STRT.M 1670.0000 : START DEPTH
STOP.M 1672.0000 : STOP DEPTH
STEP.M 1.0000 : STEP
NULL. -999.25 : NULL VALUE
WELL. ANY-WELL-1 : WELL
EKB .M 250.0 : KB ELEVATION
X .M 500000.0 : SURFACE X
Y .M 6000000.0 : SURFACE Y
~C
DEPT.M : DEPTH
GR .API: GAMMA RAY
~A
1670.0000 75.50
1671.0000 -999.25
1672.0000 88.10
VRGS supports LAS 2.0 unwrapped files. Wrapped files (WRAP. YES) and
LAS 3.0 files are not supported (see Limitations).
Two ways to import
VRGS offers two entry points depending on whether you are creating new well objects or attaching curves to a well that already exists in the project tree.
1. Batch import — one new well per file
Use this when the LAS files are the source of truth: each file becomes a
new Log object in the project tree.
- In the Project Group menu, choose Import Sed Logs…
- In the file-type filter, select LAS Well Log (*.las).
- Multi-select one or more
.lasfiles and click Open. - VRGS creates a new log per file, names it from the LAS
WELLmnemonic (or the filename ifWELLis empty), populates the curves, and renders the 3D log strip alongside the well track.
Each log is registered through the standard object factory, so it appears in the Data Tree under Logs and persists with the project on save.
2. Per-log import — attach curves to an existing log
Use this when you have already created a Log object — for example you
imported a deviation survey from a CSV track first, or you want to attach
new curves to a re-logged well.
- In the Data Tree, right-click the existing log and choose Import → Geophysical Log Tracks…
- In the file-type filter, select LAS Well Log (*.las).
- Pick the file and click Open.
- The log's existing curves and data are replaced by the LAS contents. The log's existing deviation track is preserved (see Deviation handling).
How LAS fields map to VRGS
| LAS source | VRGS destination | Notes |
|---|---|---|
~W WELL / UWI | Log name | Falls back to the filename (without extension) if absent |
~W EKB / KB / EREF / EGL | KB Offset | First non-zero match wins |
~W X / XCOORD / SURFX | Surface X (Easting) | Skipped if the log already has a deviation track |
~W Y / YCOORD / SURFY | Surface Y (Northing) | Skipped if the log already has a deviation track |
~W STRT / STOP / STEP | Used to derive elevation of the log top + validate the data block | |
~W NULL | Sentinel value treated as missing data | Default -999.25 if absent |
~C mnemonic / unit / description | Curve name / unit / descr | One per curve |
~A first column | Depth (assumed measured depth from KB) | Drives the deviation interpolation |
~A remaining columns | Per-curve sample values | NULL sentinels become true nulls |
After import, each curve also stores min / max calculated from the
non-null data — these drive the log-track auto-scaling on the 2D log
plot and the colour map of the 3D log strip.
Deviation handling
LAS 2.0 carries no deviation survey — only depth + curve values. VRGS resolves the 3D position of every sample using one of two strategies, chosen automatically:
A. The log already has a deviation track
If the log has 2 or more deviation samples loaded (e.g. you imported a
.csv track via Import → Geophysical Log Tracks… before importing
the LAS), VRGS preserves that track and interpolates XYZ at each LAS
depth along it.
The interpolation:
- Sorts the existing track by Z descending (top first).
- Converts each LAS depth
dto a target elevationz = KB - d(using the LAS file'sEKBvalue). - Linearly interpolates between the two bracketing track samples to place the curve sample.
This is the standard workflow when you have a real deviation survey: import the track first as CSV, then layer LAS curves on top.
B. The log has no track yet
VRGS builds a vertical track from the surface position:
- Surface X / Y come from the LAS
~WX / Y mnemonics, or(0, 0)if absent. (You can override before import usingCLogImporterLAS::SetSurfacePosition— there is no UI for this yet.) - Surface Z is
EKB − STRT, so the top of the LAS depth range sits at the well head. - Each subsequent sample drops by
(depth − STRT)metres.
This is suitable for vertical wells and quick-look situations. For deviated or horizontal wells, import the deviation survey first (see strategy A).
Working with imported curves
Once curves are loaded, VRGS treats them identically to JSON-imported curves:
- The 2D log container (the panel that appears alongside the 3D view) draws each curve in its own track. Use the curve picker to select which mnemonic is the active log.
- The active curve also drives the 3D log strip — the coloured ribbon that follows the well in the 3D scene, with width and direction controlled in the log's display options.
- RGB tracks (e.g. R/G/B image log channels) can be assembled from any three numeric curves through the same display options.
- The full curve set is persisted with the project as BSON inside the log's database row, so re-opening the project requires no re-import.
Round-tripping to JSON
To share a LAS-imported log with another VRGS user (or to inspect it), export it as JSON:
- Right-click the log in the Data Tree and choose Export…
- Pick JSON Well log (*.json) and save.
The exported JSON is the literal contents of the log's
m_DigitalLog["JSONLog"] array — curves, data, deviation — and can be
re-imported via Import → Geophysical Log Tracks… with the
JSON Well Log filter selected.
Troubleshooting
"WRAP-mode LAS files are not supported"
Your file uses WRAP. YES in ~V, which spreads each depth step across
multiple lines. Re-export it as unwrapped from the source software, or
use a converter (lasio in Python, the CWLS wrapconv utility, etc.)
to flatten before importing.
"LAS file has no ~C section or no curves declared"
The ~C curve-definition section is missing or empty. A valid LAS file
must declare at least the depth column. Check that your file is true
LAS 2.0 and not a renamed CSV.
"Data row column count does not match curve count"
A line in ~A has a different number of values than the count of ~C
mnemonics. This is most often caused by:
- Embedded tabs or extra whitespace inside a single value.
- A truncated last line.
- Hand-edited data with a missing column.
Open the file in a text editor and inspect the failing row.
NULL values appear as the curve minimum
VRGS converts every value matching the ~W NULL sentinel into a true
null, which the 2D log container plots as the curve minimum (so the
track stays connected). If you see a flat-line at the minimum across an
interval, the source file legitimately had -999.25 values (or
whatever sentinel the file declared).
The log is in the wrong place in 3D
If you imported the LAS without a prior deviation track and the LAS
file's ~W X / Y mnemonics are missing or zero, the log will sit at
the project origin. To fix: import the deviation survey separately as
CSV via Import → Geophysical Log Tracks…, then re-import the LAS
into the same log — the existing track will be preserved and the curves
re-aligned.
KB offset looks wrong
VRGS reads EKB, KB, EREF, then EGL in that order, taking the
first non-zero match. If your LAS uses a non-standard mnemonic for the
KB elevation, the offset will default to 0.0 and the log will be
positioned at depth = elevation. Either edit the file to use a standard
mnemonic or set the KB offset manually in the log's properties after
import.
Limitations
The current importer covers the LAS 2.0 spec as it appears in the vast majority of wireline deliverables. The following are not supported:
- WRAP mode (
WRAP. YES) — multi-line per depth step. - LAS 3.0 — the multi-array section model differs significantly and needs a separate parser.
- Deviation surveys from sidecar files (e.g.
.dev,.svy). Workaround: convert to CSV and import as a track first. - LAS export — VRGS exports curves only as JSON for now.
- Coordinate-system reprojection — the X/Y mnemonics are taken at
face value in the project CRS. If your LAS uses lat/lon
(
SLAT/SLON), set the surface position manually before import. ~Pparameters — read but not currently surfaced in the UI.
See also
- Sedimentary Logs Context Menu — full reference for the right-click menu on logs.
- 3D Logs Ribbon Tab — deviation editing and dip-domain commands.
- 2D Logs Ribbon Tab — log track display, RGB tracks, curve selection.