PETROPHYSICS.IO
DOCUMENTATION

Log Viewer reference

Build four depth tracks with independent curve styles, meaningful fills and a reproducible view.

Danila Karnaukh · Petrophysicistv17 · Updated 2026-10-04Markdown version

Lock dock (v16)

Turn Lock dock on below the tool switcher to share the original LAS across Log Viewer, Crossplot, Histogram and Python in the same browser and website address. New files, sample files and removal synchronize with open tabs. The stored original LAS restores after navigation or reload. Turning off deletes the stored shared LAS and leaves open datasets in place.

Scripts, calculated results and plot settings stay in each tool. A different shared LAS resets results/views and stops a run against the old file while keeping editor text. Save your project before leaving a page. Export LAS and reimport it while locked to share calculated curves as source curves. Read Lock dock: workflow, storage and limitations.

Load and assign curves

Choose one LAS versions through 3.0 file, drag it into the drop area, or use Try synthetic sample data. Limits: 25 MiB, 250,000 rows, 5,000,000 data cells across all tables. The viewer starts with four empty tracks.

Find a curve in the LAS list. Drag it into a track, or select it and click the track’s + button. Any curve can appear in several tracks, once per track. Curve references preserve duplicate mnemonics as separate IDs. Remove a curve in Track setup. Changes are committed only by Apply changes.

Compute Vsh from GR

  1. Click Vsh from GR above the tracks.
  2. Select the GR curve and supply GR min · clean and GR max · shale in its recorded units.
  3. Click Calculate Vsh, then use + on a track or drag the new VSH_GR curve into it.

Vsh = (GR − GR min) / (GR max − GR min), limited to 0–1 v/v. GR max must exceed GR min. Missing samples stay missing. Supply representative clean-rock and shale references, not necessarily the file’s extrema. Computation uses the full source LAS, independently of its visible depth window and display scales.

The result starts at 0–1 on a linear scale and supports all existing curve styles, readouts and fills. Reopen the calculator and click Update Vsh to update the same result across all tracks. One calculated Vsh is maintained per file. Existing source curves are preserved; a name collision produces VSH_GR_2 or the next free suffix.

Saved settings record the source and references and recalculate Vsh when loaded with the original LAS. Older v4 scenes remain compatible. Verify plot reports valid, missing and clipped counts for the full file. PNG exports identify the calculation in their footer. New file loads clear the calculation; settings do not embed raw measurement or result arrays.

This version uses the linear GR index as a shale-volume estimate, with no nonlinear shale model or unit conversion. Method reference: Kansas Geological Survey, Shaly Sandstone Log Analysis, pp. 4–5.

Density porosity and Archie Sw (v6)

Porosity from density: select bulk density, confirm g/cm³ or kg/m³, and enter matrix and fluid endpoints in g/cm³. Both must be positive; matrix density must exceed fluid density. Calculate, then add PHID from the curve list to a track.

φD = (ρma − ρb) / (ρma − ρfl)

Output is v/v. Raw values are retained initially; optional 0–1 clipping is available. Missing or non-positive density stays blank. kg/m³ is divided by 1,000 for the computation only. Source values remain unchanged. This is apparent density porosity with no shale or gas correction.

Archie Sw: select porosity (LAS or calculated PHID), confirm fraction or percent, choose Rt and its units, and supply Rw at formation temperature in Ω·m plus positive a, m and n. The initial a=1, m=2 and n=2 values are editable, not calibrated for your well.

Sw = [a × Rw / (Rt × φ^m)]^(1/n)

20 percent is treated as 0.20. Rt may be Ω·m or Ω·ft (multiplied by 0.3048). No temperature or invasion correction is performed. Archie assumes a suitable clean, non-conductive matrix model; there is no shale correction. Missing inputs, φ≤0, φ>1 or Rt≤0 remain blank. SW_ARCHIE is v/v; 0–1 clipping starts on and can be disabled to retain above-one results for QC.

One result per calculation type is maintained. Name collisions receive suffixes, preserving original curves. Recalculation preserves tracks, styles, fills and depths, and updating PHID also updates Archie when it uses PHID. Calculations use the full LAS and commit together after validation. Verify plot reports parameters and sample counts. Saved JSON reconstructs the results from the original LAS; PNG includes calculation summaries. Results stay local to this page, without derived LAS export or Crossplot transfer.

References: SLB porosity · SLB formation factor · AAPG Archie equation.

Scales and line styles

Each curve has its own Min (left), Max (right), linear or log scale, colour, line style and thickness. Min greater than Max reverses the scale. Logarithmic endpoints must both be positive. Line styles: solid, dashed, dotted, dash–dot and long dash. Thickness: 0.5–10 px.

Initial limits are suggested from recognised mnemonics and units; check them before interpreting an overlay. No stored measurement values are converted. A density curve and a neutron curve use independent scales even when drawn in one track.

Fill to track edge (v7)

In a curve’s Track setup, enable Fill to track edge. Choose Left edge or Right edge, then Single colour or Palette. Set a colour or choose Viridis, Plasma, Ocean, Warm, Blue–white–red or Greyscale. Opacity is 0–100%; Reverse palette swaps its colours.

