🔒 Everything runs locally in your browser. No file, coordinate or measurement is uploaded to a server.
Clean a MintPy or SNAP CSV before it reaches a report
You have finished a MintPy stack, exported velocity.h5 to CSV, and the deliverable
is due to a state transport corridor team on Friday. Open the file in a spreadsheet and three small
problems appear at once: the acquisition dates are eight digits with no separators, one column of
longitudes was written by a colleague using a decimal comma, and a single point reads −62.7 mm/yr
in a stretch of ground that otherwise sits near −9 mm/yr. None of these is a scientific result. All
three will be reproduced, quoted and mapped unless somebody fixes the table first.
A CSV cleaner is a formatting instrument, not a deformation analysis. It converts the export
into a table that QGIS, GDAL, pandas and a reviewer can all read the same way, and it makes the
suspicious rows visible without quietly removing them. The distinction matters in a compliance
submission: a reviewer wants to see that you listed the outliers and recorded a decision, not that
a script silently dropped 8 percent of the points before the map was drawn.
Accepts .csv, .txt, .xlsx and .xls. Delimiters and per-column decimal commas are detected before anything else happens.
Processed points
Export
What a MintPy or SNAP CSV actually is
A MintPy CSV export is a plain-text table written from an HDF5 dataset such as
velocity.h5 or a time-series file. Typical headers include LON,
LAT, REF_DATE, DATE, VEL and
VEL_ERR, though the exact spelling depends on the export command and the processor
version. A SNAP CSV export is the table you get after exporting a raster or a pin list from a
BEAM-DIMAP product. Both are text with no schema, no declared coordinate reference system and no
declared date format, which is precisely why the same file can be read differently by Excel,
LibreOffice, pandas and QGIS.
An IQR flag is a statistical screen, not a judgement. Interquartile range is the distance
between the 25th and 75th percentiles of a numeric column. A value outside
[Q1 − k·IQR, Q3 + k·IQR] is flagged. The kernel uses linearly interpolated
quartiles, ignores non-finite values, and refuses to flag anything when fewer than four valid
numbers are present, because a quartile from three points is not a statistic anyone should defend.
Five operations, in a fixed order
Delimiter and decimal detection. The parser tests semicolon, tab, pipe and comma
against the first rows and picks whichever produces the most stable field count. It then
decides the decimal convention for each whole column, not per cell. A longitude column where
most values look like -121,4832 is read as decimal-comma throughout; a single
inconsistent cell is reported in the quality note rather than coerced into a plausible number.
Column mapping. Common aliases are folded into standard names:
LON/LONGITUDE/LNG,
LAT/LATITUDE,
VEL/VELOCITY/LOS_VEL/MEAN_VELOCITY,
DATE/DATE_END/REF_DATE, and
PHASE/PHI/UNWRAPPED_PHASE. If longitude or latitude
cannot be found, the tool says so and refuses to fabricate a KML with points in the wrong
hemisphere.
Date normalisation.20190101, 2019-01-01,
20190101_20201231 (a REF_DATE_DATE range) and timestamped forms
such as 2020-01-01T00:00:00 all become YYYY-MM-DD. For a range the
first segment is kept, matching the epoch a MintPy pair was referenced to. Month lengths and
leap years are checked: 20190230 returns null, the row survives and the date cell
is left blank rather than repaired by guesswork.
Outlier marking.iqrFlags(values, k) returns the indices of rows whose
velocity falls outside the fence. The default is k = 1.5; raising it to 3.0
isolates only extreme tails. The result is one extra column, iqr_flag. Rows are
never removed at this stage.
Export. The cleaned CSV uses six standard columns:
point_id, lon, lat, date_iso, velocity_mm_yr, iqr_flag. Commas, quotes, CR and LF
inside a value are escaped by the writer. The optional KML places one Placemark per point,
coloured in five velocity buckets at thresholds −15, −3, 3 and 15 mm/yr, using the KML
AABBGGRR colour order.
A worked 12-point corridor example
Load the built-in example. It is a synthetic 12-point profile along a subsiding agricultural
corridor in California's Central Valley, with longitudes near −121.4 and latitudes near 37.8,
referenced to WGS 84 (EPSG:4326) so it can be transformed to EPSG:32610 for a UTM deliverable.
Eleven points lie between −7.6 and −10.6 mm/yr; one reads −62.7 mm/yr. With k = 1.5
the kernel sorts the finite values, computes Q1 and Q3, builds the fence and returns the index of
that single row, while leaving all 12 rows in the table. That is the entire output of the
statistical step.
Whether PS-009 is a real localised settlement feature, a pumping-well artefact or an
unwrapping error is a spatial question. Open the KML alongside the coherence layer in QGIS: a real
feature has neighbours that move with it, an unwrapping error is usually isolated and sits on a
decorrelation boundary. The table cannot answer that and does not pretend to.
Property
Raw export
Cleaned output
Date field
20190101 / REF_DATE_DATE range
2019-01-01 (ISO 8601)
Decimal convention
Ambiguous, sometimes comma
Declared per column, reported in the quality note
Outliers
Invisible inside the velocity column
Explicit iqr_flag column, rows retained
Coordinate system
Not declared in the file
Still not declared; you must state EPSG:4326 or your target CRS
Geometry
None
Optional KML point layer, numeric lon/lat required
Handing the table to QGIS or GDAL
The clean CSV is deliberately boring: numeric lon/lat, an ISO date and a flag. To load it into
QGIS as a point layer, use Layer → Add Delimited Text Layer, set X to lon and Y to
lat, and declare EPSG:4326 explicitly. The tool does not write a CRS into a CSV
because the format has nowhere to put one. If your agency deliverable is in a projected system,
transform the layer rather than relabelling it — a common mistake is to set EPSG:32610 on
coordinates that are still degrees, which moves the points by orders of magnitude.
A reproducible GDAL route is a small VRT plus ogr2ogr:
State DOT and mining compliance packages often reference NAD83 realisations rather than WGS 84.
That is a datum transformation, not a relabelling: use the appropriate NADCON or PROJ pipeline and
record which one you used. Neither this cleaner nor the KML export performs any reprojection.
Where an IQR flag misleads
Quartile screens assume a roughly unimodal distribution. A corridor that crosses two distinct
geological units, a mine lease boundary or a fault will produce a bimodal velocity column, and a
fence built across both populations will mark the smaller one wholesale. Seasonal signals, a
reference-point change halfway through a stack, and mixed ascending/descending point sets cause
the same failure. The honest response is to stratify before screening: clean the whole table, then
run the screen separately per coherent spatial or lithological unit.
The other trap is treating the flag as a quality certificate. A clean-looking column can still
contain a systematic sign error, an atmospheric ramp or a whole field referenced to a moving
point. These are invisible to a univariate statistic. The error
budget calculator and the GNSS validation tool exist
for exactly that layer of checking.
What the tool will not do
It does not read BEAM-DIMAP .dim products or their .data folders.
Export the table from SNAP first. For raster products, see the
Float32 GeoTIFF exporter.
It does not unwrap, refilter, re-reference or re-estimate velocity. Values are copied
through after unit interpretation.
It does not guess a coordinate reference system, a time zone or a missing date. Invalid
dates become blank cells and the row remains visible.
It does not delete rows by default. The exclusion checkbox is off unless you turn it on.
It does not convert wrapped interferogram phase. Only unwrapped phase from your processor
can be mapped to millimetres using d = −λ·φ/(4π), which at Sentinel-1's
λ = 5.55 cm gives roughly 4.42 mm per radian.
It is not a deformation analysis and does not replace field verification.
A short pre-delivery checklist
Confirm the source: which HDF5 dataset, which export command, which reference date.
Read the quality note under the workbench. If a decimal or delimiter decision looks wrong,
fix the export rather than patching cells by hand.
Scan the ISO date column for blanks; every blank is an unparseable input you must resolve.
Adjudicate each flagged row against coherence, neighbours and the site history. Write the
decision into the report.
State the CRS and any datum transformation in the deliverable metadata, then verify the
layer extent in QGIS before the map is issued.
Frequently asked questions
Which MintPy files can I actually paste into this tool?
Any plain-text table exported from a MintPy HDF5 dataset, including the velocity CSV written from velocity.h5 and a per-epoch time-series table, plus SNAP pin or pixel exports where the numeric columns arrive as text. The parser expects a header row whose longitude and latitude columns it can recognise, alongside optional date, velocity and phase columns. It does not read BEAM-DIMAP .dim files or the .data binary folder: export that geometry to a table in SNAP first.
Does the IQR step delete rows from my dataset?
No. By default the tool only adds an iqr_flag column. It computes linearly interpolated quartiles from the finite values in the velocity column, builds a fence at Q1 − k·IQR and Q3 + k·IQR, and marks rows outside it. Rows stay in the cleaned CSV and in the KML. A separate checkbox lets you omit flagged rows from the export, and even then the exclusion is your explicit choice rather than a default behaviour.
How are REF_DATE_DATE ranges and timestamps handled?
The date normaliser takes the first compact date segment. A value such as 20190101_20201231 becomes 2019-01-01, and 2020-01-01T00:00:00 becomes 2020-01-01. It also accepts YYYYMMDD and YYYY-MM-DD directly. Month length and leap years are validated, so an impossible date such as 30 February returns a blank ISO cell while the row itself is preserved for you to correct.
Why does my KML contain fewer points than my CSV?
The KML writer skips any row whose longitude or latitude is missing or non-numeric, because a Placemark without coordinates is invalid. If every row fails that test it throws instead of producing an empty file. Check the quality note for a per-column decimal decision: a longitude column read with the wrong decimal convention often turns into an out-of-range number that the writer then rejects.
Can I use coordinates written with a decimal comma?
Yes, provided the column is internally consistent. The parser decides the decimal convention for the entire column, not cell by cell, so a longitudes column written as -121,4832 is interpreted correctly. Mixed conventions within one column are reported in the quality note and the offending cell is treated as non-numeric rather than silently coerced.
Will it convert wrapped interferogram phase to millimetres?
No. Phase-to-displacement conversion is only meaningful for unwrapped phase produced by your processor. Where an unwrapped phase column is present the underlying kernel uses d = −λ·φ/(4π) with λ = 5.55 cm for Sentinel-1, about 4.42 mm per radian. Raw wrapped interferogram phase has to be unwrapped first; converting it here would produce a number with no physical meaning.
Is anything uploaded, and what happens when I close the tab?
Nothing is uploaded. Parsing, statistics and both exports run in your browser, and you can confirm this in the network panel of your developer tools: there is no upload request. The parsed table lives in memory for the lifetime of the page and is discarded when you close the tab or reload it.
This toolkit provides preliminary geotechnical interpretation only. Results cannot replace licensed site investigation or official geohazard assessment reports. Field verification by qualified professionals is required for all engineering decisions.