Z-Split Normalization: Zero-Preserving Split Normalization for bipolar spectral indices
Project description
Z-Split Normalization (Zero-Preserving Split Normalization)
Version: 1.0.0
License: MIT
What is Z-Split?
Z-Split preserves zero as a fixed physical boundary while expanding narrow distributions clustered around zero into the full [−1, 1] range — normalizing and expanding in a single operation. This prevents the low-contrast output common with near-zero indices and creates a well-formed distribution suitable for Otsu thresholding and multi-temporal analysis.
Core Idea and Motivation
Spectral indices and remote sensing operations often produce values clustered tightly around zero due to radiometric constraints, surface reflectance properties, or normalized difference formulations. Standard normalization compresses these values further, producing low-contrast images and unstable thresholds.
Z-Split expands each side of zero independently into [−1, 0] and [0, 1], simultaneously normalizing and stretching narrow distributions. This preserves distributional contrast for reliable thresholding, maintains the zero boundary across scenes for stable multi-temporal comparison, and broadens the practical utility of spectral indices in analytical workflows where near-zero clustering would otherwise limit accuracy.
The Problem
Bipolar remote sensing indices share one property: zero is a physical class boundary (water/non-water, uplift/subsidence). Standard methods destroy it: Min-Max shifts zero into [0, 1]; Z-Score centers on the mean and produces an unbounded range. Both fail when values cluster near zero, making thresholding unreliable, multi-temporal comparisons artifact-driven, and in the worst case producing entirely empty, white, or black images due to values compressed around zero.
The Solution — Z-Split
Z-Split normalizes each side of zero independently, stretching the full negative range to [−1, 0] and the full positive range to [0, 1].
Formula
$$ Z\text{-}Split(x) = \begin{cases} x ;/; \max(X^+) & \text{if } x > 0 \ 0 & \text{if } x = 0 \ x ;/; |\min(X^-)| & \text{if } x < 0 \end{cases} $$
where $X^+$ is the set of positive values and $X^-$ is the set of negative values.
Output range: [−1, 1] with zero strictly preserved.
Why Z-Split?
| Property | Min-Max | Z-Score | Z-Split |
|---|---|---|---|
| Preserves zero as class boundary | ❌ | ❌ | ✅ |
| Expands narrow near-zero distributions | ❌ | ⚠️ | ✅ |
| Stable on skewed distributions | ❌ | ⚠️ | ✅ |
| Suitable for Otsu thresholding | ❌ | ⚠️ | ✅ |
| Multi-temporal direction preserved | ❌ | ❌ | ✅ |
| Output range | [0, 1] | Unbounded | [−1, 1] |
Installation
pip install zsplit
Quick Start
from zsplit import normalize
result = normalize(your_bipolar_index)
Validation
1. NDWI — Optical Remote Sensing
Tested on Sentinel-2 NDWI data. Z-Split successfully expanded near-zero clustered values while preserving the original image structure, producing contrast-enhanced output suitable for thresholding and multi-temporal comparison.
2. Multi-Temporal Change Analysis — NDVI, Riyadh 2018–2024
Validated on four Sentinel-2 NDVI scenes (March–April, 2018–2020–2022–2024) over Riyadh, Saudi Arabia (scale: 10 m, 5603 × 5129 pixels per scene) across 11,424 spatial patches.
A. Linear Trend (Slope per pixel, 2018–2024)
| Method | Mean Slope | Std | Correlation with Raw |
|---|---|---|---|
| Raw (no normalization) | 0.000894 | 0.0165 | — |
| Min-Max | 0.027454 | 0.2170 | r = 0.511 |
| Z-Split | −0.000120 | 0.0167 | r = 0.995 |
Z-Split preserves the original temporal signal with 99.5% fidelity. Min-Max introduces artificial trends with slope Std 13× larger than raw data.
B. Anomaly Detection (2024 vs. multi-year mean)
Min-Max anomaly maps show spatially inverted patterns relative to raw data. Z-Split anomaly maps are visually and statistically consistent with raw data.
C. Coefficient of Variation (CV across 2018–2024)
| Method | Mean CV |
|---|---|
| Raw | 0.150 |
| Z-Split | 0.173 |
| Min-Max | 0.832 |
Min-Max inflates temporal variability by 5.5×. Z-Split stays within 15% of the raw baseline.
D. Threshold Stability (Otsu across 11,424 patches)
| Method | Threshold Std |
|---|---|
| Min-Max | 0.0882 |
| Z-Split | 0.2220 |
| Z-Score | 1.2012 |
Note: For strongly unipolar NDVI in arid urban areas, Min-Max threshold stability is comparable to Z-Split. Z-Split's primary advantage is in bipolar indices with narrow near-zero distributions (NDWI, InSAR LOS), consistent with its design objective.
Application Scope
Most effective when:
- Values cluster near zero (NDWI in arid regions, InSAR LOS over stable terrain)
- Multi-temporal consistency is required
- Otsu or zero-based thresholding is applied
- Cross-scene or cross-sensor comparisons are performed
Files
| File | Description |
|---|---|
zsplit_normalization.ipynb |
Jupyter Notebook with visual demonstration |
zsplit_arcpy.py |
ArcGIS Pro implementation |
Z-Split_Normalization/Validation/ |
Multi-temporal NDVI change analysis |
Validation/01_Optical_ENDWI/ |
Optical NDWI validation |
Figures
Figure 1: Otsu threshold distribution across 11,424 spatial patches — Min-Max vs Z-Score vs Z-Split.
Figure 2: Multi-temporal NDVI change analysis (Linear Trend, Anomaly, CV) — Raw vs Min-Max vs Z-Split, Riyadh 2018–2024.
Author
Abdulrhman Almoadi
King Abdulaziz City for Science and Technology (KACST)
Citation
If you use Z-Split, please cite:
Almoadi, A.: Reducing False Alarms in Urban Flood Detection: An Enhanced NDWI (ENDWI) with Hybrid Max Fusion on Sentinel-2 Data, EGUsphere [preprint], https://doi.org/10.5194/egusphere-2026-672, 2026.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zsplit-1.0.1.tar.gz.
File metadata
- Download URL: zsplit-1.0.1.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a88eb49cb4b2b48a1c3d42148e7b09bcdd76c564b87ab9984adc2698e55952c2
|
|
| MD5 |
3efe726652cd8a61fc0a266ef1c531b7
|
|
| BLAKE2b-256 |
d0bdd023136d804e1cf3e74c7147fe8689d018f50899fc1efbd4cab2bb9c0e86
|
File details
Details for the file zsplit-1.0.1-py3-none-any.whl.
File metadata
- Download URL: zsplit-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbd936f2191f4369d987d48a9d4122e27b131c3fc02485dd1f33f33075b35dc3
|
|
| MD5 |
53b6474e40ecea91ed173d40c13bebde
|
|
| BLAKE2b-256 |
95dc556a45634fdfd484815d18809247d9447a59466e93f9746e155ab6a7b3f0
|