The fill runs horizontally from the displayed curve to the selected physical track edge. Palette colour changes down the log with this curve’s value at each depth. Min (left) and Max (right) define the palette endpoints; logarithmic scales use logarithmic colour spacing. A reversed scale also reverses the value mapping. Values outside the scale use the end colours, while the fill is clipped at the track edge. Changing fill options does not change the curve scale or depth interval.

Palette interpolation follows the same straight segments as the displayed curve. Missing samples, non-positive log values and depth gaps remain blank. Edge fills are drawn first, then existing baseline and between-curve fills, then curve lines; fills can be used together. Saved JSON and exported PNG include the new fill choices. Older scenes load with edge fills switched off.

Fill to a baseline

In Track setup, enable Fill to a baseline for a curve. Enter the baseline in that curve’s LAS units. Choose the colours for Curve left of baseline and Curve right of baseline, plus opacity from 0–100%. For the worked example, GR uses 0→150 gAPI and a baseline of 75 gAPI.

Left/right is determined after the scale transform. Reversing a scale reverses the screen relationship. A baseline can be outside the view; only the visible part of the fill is drawn. On a log scale, its value must be positive.

Fill between two curves

One curve pair can be filled per track. Choose Curve A and Curve B from that track, enable the fill, then choose A left of B and A right of B colours. These names refer to screen position, not a numerical comparison between unlike units. Each curve keeps its own scale. Colours change at displayed crossings.

Missing values, non-positive log values and gaps in depth break the curves and the fills. The drawing is clipped to the track boundaries.

Depth and inspection

Set Top and Bottom and click Apply. Depth increases downwards. Fit all restores the full interval. Detail chooses a smaller window. Drag to pan; Ctrl/⌘ + scroll zooms at the pointer. The depth slider and Shallower/Deeper buttons also move the window. Hover or tap to read sample values.

With the plot focused, Arrow Up/Down and Page Up/Down pan; +/− zoom; Home fits the well; Esc clears the gesture/readout. The viewer sorts descending depth rows while retaining their original curve values. The report identifies reordered or duplicate depths.

Export and reuse

Export PNG includes all four tracks, visible depth interval, curve scales, styles and fill legends. It exports the current viewport; use Fit all first for the whole well. Save settings records all four tracks and the current depth window. Load settings requires the same source LAS. JSON imports support up to 256 curve entries per track.

Run the four-track example · Inspect the cemented interval · Settings reference

Python workspace (v9)

Open Python editor above the tracks. Use the Objects tree, CodeMirror editor, Run / Stop, Output, Results and Plots. Standard Python receives a well snapshot with NumPy arrays; well.add_curve() adds or updates custom curves. Built-in calculations preserve these results and their track references. See the complete Python reference.

Save project includes the script and actual Python result arrays; reload the same original LAS and use Load project to restore them without running code. Ordinary Vsh/porosity/Archie results still reconstruct from parameters. Results are snapshots: rerun Python after changing inputs.

Expand the log view (v11)

Click Expand in the log plot header to use the window for the depth tracks. Track setup, calculations and depth controls remain available. Dock or Escape restores the embedded view without changing curves or depth limits. Opening Python editor from an expanded plot docks the plot. Python is also available in Crossplot and as its own tool at /python/.

Export LAS (v15)

Export LAS is available in Log Viewer, Crossplot, Histogram and Python. It downloads every original parsed curve and all current calculated results. Log Viewer includes Vsh, density porosity and Archie Sw as well as Python results.

Find the button beside Export PNG in the plotting tools, in their expanded plot headers, or beside Save .py in any Python editor, docked or expanded. It becomes available after a LAS loads, even before calculating, and is disabled during Python execution or another project action.

To include a Python curve, call well.add_curve(...) and finish successfully. Earlier committed and restored project results are included. New script, Reset kernel, Stop and a failed run retain previous committed results.

The download contains the full parsed LAS interval and all curves. Track assignments, visible depth limits, axis choices, zoom, filters and point selection do not restrict it. Regression lines are plot objects, not LAS columns.

Open the exported LAS in another tool to reuse results, or load it while Lock dock is on to share it across tools. Python kernels and projects stay specific to each page. CSV export is not included.

// JavaScript in any of the four tools:
const result = await Petrophysics.export_result({format: "las", download: false});
// Omit download:false to start a download.
console.log(result.rows, result.curveCount, result.calculatedCurveCount);
console.log(result.renamedCurves, result.warnings);

The result also includes blob, filename, format, bytes, pythonCurveCount and nullValue. Calculated count includes built-in and Python curves; Python count is its subset. NO_DATASET means load a LAS; PYTHON_RUNNING means finish or stop the run. There is no Python well.export_las method. Request LAS explicitly; default exports remain PNG in plotting tools and JSON in standalone Python.

Python without a LAS (v17)

Python editor works even before a LAS is loaded. Run ordinary Python, NumPy, pandas, SciPy and Matplotlib with your own data; in this mode well is None. Save .py keeps your code. Load a LAS when you need well objects, curve results and LAS export. See the Python reference.

LAS datasets in v22

All four tools share the reader for LAS versions through 3.0. Choose the active table using LAS dataset. Projects record its identity; Lock dock shares that choice and the source file. Numeric plots require numeric data, and Log Viewer requires depth. Python exposes typed fields and all tables with well.datasets and well.dataset(id). Legacy numeric export remains LAS 2.0; LAS 3.0 export retains extra tables and typed fields. LAS formats, syntax and limits.