├── .DS_Store
├── .gitignore
├── README.md
├── autorift.cfg
├── autorift.ipynb
├── autorift
└── metadata.txt
├── docker_cmds.txt
├── download_sentinel2.ipynb
├── landslides
├── large_landslidesV2.cpg
├── large_landslidesV2.dbf
├── large_landslidesV2.kmz
├── large_landslidesV2.prj
├── large_landslidesV2.sbn
├── large_landslidesV2.sbx
├── large_landslidesV2.shp
├── large_landslidesV2.shp.xml
└── large_landslidesV2.shx
├── legacy
├── autorift.ipynb
├── check_scene_bounds.ipynb
├── correlation_ncc.ipynb
├── correlation_ncc_mintpy.ipynb
├── correlation_ncc_mintpy_pc.ipynb
├── correlation_snr.ipynb
├── correlation_yearly.ipynb
├── cosicorr.cfg
├── cosicorr.ipynb
├── edge_detection.ipynb
├── filtering.ipynb
├── long_baseline.ipynb
├── merge_results.ipynb
├── mintpy_offsets.ipynb
├── peg_comparison.csv
├── peg_comparison_v1.ipynb
├── planet_workflow.ipynb
├── prep_sentinel2-Copy1.ipynb
├── prep_sentinel2.ipynb
└── testautoRIFT.py
├── mintpy.ipynb
├── peg_data
├── .DS_Store
├── .ipynb_checkpoints
│ └── comparsion-checkpoint.csv
├── Rangitikei Landslide_peg displacement_sample.xlsx
├── Reformatted Peg Data.xlsx
├── Survey Peg Movement_Analysis_November2020.xlsx
├── cleaning.ipynb
├── comparsion.csv
├── comparsion_dd.csv
├── comparsion_local.csv
├── comparsion_median.csv
├── comparsion_vanilla.csv
├── legacy
│ ├── locations.csv
│ ├── pegProj.csv
│ ├── pegs.CPG
│ ├── pegs.csv
│ ├── pegs.dbf
│ ├── pegs.prj
│ ├── pegs.sbn
│ ├── pegs.sbx
│ ├── pegs.shp
│ ├── pegs.shp.xml
│ ├── pegs.shx
│ └── pegs_32760.csv
├── peg_comparison_v2.ipynb
├── pegs.CPG
├── pegs.csv
├── pegs.dbf
├── pegs.prj
├── pegs.shp
├── pegs.shx
├── prep_peg_data.ipynb
├── reformatted_peg_data.csv
└── sam_message.txt
├── testGeogridOptical.py
└── testautoRIFT.py
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/forrestfwilliams/pixeloffset_mintpy/01710e26cb79a16a8c385d70f2b80043aa8acde2/.DS_Store
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .ipynb_checkpoints
2 | */.ipynb_checkpoints/*
3 | *tif
4 | imagery
5 | imagery/*
6 | landslides
7 | landslides/*
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Using AutoRIFT and MintPy for Timeseries Pixel Offset Tracking
2 | This repository contains a workflow for landslide velocity estimation using a timeseries pixel offset tracking approach for Sentinel-2 data. In the Jupyter Notebooks in the top level of this repository, we:
3 |
4 | 1. Request and download and a stack of cropped Sentinel-2 images of the same area that are spaced roughly one year apart
5 | 2. Use the [AutoRIFT](https://github.com/nasa-jpl/autoRIFT) to perform cross-correlation pixel offset tracking of all possible image combinations
6 | 3. Use the timeseries inversion capabilities of MintPy, to estimate an annual velocity rate for each pixel in the East-West and North-South directions
7 |
8 | Each of these steps is contained within a separate notebook. Read on to learn more about each notebook.
9 |
10 | A note on environments: To save on disk space, the initial retrevial of Sentinel-2 data is done within the Microsoft Planetary Computer [Planetary Computer Hub](http://planetarycomputer.microsoft.com/) hosted notebook environment. While a Planetary Computer account is needed to access this environment, I believe this part of the workflow can be adapted to as any Sentinel-2 repository that has a STAC API interface. Contact me if this is something you would like work with me on!
11 | MintPy and AutoRIFT have incompatible environments, so steps 2 and 3 must also be run in a separate environments. In the future I plan to create dockerfiles for each environment, but until then the user will need to set up their own environments via conda or another package manager. Connect with me on LinkedIn or Twitter to follow this work!
12 |
13 | ## Author:
14 | Hi my name is Forrest Williams! I’m passionate about using remote sensing and geospatial data analysis to help solve the world’s environmental challenges. I am currently complete a PhD in Earth Sciences at Massy University in New Zealand, but plan to return home to the U.S. and enter private industry as a data scientist in early 2022.
15 |
16 | ## Step 1: Download Sentinel-2 Images
17 | **Notebook:** download\_sentinel2.ipynb
18 |
19 | **Environment:** [Planetary Computer Hub](http://planetarycomputer.microsoft.com/)
20 |
21 | This notebook handles the downloading of Sentinel-2 products that are clipped to the study. Note that you will need to sign up for an account you can use the Planetary Computer Hub environment.
22 |
23 | ## Step 2: Perform AutoRIFT pixel offset tracking
24 | **Notebook:** autorift.ipynb
25 |
26 | **Environment:** General Python geospatial analysis environment with the AutoRIFT package
27 |
28 | This step performs the actual AutoRIFT pixel offset tracking. The notebook provided uses the parameters that work well for my study area and Sentinel-2 imagery, but you can find out more about using AutoRIFT [here](https://github.com/nasa-jpl/autoRIFT).
29 |
30 | ## Step 3: Time-series processing
31 | **Notebook:** mintpy.ipynb
32 |
33 | **Environment:** MintPy environment
34 |
35 | This notebook performs the time-series SBAS processing using MintPy. If you are not familiar with MintPy I would suggest reading through MintPy’s documentation and examples [here](https://github.com/insarlab/MintPy-tutorial).
36 |
--------------------------------------------------------------------------------
/autorift.cfg:
--------------------------------------------------------------------------------
1 | # vim: set filetype=cfg:
2 | ##------------------------ smallbaselineApp.cfg ------------------------##
3 | ########## computing resource configuration
4 | mintpy.compute.maxMemory = 4 #[float > 0.0], auto for 4, max memory to allocate in GB
5 | ## parallel processing with dask
6 | ## currently apply to steps: invert_network, correct_topography
7 | ## cluster = none to turn off the parallel computing
8 | ## numWorker = all to use all locally available cores (for cluster = local only)
9 | ## config = none to rollback to the default name (same as the cluster type; for cluster != local)
10 | mintpy.compute.cluster = auto #[local / slurm / pbs / lsf / none], auto for none, cluster type
11 | mintpy.compute.numWorker = auto #[int > 1 / all], auto for 4 (local) or 40 (non-local), num of workers
12 | mintpy.compute.config = auto #[none / slurm / pbs / lsf ], auto for none (same as cluster), config name
13 |
14 |
15 | ########## 1. load_data
16 | ##---------add attributes manually
17 | ## MintPy requires attributes listed at: https://mintpy.readthedocs.io/en/latest/api/attributes/
18 | ## Missing attributes can be added below manually (uncomment #), e.g.
19 | # ORBIT_DIRECTION = ascending
20 | # PLATFORM = CSK
21 | # ...
22 | ## a. autoPath - automatic path pattern defined in mintpy.defaults.auto_path.AUTO_PATH_*
23 | ## b. load_data.py -H to check more details and example inputs.
24 | ## c. compression to save disk usage for ifgramStack.h5 file:
25 | ## no - save 0% disk usage, fast [default]
26 | ## lzf - save ~57% disk usage, relative slow
27 | ## gzip - save ~62% disk usage, very slow [not recommend]
28 | mintpy.load.processor = cosicorr #[isce, aria, hyp3, gmtsar, snap, gamma, roipac], auto for isce
29 | mintpy.load.autoPath = auto #[yes / no], auto for no, use pre-defined auto path
30 | mintpy.load.updateMode = no #[yes / no], auto for yes, skip re-loading if HDF5 files are complete
31 | mintpy.load.compression = auto #[gzip / lzf / no], auto for no.
32 | ##---------for ISCE only:
33 | mintpy.load.metaFile = ../corrected/metadata.txt #[path of common metadata file for the stack], i.e.: ./reference/IW1.xml, ./referenceShelve/data.dat
34 | mintpy.load.baselineDir = auto #[path of the baseline dir], i.e.: ./baselines
35 | ##---------interferogram datasets:
36 | mintpy.load.unwFile = auto #[path pattern of unwrapped interferogram files]
37 | mintpy.load.corFile = auto #[path pattern of spatial coherence files]
38 | mintpy.load.connCompFile = auto #[path pattern of connected components files], optional but recommended
39 | mintpy.load.intFile = auto #[path pattern of wrapped interferogram files], optional
40 | mintpy.load.ionoFile = auto #[path pattern of ionospheric delay files], optional
41 | mintpy.load.magFile = auto #[path pattern of interferogram magnitude files], optional
42 | ##---------offset datasets (optional):
43 | mintpy.load.azOffFile = ../corrected/*NSOffset.tif #[path pattern of azimuth offset file], optional
44 | mintpy.load.rgOffFile = ../corrected/*EWOffset.tif #[path pattern of range offset file], optional
45 | mintpy.load.offSnrFile = auto #[path pattern of offset signal-to-noise ratio file], optional
46 | ##---------geometry datasets:
47 | mintpy.load.demFile = auto #[path of DEM file]
48 | mintpy.load.lookupYFile = auto #[path of latitude /row /y coordinate file], not required for geocoded data
49 | mintpy.load.lookupXFile = auto #[path of longitude/column/x coordinate file], not required for geocoded data
50 | mintpy.load.incAngleFile = auto #[path of incidence angle file], optional but recommended
51 | mintpy.load.azAngleFile = auto #[path of azimuth angle file], optional
52 | mintpy.load.shadowMaskFile = auto #[path of shadow mask file], optional but recommended
53 | mintpy.load.waterMaskFile = auto #[path of water mask file], optional but recommended
54 | mintpy.load.bperpFile = auto #[path pattern of 2D perpendicular baseline file], optional
55 | ##---------multilook (optional):
56 | ## multilook while loading data with nearest interpolation, to reduce dataset size
57 | mintpy.load.ystep = auto #[int >= 1], auto for 1 - no multilooking
58 | mintpy.load.xstep = auto #[int >= 1], auto for 1 - no multilooking
59 | ##---------subset (optional):
60 | ## if both yx and lalo are specified, use lalo option unless a) no lookup file AND b) dataset is in radar coord
61 | mintpy.subset.yx = auto #[y0:y1,x0:x1 / no], auto for no
62 | mintpy.subset.lalo = auto #[S:N,W:E / no], auto for no
63 |
64 |
--------------------------------------------------------------------------------
/autorift.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "id": "f1c33241-7b37-42db-9969-d59ce706579e",
6 | "metadata": {},
7 | "source": [
8 | "## Setup"
9 | ]
10 | },
11 | {
12 | "cell_type": "code",
13 | "execution_count": 1,
14 | "id": "8faf504a-1a4c-480d-855d-8c6c5f968de2",
15 | "metadata": {},
16 | "outputs": [],
17 | "source": [
18 | "%matplotlib inline\n",
19 | "import matplotlib.pyplot as plt\n",
20 | "from osgeo import gdal\n",
21 | "import geopandas as gpd\n",
22 | "import numpy as np\n",
23 | "import rasterio as rio\n",
24 | "from rasterio import features\n",
25 | "from autoRIFT import autoRIFT\n",
26 | "from collections import namedtuple\n",
27 | "from pathlib import Path\n",
28 | "import itertools\n",
29 | "import scipy.io as sio\n",
30 | "import sys\n",
31 | "import shutil\n",
32 | "from datetime import datetime\n",
33 | "\n",
34 | "import warnings\n",
35 | "warnings.filterwarnings(\"ignore\")\n",
36 | "# from autoRIFT import autoriftcore\n",
37 | "# from geogrid import GeogridOptical"
38 | ]
39 | },
40 | {
41 | "cell_type": "code",
42 | "execution_count": 2,
43 | "id": "328198b9-717c-4ca4-8aef-9ea262efcd24",
44 | "metadata": {},
45 | "outputs": [
46 | {
47 | "data": {
48 | "text/plain": [
49 | "'/home/micromamba/scripts'"
50 | ]
51 | },
52 | "execution_count": 2,
53 | "metadata": {},
54 | "output_type": "execute_result"
55 | }
56 | ],
57 | "source": [
58 | "pwd"
59 | ]
60 | },
61 | {
62 | "cell_type": "code",
63 | "execution_count": null,
64 | "id": "79a40388-1737-400a-a27d-a715ba5d4c60",
65 | "metadata": {},
66 | "outputs": [],
67 | "source": [
68 | "autorift_cmd = str(Path('testautoRIFT.py').resolve())\n",
69 | "geogrid_cmd = str(Path('testGeogridOptical.py').resolve())"
70 | ]
71 | },
72 | {
73 | "cell_type": "code",
74 | "execution_count": 3,
75 | "id": "7a95590d-f82e-488b-b185-84133b315a93",
76 | "metadata": {},
77 | "outputs": [
78 | {
79 | "name": "stdout",
80 | "output_type": "stream",
81 | "text": [
82 | "/home/micromamba/data/spot\n"
83 | ]
84 | }
85 | ],
86 | "source": [
87 | "cd /home/micromamba/data/spot/landslide_54"
88 | ]
89 | },
90 | {
91 | "cell_type": "markdown",
92 | "id": "669cec4e-a8f4-4165-8912-2224989bfcee",
93 | "metadata": {},
94 | "source": [
95 | "## Functions"
96 | ]
97 | },
98 | {
99 | "cell_type": "code",
100 | "execution_count": null,
101 | "id": "af747b90-2d67-4a1a-8920-29102ed74364",
102 | "metadata": {
103 | "tags": []
104 | },
105 | "outputs": [],
106 | "source": [
107 | "def read_raster(path,bands=1,crs=False,bounds=False):\n",
108 | " # From rasterio docs with modifications\n",
109 | " with rio.open(path) as dst:\n",
110 | " array = dst.read(bands)\n",
111 | " profile = dst.profile\n",
112 | " crs_val = dst.crs\n",
113 | " bounds_val = dst.bounds\n",
114 | " # array = np.moveaxis(array,0,-1)\n",
115 | " \n",
116 | " result = [array, profile]\n",
117 | "\n",
118 | " if crs:\n",
119 | " result.append(crs_val)\n",
120 | " \n",
121 | " if bounds:\n",
122 | " result.append(bounds_val)\n",
123 | "\n",
124 | " return result\n",
125 | "\n",
126 | "\n",
127 | "def write_raster(array,profile,out_path,nodata,dtype,n_bands=1):\n",
128 | " # From rasterio docs:\n",
129 | " # Register GDAL format drivers and configuration options with a\n",
130 | " # context manager.\n",
131 | " with rio.Env():\n",
132 | " # And then change the band count to 1, set the\n",
133 | " # dtype to uint8, and specify LZW compression.\n",
134 | " profile.update(\n",
135 | " dtype=dtype,\n",
136 | " count=n_bands,\n",
137 | " nodata=nodata,\n",
138 | " compress='lzw')\n",
139 | "\n",
140 | " with rio.open(out_path, 'w', **profile) as dst:\n",
141 | " if n_bands == 1:\n",
142 | " dst.write(array.astype(dtype),1)\n",
143 | " else:\n",
144 | " dst.write(array.astype(dtype))\n",
145 | "\n",
146 | " return out_path\n",
147 | "\n",
148 | "def polygon_to_raster(gdf,template_path,value=1,crs=False):\n",
149 | " if isinstance(gdf,str):\n",
150 | " pol = gpd.read_file(gdf)\n",
151 | " else:\n",
152 | " pol = gdf\n",
153 | "\n",
154 | " with rio.open(template_path) as dst:\n",
155 | " profile = dst.profile\n",
156 | " template_crs = dst.crs\n",
157 | " template_transform = profile['transform']\n",
158 | " template_shape = dst.shape\n",
159 | "\n",
160 | " # if crs != pol.crs:\n",
161 | " # raise Exception('CRSs do not match!')\n",
162 | "\n",
163 | " geojsons = [x['geometry'] for x in pol.geometry.__geo_interface__['features']]\n",
164 | " if isinstance(value,str):\n",
165 | " shapes = [tuple(x) for x in zip(geojsons,pol[value])]\n",
166 | " else:\n",
167 | " shapes = [(x,value) for x in geojsons]\n",
168 | "\n",
169 | " array = features.rasterize(shapes, out_shape=template_shape, transform=template_transform)\n",
170 | " \n",
171 | " result = [array, profile]\n",
172 | " if crs:\n",
173 | " result.append(template_crs)\n",
174 | "\n",
175 | " return result"
176 | ]
177 | },
178 | {
179 | "cell_type": "markdown",
180 | "id": "6df9e79e-b654-403e-9e8a-69fb6baf1e64",
181 | "metadata": {
182 | "tags": []
183 | },
184 | "source": [
185 | "## AutoRIFT Inputs\n",
186 | "**I1** reference image (extracted image patches defined as \"source\")\n",
187 | "\n",
188 | "**I2** secondary image (extracted image patches defined as \"template\"; displacement = motion vector of I2 relative to I1 which should be acquired earlier in our convention)\n",
189 | "\n",
190 | "**xGrid** [units = integer image pixels] horizontal reference image pixel index at each grid point\n",
191 | "\n",
192 | "**yGrid** [units = integer image pixels] vertical reference image pixel index at each grid point\n",
193 | "(if xGrid and yGrid not provided, a regular grid spanning the entire image will be automatically set up, which is similar to the conventional ISCE module, \"ampcor\" or \"denseampcor\")\n",
194 | "\n",
195 | "**Dx0** [units = integer image pixels] horizontal \"downstream\" search location (that specifies the horizontal pixel displacement of the template's search center relative to the source's) at each grid point\n",
196 | "\n",
197 | "**Dy0** [units = integer image pixels] vertical \"downstream\" reach location (that specifies the vertical pixel displacement of the template's search center relative to the source's) at each grid point\n",
198 | "(if Dx0 and Dy0 not provided, an array with zero values will be automatically assigned and there will be no offsets of the search centers)\n",
199 | "\n",
200 | "**ChipSizeMinX** [units = integer image pixels] Minimum size (in horizontal direction) of the template (chip) to correlate (default = 32; could be scalar or array with same dimension as xGrid)\n",
201 | "\n",
202 | "**ChipSizeMaxX** [units = integer image pixels] Maximum size (in horizontal direction) of the template (chip) to correlate (default = 64; could be scalar or array with same dimension as xGrid)\n",
203 | "\n",
204 | "**ChipSize0X** [units = integer image pixels] Minimum acceptable size (in horizontal direction) of the template (chip) to correlate (default = 32)\n",
205 | "\n",
206 | "**GridSpacingX** [units = integer image pixels] Grid Spacing (in horizontal direction) (default = 32; note GridSpacingX can be smaller than ChipSize0X leading to dependent chips)\n",
207 | "\n",
208 | "**ScaleChipSizeY** [unitless; integer data type] Scaling factor to get the vertical chip size in reference to the horizontal size (default = 1)\n",
209 | "\n",
210 | "**SearchLimitX** [units = integer image pixels] Range or limit (in horizontal direction) to search for displacement in the source (default = 25; could be scalar or array with same dimension as xGrid; when provided in array, set its elements to 0 if no search is desired in certain areas)\n",
211 | "\n",
212 | "**SearchLimitY** [units = integer image pixels] Range or limit (in vertical direction) to search for displacement in the source (default = 25; could be scalar or array with same dimension as xGrid; when provided in array, set its elements to 0 if no search is desired in certain areas)\n",
213 | "\n",
214 | "**SkipSampleX** [units = integer image pixels] Number of samples to skip between search windows in horizontal direction if no grid specified by the user (default = 32)\n",
215 | "\n",
216 | "**SkipSampleY** [units = integer image pixels] Number of lines to skip between search windows in vertical direction if no grid specified by the user (default = 32)\n",
217 | "\n",
218 | "**minSearch** [units = integer image pixels] Minimum search range/limit (default = 6)"
219 | ]
220 | },
221 | {
222 | "cell_type": "markdown",
223 | "id": "26a776b8-6768-407e-a00e-9c05dad5db99",
224 | "metadata": {},
225 | "source": [
226 | "## Images Prep"
227 | ]
228 | },
229 | {
230 | "cell_type": "code",
231 | "execution_count": null,
232 | "id": "910b9b83-b504-40ca-84da-a3cca4916ebe",
233 | "metadata": {},
234 | "outputs": [],
235 | "source": [
236 | "# Image = namedtuple('Image','date file')\n",
237 | "\n",
238 | "types = {'sentinel2':{'files':'S2*tif','date_loc':slice(11,19)}}\n",
239 | "desired_epsg = 32760\n",
240 | "\n",
241 | "image_loc = Path('raw')\n",
242 | "meta = types['sentinel2']\n",
243 | "pattern = meta['files']\n",
244 | "date_loc = meta['date_loc']"
245 | ]
246 | },
247 | {
248 | "cell_type": "code",
249 | "execution_count": null,
250 | "id": "1d5cd1d8-42ba-440b-ba2f-25346cbf2bb6",
251 | "metadata": {},
252 | "outputs": [],
253 | "source": [
254 | "images = {x.name[date_loc]:x for x in image_loc.glob(pattern)}\n",
255 | "images"
256 | ]
257 | },
258 | {
259 | "cell_type": "markdown",
260 | "id": "e92b29a1-fb55-4744-845f-0631e3ff614a",
261 | "metadata": {},
262 | "source": [
263 | "## Run Autorift"
264 | ]
265 | },
266 | {
267 | "cell_type": "code",
268 | "execution_count": null,
269 | "id": "9f4ab030-ec71-4b10-9898-8bd73692bc3f",
270 | "metadata": {},
271 | "outputs": [],
272 | "source": [
273 | "pairs = []\n",
274 | "for dates in itertools.combinations(images,2):\n",
275 | " \n",
276 | " dates = [datetime.strptime(x,'%Y%m%d') for x in dates]\n",
277 | " dates.sort()\n",
278 | " dates = [datetime.strftime(x,'%Y%m%d') for x in dates]\n",
279 | " \n",
280 | " pairs.append((images[dates[0]],images[dates[1]]))\n",
281 | " print(dates)\n",
282 | "print(len(pairs))"
283 | ]
284 | },
285 | {
286 | "cell_type": "code",
287 | "execution_count": null,
288 | "id": "24e1b33e-2918-4d62-b94c-984a9b914839",
289 | "metadata": {},
290 | "outputs": [],
291 | "source": [
292 | "out_dir = Path('autorift')\n",
293 | "if out_dir.exists():\n",
294 | " shutil.rmtree(out_dir)\n",
295 | "\n",
296 | "out_dir.mkdir()"
297 | ]
298 | },
299 | {
300 | "cell_type": "code",
301 | "execution_count": null,
302 | "id": "a22faa52-61d2-4cb4-b47e-c25f323f5786",
303 | "metadata": {},
304 | "outputs": [],
305 | "source": [
306 | "ref, sec = [str(x) for x in pairs[0]]\n",
307 | "base_dem = '../dem.tif'\n",
308 | "dem = 'dem_window.tif'\n",
309 | "res = 80"
310 | ]
311 | },
312 | {
313 | "cell_type": "code",
314 | "execution_count": null,
315 | "id": "7d7e5472-4585-4efd-a761-289f1c22b67e",
316 | "metadata": {},
317 | "outputs": [],
318 | "source": [
319 | "!rm dem_window.tif"
320 | ]
321 | },
322 | {
323 | "cell_type": "code",
324 | "execution_count": null,
325 | "id": "c8ae73fe-013d-4031-810f-235adfb537a9",
326 | "metadata": {},
327 | "outputs": [],
328 | "source": [
329 | "_, _, crs, bbox = read_raster(ref,crs=True,bounds=True)\n",
330 | "bbox = ' '.join([str(x) for x in bbox])\n",
331 | "epsg = f'EPSG:{crs.to_epsg()}'"
332 | ]
333 | },
334 | {
335 | "cell_type": "code",
336 | "execution_count": null,
337 | "id": "b65548e2-7d78-4df3-b087-40a4811f4392",
338 | "metadata": {},
339 | "outputs": [],
340 | "source": [
341 | "!gdalwarp -t_srs {epsg} -te {bbox} -tr {res} {res} -te_srs {epsg} -r bilinear {base_dem} {dem}"
342 | ]
343 | },
344 | {
345 | "cell_type": "code",
346 | "execution_count": null,
347 | "id": "cf599f16-5884-4d1f-b47f-cd6dd1eeba08",
348 | "metadata": {},
349 | "outputs": [],
350 | "source": [
351 | "# arr, profile = read_raster(dem)\n",
352 | "\n",
353 | "# def create_param(val,path,profile):\n",
354 | "# # data = np.zeros((10,10,2))\n",
355 | "# data = np.zeros((profile['height']-1,profile['width']-1,2))\n",
356 | " \n",
357 | "# data[:,:,0] = val\n",
358 | "# data[:,:,1] = val\n",
359 | "# data = np.moveaxis(data, [0, 1, 2], [2, 1, 0])\n",
360 | " \n",
361 | "# profile['count'], profile['width'], profile['height'] = data.shape \n",
362 | "# write_raster(data,profile,path,nodata=0,dtype=rio.int8,n_bands=2)\n",
363 | "\n",
364 | "# return path\n",
365 | "\n",
366 | "# csmin = create_param(32,'csmin.tif',profile)\n",
367 | "# csmax = create_param(64,'csmax.tif',profile)\n",
368 | "# sr = create_param(5,'sr.tif',profile)"
369 | ]
370 | },
371 | {
372 | "cell_type": "code",
373 | "execution_count": null,
374 | "id": "6c50f321-5be5-4e69-8307-4f1463804c1d",
375 | "metadata": {},
376 | "outputs": [],
377 | "source": [
378 | "! {geogrid_cmd} -m {ref} -s {sec} -d {dem}"
379 | ]
380 | },
381 | {
382 | "cell_type": "markdown",
383 | "id": "03c871c5-1cfc-4f1e-a73a-e1ab62a26a8c",
384 | "metadata": {},
385 | "source": [
386 | "## Check"
387 | ]
388 | },
389 | {
390 | "cell_type": "code",
391 | "execution_count": null,
392 | "id": "47fe9145-33d4-44ab-82c6-9b6226eeb554",
393 | "metadata": {},
394 | "outputs": [],
395 | "source": [
396 | "%%capture --no-stderr\n",
397 | "\n",
398 | "for i, (ref, sec) in enumerate(pairs):\n",
399 | " ! {autorift_cmd} -m {str(ref)} -s {str(sec)} -g window_location.tif -fo 1\n",
400 | "\n",
401 | " offset, offset_profile = read_raster('offset.tif',bands=[1,2,3,4])\n",
402 | "\n",
403 | " base_name = f'autorift_{ref.name[date_loc]}T000000_{sec.name[date_loc]}T000000'\n",
404 | " dx_name = out_dir / (base_name + '_EWOffset.tif')\n",
405 | " dy_name = out_dir / (base_name + '_NSOffset.tif')\n",
406 | " \n",
407 | " write_raster(offset[0,:,:]*10,offset_profile,dx_name,nodata=-32768,dtype=rio.float32)\n",
408 | " write_raster(offset[1,:,:]*10,offset_profile,dy_name,nodata=-32768,dtype=rio.float32)"
409 | ]
410 | },
411 | {
412 | "cell_type": "code",
413 | "execution_count": null,
414 | "id": "bdd686c2-3f3f-476f-9904-93b4bf976b02",
415 | "metadata": {},
416 | "outputs": [],
417 | "source": [
418 | "!rm offset.mat offset.tif window_location.tif"
419 | ]
420 | },
421 | {
422 | "cell_type": "markdown",
423 | "id": "adc8fa20-042f-49ef-897c-5ba918379f6e",
424 | "metadata": {},
425 | "source": [
426 | "## Remove Median"
427 | ]
428 | },
429 | {
430 | "cell_type": "code",
431 | "execution_count": null,
432 | "id": "60511486-782c-4293-923d-71f8a068a821",
433 | "metadata": {},
434 | "outputs": [],
435 | "source": [
436 | "corrected_dir = Path('corrected')"
437 | ]
438 | },
439 | {
440 | "cell_type": "code",
441 | "execution_count": null,
442 | "id": "5da6139a-060c-4969-a7c7-76f156fec711",
443 | "metadata": {},
444 | "outputs": [],
445 | "source": [
446 | "if corrected_dir.exists():\n",
447 | " shutil.rmtree(corrected_dir)\n",
448 | "\n",
449 | "corrected_dir.mkdir()\n",
450 | "\n",
451 | "ls = gpd.read_file('/home/micromamba/data/landslides/landslide_sediment.shp').to_crs(epsg)"
452 | ]
453 | },
454 | {
455 | "cell_type": "code",
456 | "execution_count": null,
457 | "id": "7487ef6e-63a5-45ec-8e3f-549a4f6533b0",
458 | "metadata": {},
459 | "outputs": [],
460 | "source": [
461 | "autorift_results = list(out_dir.glob('*Offset.tif'))\n",
462 | "mask, _ = polygon_to_raster(ls.buffer(500),autorift_results[0],value=1,crs=False)"
463 | ]
464 | },
465 | {
466 | "cell_type": "code",
467 | "execution_count": null,
468 | "id": "0d3f40f7-aecc-43e1-9b8d-74e805779d3b",
469 | "metadata": {},
470 | "outputs": [],
471 | "source": [
472 | "plt.imshow(mask)"
473 | ]
474 | },
475 | {
476 | "cell_type": "code",
477 | "execution_count": null,
478 | "id": "e9be478f-437b-4a44-90c6-ac9977aec517",
479 | "metadata": {},
480 | "outputs": [],
481 | "source": [
482 | "all_vals = []\n",
483 | "\n",
484 | "for ras in autorift_results:\n",
485 | " data, profile = read_raster(ras)\n",
486 | " \n",
487 | " tmp = data.copy()\n",
488 | " tmp[mask == 1] = np.nan\n",
489 | " median = np.nanmedian(tmp)\n",
490 | " data = data - median\n",
491 | " write_raster(data,profile,corrected_dir / ras.name,nodata=-32768,dtype=rio.float32)\n",
492 | " \n",
493 | " all_vals.append(median)\n",
494 | "\n",
495 | "print(f'Offset image median min: {np.min(all_vals):.2f} mean: {np.mean(all_vals):.2f} max: {np.max(all_vals):.2f}')"
496 | ]
497 | },
498 | {
499 | "cell_type": "markdown",
500 | "id": "36e1f410-d674-472b-8f4d-c3ad4c31b54e",
501 | "metadata": {},
502 | "source": [
503 | "## Create MintPy metadata file"
504 | ]
505 | },
506 | {
507 | "cell_type": "code",
508 | "execution_count": null,
509 | "id": "1b1fabf1-aea4-4772-beaf-c8195b839f42",
510 | "metadata": {},
511 | "outputs": [],
512 | "source": [
513 | "files = [x.name for x in corrected_dir.glob('*Offset.tif')]\n",
514 | "files.sort()\n",
515 | "\n",
516 | "lines = [f'{f} {f[9:17]} {f[25:33]}\\n' for f in files]\n",
517 | "with open(corrected_dir / 'metadata.txt', 'w') as f:\n",
518 | " f.writelines(lines)"
519 | ]
520 | },
521 | {
522 | "cell_type": "markdown",
523 | "id": "6d8aab46-28bf-43cf-b8e4-f58ba9e4ffa2",
524 | "metadata": {},
525 | "source": [
526 | "## Notify"
527 | ]
528 | },
529 | {
530 | "cell_type": "code",
531 | "execution_count": null,
532 | "id": "fdb807a7-0368-418b-b7b8-6644b6b9a750",
533 | "metadata": {},
534 | "outputs": [],
535 | "source": [
536 | "from IPython.lib.display import Audio\n",
537 | "import numpy as np\n",
538 | "\n",
539 | "framerate = 4410\n",
540 | "play_time_seconds = 2\n",
541 | "\n",
542 | "t = np.linspace(0, play_time_seconds, framerate*play_time_seconds)\n",
543 | "audio_data = np.sin(2*np.pi*300*t) + np.sin(2*np.pi*240*t)\n",
544 | "Audio(audio_data, rate=framerate, autoplay=True)"
545 | ]
546 | },
547 | {
548 | "cell_type": "code",
549 | "execution_count": null,
550 | "id": "a7a752da-c6fd-458d-9efa-47f50399bfc9",
551 | "metadata": {},
552 | "outputs": [],
553 | "source": []
554 | }
555 | ],
556 | "metadata": {
557 | "kernelspec": {
558 | "display_name": "Python 3 (ipykernel)",
559 | "language": "python",
560 | "name": "python3"
561 | },
562 | "language_info": {
563 | "codemirror_mode": {
564 | "name": "ipython",
565 | "version": 3
566 | },
567 | "file_extension": ".py",
568 | "mimetype": "text/x-python",
569 | "name": "python",
570 | "nbconvert_exporter": "python",
571 | "pygments_lexer": "ipython3",
572 | "version": "3.8.12"
573 | }
574 | },
575 | "nbformat": 4,
576 | "nbformat_minor": 5
577 | }
578 |
--------------------------------------------------------------------------------
/autorift/metadata.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/forrestfwilliams/pixeloffset_mintpy/01710e26cb79a16a8c385d70f2b80043aa8acde2/autorift/metadata.txt
--------------------------------------------------------------------------------
/docker_cmds.txt:
--------------------------------------------------------------------------------
1 | docker run --rm -p 2001:8888 -v /mnt/i/pixel:/home/micromamba/pixel forrestwilliams/mintpy:1.3.1
2 | docker run --rm -p 2001:8888 -v /mnt/i/pixel:/home/micromamba/pixel forrestwilliams/autorift:latest
3 |
4 | docker run --rm -p 2001:8888 -v /Users/forrest/documents/work/data/mnw_results:/home/micromamba/data -v /Users/forrest/documents/work/repositories/pixeloffset_mintpy:/home/micromamba/scripts forrestwilliams/autorift:latest
5 |
6 | docker run --rm -p 2001:8888 -v /Users/forrest/documents/work/data/mnw_results:/home/micromamba/data -v /Users/forrest/documents/work/repositories/pixeloffset_mintpy:/home/micromamba/scripts forrestwilliams/mintpy_jupyter:1.3.1
7 |
8 |
9 |
10 | docker run --rm -p 2001:8888 -v /Users/forrest/Documents/work/data/paper3:/home/micromamba/data -v /Users/forrest/Documents/work/repositories/pixeloffset_mintpy:/home/micromamba/scripts forrestwilliams/autorift:latest
11 |
12 |
13 |
14 | docker run --rm -p 2001:8888 -v /Users/forrest/Documents/work/data/paper3:/home/micromamba/data -v /Users/forrest/Documents/work/repositories/pixeloffset_mintpy:/home/micromamba/scripts forrestwilliams/mintpy_jupyter:1.3.1
15 |
16 |
17 | docker run --rm -p 2001:8888 -v /Users/forrest/Documents/work/data/paper3/spot:/home/micromamba/data -v /Users/forrest/Documents/work/repositories/pixeloffset_mintpy:/home/micromamba/scripts forrestwilliams/autorift:latest
--------------------------------------------------------------------------------
/download_sentinel2.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# Sentinel 2 Cloudless Mosaic\n",
8 | "\n",
9 | "This notebook selects and crops a *cloudless* yearly time series of [Sentinel-2 Level-2A](https://planetarycomputer.microsoft.com/dataset/sentinel-2-l2a) images and is modified from the example notebook provided by Microsoft. This notebook performs the following steps:\n",
10 | "\n",
11 | "* Find a time series of images within a bounding box\n",
12 | "* Remove images that contain clouds\n",
13 | "* Isolate the near-infrared (NIR) band (band 8 for Sentinel-2)\n",
14 | "* Select a set of annual images that occur on approximately the same day of the year\n",
15 | "* Save the results to GeoTiffs"
16 | ]
17 | },
18 | {
19 | "cell_type": "markdown",
20 | "metadata": {},
21 | "source": [
22 | "## Setup"
23 | ]
24 | },
25 | {
26 | "cell_type": "code",
27 | "execution_count": null,
28 | "metadata": {},
29 | "outputs": [],
30 | "source": [
31 | "%matplotlib inline\n",
32 | "import matplotlib.pyplot as plt\n",
33 | "\n",
34 | "import numpy as np\n",
35 | "import xarray as xr\n",
36 | "import pandas as pd\n",
37 | "\n",
38 | "import rasterio\n",
39 | "import rasterio.features\n",
40 | "import rioxarray\n",
41 | "import stackstac\n",
42 | "import pystac_client\n",
43 | "import planetary_computer\n",
44 | "\n",
45 | "import pyproj\n",
46 | "from shapely.ops import transform\n",
47 | "from shapely.geometry import Polygon\n",
48 | "\n",
49 | "import xrspatial.multispectral as ms\n",
50 | "\n",
51 | "import dask\n",
52 | "from dask_gateway import GatewayCluster\n",
53 | "from dask import visualize\n",
54 | "\n",
55 | "import itertools\n",
56 | "from datetime import datetime\n",
57 | "from tqdm.notebook import tqdm\n",
58 | "\n",
59 | "import geopandas as gpd\n",
60 | "from pathlib import Path\n",
61 | "from datetime import datetime\n",
62 | "from shapely.geometry import shape,box\n",
63 | "from skimage.morphology import dilation"
64 | ]
65 | },
66 | {
67 | "cell_type": "markdown",
68 | "metadata": {},
69 | "source": [
70 | "## Helpful functions"
71 | ]
72 | },
73 | {
74 | "cell_type": "code",
75 | "execution_count": null,
76 | "metadata": {
77 | "jupyter": {
78 | "source_hidden": true
79 | },
80 | "tags": []
81 | },
82 | "outputs": [],
83 | "source": [
84 | "def polygon_to_raster(gdf,template_path,value=1,crs=False):\n",
85 | " if isinstance(gdf,str):\n",
86 | " pol = gpd.read_file(gdf)\n",
87 | " else:\n",
88 | " pol = gdf\n",
89 | "\n",
90 | " with rasterio.open(template_path) as dst:\n",
91 | " profile = dst.profile\n",
92 | " template_crs = dst.crs\n",
93 | " template_transform = profile['transform']\n",
94 | " template_shape = dst.shape\n",
95 | "\n",
96 | " # if crs != pol.crs:\n",
97 | " # raise Exception('CRSs do not match!')\n",
98 | "\n",
99 | " geojsons = [x['geometry'] for x in pol.geometry.__geo_interface__['features']]\n",
100 | " if isinstance(value,str):\n",
101 | " shapes = [tuple(x) for x in zip(geojsons,pol[value])]\n",
102 | " else:\n",
103 | " shapes = [(x,value) for x in geojsons]\n",
104 | "\n",
105 | " array = rasterio.features.rasterize(shapes, out_shape=template_shape, transform=template_transform)\n",
106 | " \n",
107 | " result = [array, profile]\n",
108 | " if crs:\n",
109 | " result.append(template_crs)\n",
110 | "\n",
111 | " return result\n",
112 | "\n",
113 | "\n",
114 | "def write_raster(array,profile,out_path,nodata,dtype):\n",
115 | " # From rasterio docs:\n",
116 | " # Register GDAL format drivers and configuration options with a\n",
117 | " # context manager.\n",
118 | " with rasterio.Env():\n",
119 | " # And then change the band count to 1, set the\n",
120 | " # dtype to uint8, and specify LZW compression.\n",
121 | " profile.update(\n",
122 | " dtype=dtype,\n",
123 | " count=1,\n",
124 | " nodata=nodata,\n",
125 | " compress='lzw')\n",
126 | "\n",
127 | " with rasterio.open(out_path, 'w', **profile) as dst:\n",
128 | " dst.write(array.astype(dtype), 1)\n",
129 | "\n",
130 | " return out_path"
131 | ]
132 | },
133 | {
134 | "cell_type": "markdown",
135 | "metadata": {},
136 | "source": [
137 | "## Create a Dask cluster\n",
138 | "\n",
139 | "We're going to process a large amount of data. To cut down on the execution time, we'll use a Dask cluster to do the computation in parallel, adaptively scaling to add and remove workers as needed. See [Scale With Dask](../quickstarts/scale-with-dask.ipynb) for more on using Dask."
140 | ]
141 | },
142 | {
143 | "cell_type": "code",
144 | "execution_count": null,
145 | "metadata": {},
146 | "outputs": [],
147 | "source": [
148 | "# Set up the cluster\n",
149 | "cluster = GatewayCluster() # Creates the Dask Scheduler. Might take a minute.\n",
150 | "client = cluster.get_client()\n",
151 | "cluster.adapt(minimum=4, maximum=32)"
152 | ]
153 | },
154 | {
155 | "cell_type": "code",
156 | "execution_count": null,
157 | "metadata": {},
158 | "outputs": [],
159 | "source": [
160 | "print(cluster.dashboard_link)"
161 | ]
162 | },
163 | {
164 | "cell_type": "markdown",
165 | "metadata": {},
166 | "source": [
167 | "## Discover data\n",
168 | "\n",
169 | "In this step we define our bounding box by creating a Shapely Polygon object. The Polygon object is created from a set of coordinate pairs in **Latitude and Longitude** (epsg 3857). A simple way of getting the coordinate pairs is by creating a bounding box in Google Earth, saving it to a kml, then opening it as a text file and copying the coordinates.\n",
170 | "\n",
171 | "At this point, you'll have to decide if you want to process multiple years at once, or if you want to process the years separately. This decision comes down to how much compute power you have access to. For the Dask cluster parameters specified, `cluster.adapt(minimum=4, maximum=24)`, the maximum amount of images used should be less than 200. You can alter the number of images used by changing the values of `date_range`, `max_cloud`, and `pol`."
172 | ]
173 | },
174 | {
175 | "cell_type": "code",
176 | "execution_count": null,
177 | "metadata": {},
178 | "outputs": [],
179 | "source": [
180 | "#proroa: R129, T60GUA & T60HUB\n",
181 | "#andrew: R129, T60GVA\n",
182 | "#bird: R129, T60HUB\n",
183 | "\n",
184 | "# setting options\n",
185 | "date_range = '2016-01-01/2022-01-01'\n",
186 | "local_zone = 'EPSG:32760'\n",
187 | "buffer_width = 2000\n",
188 | "max_cloud_image = 33\n",
189 | "max_cloud_bbox = 0.5\n",
190 | "landslide = 55\n",
191 | "\n",
192 | "# get landslide\n",
193 | "ls_all = gpd.read_file('landslides/landslide_sediment.shp').to_crs('EPSG:4326')\n",
194 | "ls = ls_all.loc[(ls_all['id'] == landslide) & (ls_all['type'] == 'active')]\n",
195 | "\n",
196 | "# get bounding box (minx, miny, maxx, maxy)\n",
197 | "bbox = tuple(ls.total_bounds)\n",
198 | "\n",
199 | "aoi = gpd.GeoSeries([box(*bbox)],crs='EPSG:4326').to_crs(local_zone)\n",
200 | "aoi_buffer = aoi.buffer(buffer_width)"
201 | ]
202 | },
203 | {
204 | "cell_type": "code",
205 | "execution_count": null,
206 | "metadata": {},
207 | "outputs": [],
208 | "source": [
209 | "ls_all.loc[ls_all['type'] == 'active'].shape[0]"
210 | ]
211 | },
212 | {
213 | "cell_type": "code",
214 | "execution_count": null,
215 | "metadata": {},
216 | "outputs": [],
217 | "source": [
218 | "ls"
219 | ]
220 | },
221 | {
222 | "cell_type": "markdown",
223 | "metadata": {},
224 | "source": [
225 | "Using `pystac_client` we can search the Planetary Computer's STAC endpoint for items matching our query parameters."
226 | ]
227 | },
228 | {
229 | "cell_type": "code",
230 | "execution_count": null,
231 | "metadata": {},
232 | "outputs": [],
233 | "source": [
234 | "stac = pystac_client.Client.open(\"https://planetarycomputer.microsoft.com/api/stac/v1\")\n",
235 | "\n",
236 | "search = stac.search(\n",
237 | " bbox=bbox,\n",
238 | " datetime=date_range,\n",
239 | " collections=[\"sentinel-2-l2a\"],\n",
240 | " limit=500, # fetch items in batches of 500\n",
241 | " query={\"eo:cloud_cover\": {\"gte\":0,\"lte\": max_cloud_image}},\n",
242 | ")\n",
243 | "\n",
244 | "# Get items with the correct relative orbit\n",
245 | "items = list(search.get_items())"
246 | ]
247 | },
248 | {
249 | "cell_type": "code",
250 | "execution_count": null,
251 | "metadata": {},
252 | "outputs": [],
253 | "source": [
254 | "df = pd.DataFrame()\n",
255 | "df['orbit'] = [x.id.split('_')[3] for x in items]\n",
256 | "df['frame'] = [x.id.split('_')[4] for x in items]\n",
257 | "df['year'] = [x.id.split('_')[2][0:4] for x in items]\n",
258 | "geometries = [shape(x.geometry).wkt for x in items]\n",
259 | "\n",
260 | "gdf = gpd.GeoDataFrame(df, geometry=gpd.GeoSeries.from_wkt(geometries,crs='EPSG:4326'))\n",
261 | "gdf['geometry'] = gdf.geometry.to_crs(local_zone)\n",
262 | "gdf['overlap'] = gdf.geometry.intersection(aoi_buffer[0]).area / aoi_buffer[0].area\n",
263 | "gdf = gdf[gdf['overlap'] >= 0.99]\n",
264 | "counts = gdf.loc[:,['orbit','frame','overlap']].groupby(['orbit','frame']).count().reset_index()\n",
265 | "orbit, frame, count = counts.loc[counts['overlap'] == counts['overlap'].max()].values[0]\n",
266 | "\n",
267 | "image_footprint = gdf[(gdf['orbit'] == orbit) & (gdf['frame'] == frame)].iloc[:1]\n",
268 | "\n",
269 | "print(f'Selected orbit {orbit} and frame {frame} with {count} images')"
270 | ]
271 | },
272 | {
273 | "cell_type": "code",
274 | "execution_count": null,
275 | "metadata": {
276 | "tags": []
277 | },
278 | "outputs": [],
279 | "source": [
280 | "m = ls.explore(style_kwds={'color':'black'})\n",
281 | "m = aoi.explore(m=m,style_kwds={'color':'green'})\n",
282 | "m = aoi_buffer.explore(m=m,style_kwds={'color':'red'})\n",
283 | "m = image_footprint.explore(m=m,style_kwds={'color':'blue'})\n",
284 | "m"
285 | ]
286 | },
287 | {
288 | "cell_type": "markdown",
289 | "metadata": {},
290 | "source": [
291 | "Now we restrict the results to the same orbit"
292 | ]
293 | },
294 | {
295 | "cell_type": "code",
296 | "execution_count": null,
297 | "metadata": {},
298 | "outputs": [],
299 | "source": [
300 | "# grab ids\n",
301 | "ids = np.array([x.id.split('_') for x in items])\n",
302 | "\n",
303 | "# get correct orbit\n",
304 | "ids = ids[ids[:,3] == orbit]\n",
305 | "\n",
306 | "# get correct frame\n",
307 | "ids = ids[ids[:,4] == frame]\n",
308 | "\n",
309 | "# grab valid ids\n",
310 | "valid_ids = ['_'.join(x) for x in ids]\n",
311 | "\n",
312 | "#subset items\n",
313 | "items = [x for x in items if any([y == x.id for y in valid_ids])]\n",
314 | "\n",
315 | "print(f'Number of images before cloud masking is {len(items)}')"
316 | ]
317 | },
318 | {
319 | "cell_type": "markdown",
320 | "metadata": {},
321 | "source": [
322 | "Depending on the location, this should return about 50-100 images for our study area over time, and cloudiness. Those items will still have *some* clouds over portions of the scenes, though. To create our cloudless mosaic, we'll load the data into an [xarray](https://xarray.pydata.org/en/stable/) DataArray using [stackstac](https://stackstac.readthedocs.io/) and then reduce the time-series of images down to a single image."
323 | ]
324 | },
325 | {
326 | "cell_type": "code",
327 | "execution_count": null,
328 | "metadata": {},
329 | "outputs": [],
330 | "source": [
331 | "signed_items = []\n",
332 | "for item in items:\n",
333 | " item.clear_links()\n",
334 | " signed_items.append(planetary_computer.sign(item).to_dict())"
335 | ]
336 | },
337 | {
338 | "cell_type": "markdown",
339 | "metadata": {},
340 | "source": [
341 | "## Load Data"
342 | ]
343 | },
344 | {
345 | "cell_type": "markdown",
346 | "metadata": {},
347 | "source": [
348 | "In this step we load the data and perform some initial cleaing that includes:\n",
349 | "* subsetting to our exact bounding box\n",
350 | "* removing pixels that correspond clouds and clouds shadows\n",
351 | "\n",
352 | "To perform our cloud masking, we use Sentinel-2's Scene Classification Layer ([SCL](https://sentinels.copernicus.eu/web/sentinel/technical-guides/sentinel-2-msi/level-2a/algorithm)) and mask out values 3, 8, 9, and 10."
353 | ]
354 | },
355 | {
356 | "cell_type": "code",
357 | "execution_count": null,
358 | "metadata": {},
359 | "outputs": [],
360 | "source": [
361 | "data = (\n",
362 | " stackstac.stack(\n",
363 | " signed_items,\n",
364 | " assets=[\"B08\",\"SCL\"],\n",
365 | " chunksize=4096*2,\n",
366 | " resolution=10\n",
367 | " )\n",
368 | " .where(lambda x: x > 0, other=np.nan) # sentinel-2 uses 0 as nodata\n",
369 | ")\n",
370 | "\n",
371 | "# Get bounding box in projection of data\n",
372 | "minx, miny, maxx, maxy = tuple(aoi_buffer.to_crs(data.crs).total_bounds)\n",
373 | "\n",
374 | "# Subset data and mask clouds\n",
375 | "data = data.sel(x=slice(minx, maxx), y=slice(maxy,miny))"
376 | ]
377 | },
378 | {
379 | "cell_type": "markdown",
380 | "metadata": {},
381 | "source": [
382 | "## Cloud filtering"
383 | ]
384 | },
385 | {
386 | "cell_type": "code",
387 | "execution_count": null,
388 | "metadata": {},
389 | "outputs": [],
390 | "source": [
391 | "first = data.groupby('time').first(skipna=False)\n",
392 | "valid = xr.where(first.sel(band='SCL',drop=True).isin([3,8,9]),x=0,y=1)"
393 | ]
394 | },
395 | {
396 | "cell_type": "code",
397 | "execution_count": null,
398 | "metadata": {},
399 | "outputs": [],
400 | "source": [
401 | "pct_valid = valid.sum(dim=['x','y']).compute().to_numpy() / (data.shape[2] * data.shape[3])\n",
402 | "pct_valid = pct_valid.squeeze()\n",
403 | "dates = valid.time.to_numpy()"
404 | ]
405 | },
406 | {
407 | "cell_type": "code",
408 | "execution_count": null,
409 | "metadata": {},
410 | "outputs": [],
411 | "source": [
412 | "clouds = pd.DataFrame({'date':dates,'pct_valid':pct_valid[:]})"
413 | ]
414 | },
415 | {
416 | "cell_type": "code",
417 | "execution_count": null,
418 | "metadata": {},
419 | "outputs": [],
420 | "source": [
421 | "# max_cloud_bbox = 0.3"
422 | ]
423 | },
424 | {
425 | "cell_type": "code",
426 | "execution_count": null,
427 | "metadata": {},
428 | "outputs": [],
429 | "source": [
430 | "best = clouds.loc[clouds.pct_valid > (100-max_cloud_bbox)/100].copy()"
431 | ]
432 | },
433 | {
434 | "cell_type": "code",
435 | "execution_count": null,
436 | "metadata": {},
437 | "outputs": [],
438 | "source": [
439 | "best['year'] = best.date.dt.year\n",
440 | "counts = best.groupby('year').count().reset_index()"
441 | ]
442 | },
443 | {
444 | "cell_type": "code",
445 | "execution_count": null,
446 | "metadata": {},
447 | "outputs": [],
448 | "source": [
449 | "if set((2016, 2017, 2018, 2019, 2020, 2021)) != set(best.year.unique()):\n",
450 | " raise Exception('Not all years included')"
451 | ]
452 | },
453 | {
454 | "cell_type": "code",
455 | "execution_count": null,
456 | "metadata": {},
457 | "outputs": [],
458 | "source": [
459 | "for i,row in counts.iterrows():\n",
460 | " print(f'Year {row[\"year\"]} contains {row[\"date\"]} images')"
461 | ]
462 | },
463 | {
464 | "cell_type": "code",
465 | "execution_count": null,
466 | "metadata": {},
467 | "outputs": [],
468 | "source": [
469 | "best_dates = data.sel(band=[\"B08\"],time=list(best.date)).squeeze()"
470 | ]
471 | },
472 | {
473 | "cell_type": "markdown",
474 | "metadata": {
475 | "tags": []
476 | },
477 | "source": [
478 | "## Closest Dates"
479 | ]
480 | },
481 | {
482 | "cell_type": "code",
483 | "execution_count": null,
484 | "metadata": {},
485 | "outputs": [],
486 | "source": [
487 | "date_df = pd.DataFrame({'date':best.date})\n",
488 | "date_df['year'] = date_df.date.dt.year\n",
489 | "date_df['doy'] = date_df.date.dt.dayofyear\n",
490 | "date_df['month'] = date_df.date.dt.month"
491 | ]
492 | },
493 | {
494 | "cell_type": "code",
495 | "execution_count": null,
496 | "metadata": {},
497 | "outputs": [],
498 | "source": [
499 | "good_months = [9,10,11,12,1,2]\n",
500 | "summer = date_df.loc[date_df.month.isin(good_months)].copy()\n",
501 | "doys = [list(zip(x.date,x.doy)) for _,x in summer.groupby('year')]"
502 | ]
503 | },
504 | {
505 | "cell_type": "code",
506 | "execution_count": null,
507 | "metadata": {},
508 | "outputs": [],
509 | "source": [
510 | "min_distance = np.inf\n",
511 | "\n",
512 | "for x in tqdm(list(itertools.product(*doys))):\n",
513 | " distance = 0\n",
514 | " for d1,d2 in itertools.combinations(x,2):\n",
515 | " a = d1[1]\n",
516 | " b = d2[1]\n",
517 | " distance += min(abs(a-b),abs(a+365-b),abs(b-a),abs(b+365-a))\n",
518 | "\n",
519 | " if np.mean(distance) < min_distance:\n",
520 | " min_distance = np.mean(distance)\n",
521 | " date_list = [z[0] for z in x]"
522 | ]
523 | },
524 | {
525 | "cell_type": "code",
526 | "execution_count": null,
527 | "metadata": {},
528 | "outputs": [],
529 | "source": [
530 | "closest_df = date_df.loc[date_df.date.isin(date_list)]\n",
531 | "plt.scatter(date_df.doy,date_df.year)\n",
532 | "plt.plot(closest_df.doy,closest_df.year,color='red')\n",
533 | "print(min_distance,date_list)"
534 | ]
535 | },
536 | {
537 | "cell_type": "markdown",
538 | "metadata": {},
539 | "source": [
540 | "## Check Results"
541 | ]
542 | },
543 | {
544 | "cell_type": "code",
545 | "execution_count": null,
546 | "metadata": {},
547 | "outputs": [],
548 | "source": [
549 | "img_dict = {}\n",
550 | "\n",
551 | "for t in closest_df.date:\n",
552 | " image = best_dates.sel(time=t)\n",
553 | " granule_id = str(image.id.values)\n",
554 | " img_dict[granule_id] = image"
555 | ]
556 | },
557 | {
558 | "cell_type": "code",
559 | "execution_count": null,
560 | "metadata": {},
561 | "outputs": [],
562 | "source": [
563 | "f, [[ax1,ax2],[ax3,ax4],[ax5,ax6]] = plt.subplots(3,2,figsize=(15,25))\n",
564 | "axes = [ax1,ax2,ax3,ax4,ax5,ax6]\n",
565 | "for ax, name in zip(axes,img_dict):\n",
566 | " ax.imshow(img_dict[name])\n",
567 | " ax.set_title(name)\n",
568 | "\n",
569 | "plt.tight_layout()"
570 | ]
571 | },
572 | {
573 | "cell_type": "markdown",
574 | "metadata": {},
575 | "source": [
576 | "## Download"
577 | ]
578 | },
579 | {
580 | "cell_type": "code",
581 | "execution_count": null,
582 | "metadata": {},
583 | "outputs": [],
584 | "source": [
585 | "for name in img_dict:\n",
586 | " print(f'Writing {name}...')\n",
587 | " img_dict[name].rio.to_raster(name+'.tif')"
588 | ]
589 | },
590 | {
591 | "cell_type": "markdown",
592 | "metadata": {},
593 | "source": [
594 | "## Manual Download"
595 | ]
596 | },
597 | {
598 | "cell_type": "code",
599 | "execution_count": null,
600 | "metadata": {},
601 | "outputs": [],
602 | "source": [
603 | "# date_df.loc[date_df['year'] == 2021]"
604 | ]
605 | },
606 | {
607 | "cell_type": "code",
608 | "execution_count": null,
609 | "metadata": {},
610 | "outputs": [],
611 | "source": [
612 | "# tmp_date = date_df.loc[(date_df['year'] == 2021) & (date_df['doy'] == 243), 'date'].values[0]\n",
613 | "# manual = best_dates.sel(time=tmp_date)\n",
614 | "# manual_id = str(manual.id.values)\n",
615 | "\n",
616 | "# f, ax = plt.subplots(1,1,figsize=(10,10))\n",
617 | "# plt.imshow(manual)\n",
618 | "# print(manual_id)"
619 | ]
620 | },
621 | {
622 | "cell_type": "code",
623 | "execution_count": null,
624 | "metadata": {},
625 | "outputs": [],
626 | "source": [
627 | "# manual.rio.to_raster(manual_id+'.tif')"
628 | ]
629 | },
630 | {
631 | "cell_type": "markdown",
632 | "metadata": {},
633 | "source": [
634 | "## Close cluster\n",
635 | "Once we're done with our processing, let's be a good steward of our resources and close our cluster"
636 | ]
637 | },
638 | {
639 | "cell_type": "code",
640 | "execution_count": null,
641 | "metadata": {},
642 | "outputs": [],
643 | "source": [
644 | "cluster.close()"
645 | ]
646 | },
647 | {
648 | "cell_type": "markdown",
649 | "metadata": {},
650 | "source": [
651 | "## Download Data\n",
652 | "And you're done! The completed GeoTiff files should be in the same directory as this notebook, and can be downloaded via Jupyter's GUI"
653 | ]
654 | },
655 | {
656 | "cell_type": "code",
657 | "execution_count": null,
658 | "metadata": {},
659 | "outputs": [],
660 | "source": [
661 | "landslide"
662 | ]
663 | },
664 | {
665 | "cell_type": "code",
666 | "execution_count": null,
667 | "metadata": {},
668 | "outputs": [],
669 | "source": []
670 | }
671 | ],
672 | "metadata": {
673 | "kernelspec": {
674 | "display_name": "Python 3 (ipykernel)",
675 | "language": "python",
676 | "name": "python3"
677 | },
678 | "language_info": {
679 | "codemirror_mode": {
680 | "name": "ipython",
681 | "version": 3
682 | },
683 | "file_extension": ".py",
684 | "mimetype": "text/x-python",
685 | "name": "python",
686 | "nbconvert_exporter": "python",
687 | "pygments_lexer": "ipython3",
688 | "version": "3.8.12"
689 | },
690 | "widgets": {
691 | "application/vnd.jupyter.widget-state+json": {
692 | "state": {
693 | "2ca0804b9f904dab815db80637a4f2d9": {
694 | "model_module": "@jupyter-widgets/base",
695 | "model_module_version": "1.2.0",
696 | "model_name": "LayoutModel",
697 | "state": {}
698 | },
699 | "e2f3ac516e3b4cf3a1ba1fc6aa0897ad": {
700 | "model_module": "@jupyter-widgets/controls",
701 | "model_module_version": "1.5.0",
702 | "model_name": "VBoxModel",
703 | "state": {
704 | "layout": "IPY_MODEL_2ca0804b9f904dab815db80637a4f2d9"
705 | }
706 | }
707 | },
708 | "version_major": 2,
709 | "version_minor": 0
710 | }
711 | }
712 | },
713 | "nbformat": 4,
714 | "nbformat_minor": 4
715 | }
716 |
--------------------------------------------------------------------------------
/landslides/large_landslidesV2.cpg:
--------------------------------------------------------------------------------
1 | UTF-8
--------------------------------------------------------------------------------
/landslides/large_landslidesV2.dbf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/forrestfwilliams/pixeloffset_mintpy/01710e26cb79a16a8c385d70f2b80043aa8acde2/landslides/large_landslidesV2.dbf
--------------------------------------------------------------------------------
/landslides/large_landslidesV2.kmz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/forrestfwilliams/pixeloffset_mintpy/01710e26cb79a16a8c385d70f2b80043aa8acde2/landslides/large_landslidesV2.kmz
--------------------------------------------------------------------------------
/landslides/large_landslidesV2.prj:
--------------------------------------------------------------------------------
1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],VERTCS["EGM96_Geoid",VDATUM["EGM96_Geoid"],PARAMETER["Vertical_Shift",0.0],PARAMETER["Direction",1.0],UNIT["Meter",1.0]]
--------------------------------------------------------------------------------
/landslides/large_landslidesV2.sbn:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/forrestfwilliams/pixeloffset_mintpy/01710e26cb79a16a8c385d70f2b80043aa8acde2/landslides/large_landslidesV2.sbn
--------------------------------------------------------------------------------
/landslides/large_landslidesV2.sbx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/forrestfwilliams/pixeloffset_mintpy/01710e26cb79a16a8c385d70f2b80043aa8acde2/landslides/large_landslidesV2.sbx
--------------------------------------------------------------------------------
/landslides/large_landslidesV2.shp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/forrestfwilliams/pixeloffset_mintpy/01710e26cb79a16a8c385d70f2b80043aa8acde2/landslides/large_landslidesV2.shp
--------------------------------------------------------------------------------
/landslides/large_landslidesV2.shp.xml:
--------------------------------------------------------------------------------
1 | 20200909143857001.0FALSEAddField scratchLayer.gdb\Placemarks\Polygons age Text # # # # NULLABLE NON_REQUIRED #AddField scratchLayer.gdb\Placemarks\Polygons confidence "Short (small integer)" # # # # NULLABLE NON_REQUIRED #AddField scratchLayer.gdb\Placemarks\Polygons class Text # # # # NULLABLE NON_REQUIRED #AddField scratchLayer.gdb\Placemarks\Polygons notes Text # # # # NULLABLE NON_REQUIRED #AddField scratchLayer.gdb\Placemarks\Polygons area_ha "Float (single precision)" # # # # NULLABLE NON_REQUIRED #CalculateGeometryAttributes scratchLayer.gdb\Placemarks\Polygons "area_ha AREA_GEODESIC" # Hectares #DeleteField scratchLayer.gdb\Placemarks\Polygons FolderPath;SymbolID;AltMode;Base;Clamped;Extruded;Snippet;PopupInfoCopyFeatures scratchLayer.gdb\Placemarks\Polygons C:\Users\fwillia1\Documents\GitHub\Landslide_Delineation\large_landslidesV2.shp # # # #large_landslidesV20020.000file://\\IT081823\C$\Users\fwillia1\Documents\GitHub\Landslide_Delineation\large_landslidesV2.shpLocal Area NetworkGeographicGCS_WGS_1984Angular Unit: Degree (0.017453)<GeographicCoordinateSystem xsi:type='typens:GeographicCoordinateSystem' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:typens='http://www.esri.com/schemas/ArcGIS/2.2.0'><WKT>GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],VERTCS["EGM96_Geoid",VDATUM["EGM96_Geoid"],PARAMETER["Vertical_Shift",0.0],PARAMETER["Direction",1.0],UNIT["Meter",1.0]]</WKT><XOrigin>-400</XOrigin><YOrigin>-400</YOrigin><XYScale>11258999068426.238</XYScale><ZOrigin>-100000</ZOrigin><ZScale>10000</ZScale><MOrigin>-100000</MOrigin><MScale>10000</MScale><XYTolerance>8.983152841195215e-09</XYTolerance><ZTolerance>0.001</ZTolerance><MTolerance>0.001</MTolerance><HighPrecision>true</HighPrecision><LeftLongitude>-180</LeftLongitude><WKID>4326</WKID><LatestWKID>4326</LatestWKID><VCSWKID>5773</VCSWKID><LatestVCSWKID>5773</LatestVCSWKID></GeographicCoordinateSystem>20200909143904002020090914390400Microsoft Windows 10 Version 10.0 (Build 18363) ; Esri ArcGIS 12.2.1.12813large_landslidesV2Shapefile0.000datasetEPSG6.14(3.0.1)0SimpleFALSE0FALSETRUElarge_landslidesV2Feature Class0FIDFIDOID400Internal feature number.EsriSequential unique whole numbers that are automatically generated.ShapeShapeGeometry000Feature geometry.EsriCoordinates defining the features.NameNameString25400Shape_LengShape_LengDouble1900Shape_AreaShape_AreaDouble1900Area of feature in internal units squared.EsriPositive real numbers that are automatically generated.ageageString25400confidenceconfidenceInteger550classclassString25400notesnotesString25400area_haarea_haSingle130020200909
2 |
--------------------------------------------------------------------------------
/landslides/large_landslidesV2.shx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/forrestfwilliams/pixeloffset_mintpy/01710e26cb79a16a8c385d70f2b80043aa8acde2/landslides/large_landslidesV2.shx
--------------------------------------------------------------------------------
/legacy/cosicorr.cfg:
--------------------------------------------------------------------------------
1 | # vim: set filetype=cfg:
2 | ##------------------------ smallbaselineApp.cfg ------------------------##
3 | ########## computing resource configuration
4 | mintpy.compute.maxMemory = 120 #[float > 0.0], auto for 4, max memory to allocate in GB
5 | ## parallel processing with dask
6 | ## currently apply to steps: invert_network, correct_topography
7 | ## cluster = none to turn off the parallel computing
8 | ## numWorker = all to use all locally available cores (for cluster = local only)
9 | ## config = none to rollback to the default name (same as the cluster type; for cluster != local)
10 | mintpy.compute.cluster = auto #[local / slurm / pbs / lsf / none], auto for none, cluster type
11 | mintpy.compute.numWorker = auto #[int > 1 / all], auto for 4 (local) or 40 (non-local), num of workers
12 | mintpy.compute.config = auto #[none / slurm / pbs / lsf ], auto for none (same as cluster), config name
13 |
14 |
15 | ########## 1. load_data
16 | ##---------add attributes manually
17 | ## MintPy requires attributes listed at: https://mintpy.readthedocs.io/en/latest/api/attributes/
18 | ## Missing attributes can be added below manually (uncomment #), e.g.
19 | # ORBIT_DIRECTION = ascending
20 | # PLATFORM = CSK
21 | # ...
22 | ## a. autoPath - automatic path pattern defined in mintpy.defaults.auto_path.AUTO_PATH_*
23 | ## b. load_data.py -H to check more details and example inputs.
24 | ## c. compression to save disk usage for ifgramStack.h5 file:
25 | ## no - save 0% disk usage, fast [default]
26 | ## lzf - save ~57% disk usage, relative slow
27 | ## gzip - save ~62% disk usage, very slow [not recommend]
28 | mintpy.load.processor = cosicorr #[isce, aria, hyp3, gmtsar, snap, gamma, roipac], auto for isce
29 | mintpy.load.autoPath = auto #[yes / no], auto for no, use pre-defined auto path
30 | mintpy.load.updateMode = no #[yes / no], auto for yes, skip re-loading if HDF5 files are complete
31 | mintpy.load.compression = auto #[gzip / lzf / no], auto for no.
32 | ##---------for ISCE only:
33 | mintpy.load.metaFile = /home/micromamba/pixel/poroa/cosicorr/metadata.txt #[path of common metadata file for the stack], i.e.: ./reference/IW1.xml, ./referenceShelve/data.dat
34 | mintpy.load.baselineDir = auto #[path of the baseline dir], i.e.: ./baselines
35 | ##---------interferogram datasets:
36 | mintpy.load.unwFile = auto #[path pattern of unwrapped interferogram files]
37 | mintpy.load.corFile = auto #[path pattern of spatial coherence files]
38 | mintpy.load.connCompFile = auto #[path pattern of connected components files], optional but recommended
39 | mintpy.load.intFile = auto #[path pattern of wrapped interferogram files], optional
40 | mintpy.load.ionoFile = auto #[path pattern of ionospheric delay files], optional
41 | mintpy.load.magFile = auto #[path pattern of interferogram magnitude files], optional
42 | ##---------offset datasets (optional):
43 | mintpy.load.azOffFile = /home/micromamba/pixel/poroa/cosicorr/*NSOffset.tif #[path pattern of azimuth offset file], optional
44 | mintpy.load.rgOffFile = /home/micromamba/pixel/poroa/cosicorr/*EWOffset.tif #[path pattern of range offset file], optional
45 | mintpy.load.offSnrFile = /home/micromamba/pixel/poroa/cosicorr/*offsetSNR.tif #[path pattern of offset signal-to-noise ratio file], optional
46 | ##---------geometry datasets:
47 | mintpy.load.demFile = auto #[path of DEM file]
48 | mintpy.load.lookupYFile = auto #[path of latitude /row /y coordinate file], not required for geocoded data
49 | mintpy.load.lookupXFile = auto #[path of longitude/column/x coordinate file], not required for geocoded data
50 | mintpy.load.incAngleFile = auto #[path of incidence angle file], optional but recommended
51 | mintpy.load.azAngleFile = auto #[path of azimuth angle file], optional
52 | mintpy.load.shadowMaskFile = auto #[path of shadow mask file], optional but recommended
53 | mintpy.load.waterMaskFile = auto #[path of water mask file], optional but recommended
54 | mintpy.load.bperpFile = auto #[path pattern of 2D perpendicular baseline file], optional
55 | ##---------multilook (optional):
56 | ## multilook while loading data with nearest interpolation, to reduce dataset size
57 | mintpy.load.ystep = auto #[int >= 1], auto for 1 - no multilooking
58 | mintpy.load.xstep = auto #[int >= 1], auto for 1 - no multilooking
59 | ##---------subset (optional):
60 | ## if both yx and lalo are specified, use lalo option unless a) no lookup file AND b) dataset is in radar coord
61 | mintpy.subset.yx = auto #[y0:y1,x0:x1 / no], auto for no
62 | mintpy.subset.lalo = auto #[S:N,W:E / no], auto for no
63 |
64 |
--------------------------------------------------------------------------------
/legacy/cosicorr.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "id": "5698cd96-5cdf-4e8a-9a50-6fca824e9913",
6 | "metadata": {},
7 | "source": [
8 | "# Cosi-Corr"
9 | ]
10 | },
11 | {
12 | "cell_type": "markdown",
13 | "id": "202c31db-4051-4885-a4b0-b15ff601b0a0",
14 | "metadata": {},
15 | "source": [
16 | "## Setup"
17 | ]
18 | },
19 | {
20 | "cell_type": "code",
21 | "execution_count": 1,
22 | "id": "555b5207-5ad6-4d79-afb9-794396d994fe",
23 | "metadata": {},
24 | "outputs": [],
25 | "source": [
26 | "%matplotlib inline\n",
27 | "import os\n",
28 | "import glob\n",
29 | "from pathlib import Path, PureWindowsPath\n",
30 | "import subprocess\n",
31 | "import itertools\n",
32 | "\n",
33 | "from osgeo import gdal\n",
34 | "from datetime import datetime\n",
35 | "import shutil\n",
36 | "import matplotlib.pyplot as plt\n",
37 | "import pandas as pd\n",
38 | "from osgeo import gdal\n",
39 | "from collections import namedtuple"
40 | ]
41 | },
42 | {
43 | "cell_type": "code",
44 | "execution_count": 2,
45 | "id": "94447357-36bb-45ae-8478-6e6c031cf7ec",
46 | "metadata": {},
47 | "outputs": [
48 | {
49 | "data": {
50 | "text/plain": [
51 | "'/mnt/i/sentinel2/pixeloffset_mintpy'"
52 | ]
53 | },
54 | "execution_count": 2,
55 | "metadata": {},
56 | "output_type": "execute_result"
57 | }
58 | ],
59 | "source": [
60 | "pwd"
61 | ]
62 | },
63 | {
64 | "cell_type": "code",
65 | "execution_count": 3,
66 | "id": "cba88e7c-3e0b-4503-81c4-b7051c7d3e29",
67 | "metadata": {},
68 | "outputs": [
69 | {
70 | "name": "stdout",
71 | "output_type": "stream",
72 | "text": [
73 | "/mnt/i/planet/andrew\n"
74 | ]
75 | }
76 | ],
77 | "source": [
78 | "cd /mnt/i/planet/andrew"
79 | ]
80 | },
81 | {
82 | "cell_type": "code",
83 | "execution_count": 4,
84 | "id": "8d2e41df-d5b2-4fbc-9937-02db6f5ff4bb",
85 | "metadata": {},
86 | "outputs": [],
87 | "source": [
88 | "Image = namedtuple('Image','date file')"
89 | ]
90 | },
91 | {
92 | "cell_type": "code",
93 | "execution_count": 5,
94 | "id": "a38b3e7f-a1b9-4b96-be5d-e685e120369c",
95 | "metadata": {},
96 | "outputs": [],
97 | "source": [
98 | "types = {'planet':{'files':'*panchromatic_AnalyticMS_SR*tif','date_loc':slice(0,8)},\n",
99 | " 'sentinel2':{'files':'s2*tif','date_loc':slice(-12,-4)}}\n",
100 | "\n",
101 | "meta = types['planet']\n",
102 | "pattern = meta['files']\n",
103 | "date_loc = meta['date_loc']"
104 | ]
105 | },
106 | {
107 | "cell_type": "code",
108 | "execution_count": 6,
109 | "id": "0fed2757-ce93-444a-98f7-d8b89aedfe90",
110 | "metadata": {},
111 | "outputs": [
112 | {
113 | "data": {
114 | "text/plain": [
115 | "[Image(date='20200903', file='20200903_panchromatic_AnalyticMS_SR_clip.tif'),\n",
116 | " Image(date='20210910', file='20210910_panchromatic_AnalyticMS_SR_clip.tif'),\n",
117 | " Image(date='20170911', file='20170911_panchromatic_AnalyticMS_SR_clip.tif'),\n",
118 | " Image(date='20180909', file='20180909_panchromatic_AnalyticMS_SR_clip.tif'),\n",
119 | " Image(date='20190918', file='20190918_panchromatic_AnalyticMS_SR_clip.tif')]"
120 | ]
121 | },
122 | "execution_count": 6,
123 | "metadata": {},
124 | "output_type": "execute_result"
125 | }
126 | ],
127 | "source": [
128 | "names = [Image(os.path.basename(x)[date_loc],x) for x in glob.glob(pattern)]\n",
129 | "\n",
130 | "merged = [x for x in names if 'merged' in x.file]\n",
131 | "for m in merged:\n",
132 | " names = [x for x in names if m.date != x.date]\n",
133 | "\n",
134 | "names += merged\n",
135 | "names"
136 | ]
137 | },
138 | {
139 | "cell_type": "markdown",
140 | "id": "78d5402a-8aa6-4424-a921-2eb4c3da7b4f",
141 | "metadata": {},
142 | "source": [
143 | "## Planet"
144 | ]
145 | },
146 | {
147 | "cell_type": "code",
148 | "execution_count": 61,
149 | "id": "e353d145-9061-44dd-a505-b68beff8da25",
150 | "metadata": {},
151 | "outputs": [
152 | {
153 | "name": "stdout",
154 | "output_type": "stream",
155 | "text": [
156 | "merging 20180909...\n",
157 | "0...10...20...30...40...50...60...70...80...90...100 - done.\n",
158 | "merging 20190918...\n",
159 | "0...10...20...30...40...50...60...70...80...90...100 - done.\n",
160 | "merging 20170911...\n",
161 | "0...10...20...30...40...50...60...70...80...90...100 - done.\n"
162 | ]
163 | }
164 | ],
165 | "source": [
166 | "dates = [x.date for x in names]\n",
167 | "\n",
168 | "for d in set(dates):\n",
169 | " if dates.count(d) > 1:\n",
170 | " print(f'merging {d}...')\n",
171 | " files = [x.file for x in names if x.date == d]\n",
172 | " out_name = '_'.join(files[0].split('_')[:1]+['merged']+files[0].split('_')[-3:])\n",
173 | " !gdal_merge.py {' '.join(files)} -o {out_name}"
174 | ]
175 | },
176 | {
177 | "cell_type": "markdown",
178 | "id": "646bb4f7-d59a-4b18-a00f-8fc1b6bc2153",
179 | "metadata": {},
180 | "source": [
181 | "## Run Cosi-Corr"
182 | ]
183 | },
184 | {
185 | "cell_type": "code",
186 | "execution_count": 7,
187 | "id": "24d5d242-92c5-4818-93df-4886b27113bf",
188 | "metadata": {},
189 | "outputs": [
190 | {
191 | "name": "stdout",
192 | "output_type": "stream",
193 | "text": [
194 | "All geotransforms the same!\n"
195 | ]
196 | }
197 | ],
198 | "source": [
199 | "geo = []\n",
200 | "\n",
201 | "for n in names:\n",
202 | " ds = gdal.Open(n.file, gdal.GA_ReadOnly)\n",
203 | " geo.append([ds.RasterXSize,ds.RasterYSize,ds.GetGeoTransform()])\n",
204 | " ds = None\n",
205 | "\n",
206 | "\n",
207 | "if max([len(list(set(x))) for x in zip(*geo)]) == 1:\n",
208 | " print('All geotransforms the same!')\n",
209 | "else: \n",
210 | " print('All geotransforms the NOT same!')\n",
211 | " print(geo)"
212 | ]
213 | },
214 | {
215 | "cell_type": "code",
216 | "execution_count": 8,
217 | "id": "69f29ea2-63fc-4459-93ba-950755c7c28b",
218 | "metadata": {},
219 | "outputs": [
220 | {
221 | "data": {
222 | "text/plain": [
223 | "10"
224 | ]
225 | },
226 | "execution_count": 8,
227 | "metadata": {},
228 | "output_type": "execute_result"
229 | }
230 | ],
231 | "source": [
232 | "files = [sorted(x) for x in itertools.combinations([y.file for y in names],2)]\n",
233 | "# files = [sorted(x) for x in itertools.combinations(names.values(),2) if x[0][-12:-8] != x[1][-12:-8]]\n",
234 | "\n",
235 | "len(files)"
236 | ]
237 | },
238 | {
239 | "cell_type": "code",
240 | "execution_count": 9,
241 | "id": "f3c9e880-0d28-426e-8bd6-8ba46e5c62d7",
242 | "metadata": {},
243 | "outputs": [],
244 | "source": [
245 | "# pairs = pd.read_csv('pairs.csv')\n",
246 | "# files = list(zip(pairs.image1,pairs.image2))\n",
247 | "# len(files)"
248 | ]
249 | },
250 | {
251 | "cell_type": "code",
252 | "execution_count": 11,
253 | "id": "15cb7597-6fb6-44c2-915b-b61fdfd71f73",
254 | "metadata": {},
255 | "outputs": [],
256 | "source": [
257 | "# if using bounds:\n",
258 | "#for bounds, sample=x, line=y\n",
259 | "#xstart, xend, ystart, yend\n",
260 | "poroa_upper = '9873 10773 9570 10773'\n",
261 | "no_bounds = ''\n",
262 | "\n",
263 | "bounds = no_bounds\n",
264 | "band = 1\n",
265 | "data_dir = PureWindowsPath('I:/planet/andrew')\n",
266 | "out_dir = data_dir / 'cosicorr_sobel'\n",
267 | "window = 64\n",
268 | "step = 16\n",
269 | "\n",
270 | "# data_dir = PureWindowsPath(data_dir)\n",
271 | "# out_dir = PureWindowsPath(out_dir)\n",
272 | "\n",
273 | "dic = {'primary':[f'{str(data_dir / x[0])} {band} {bounds}' for x in files],\n",
274 | " 'secondary':[f'{str(data_dir / x[1])} {band} {bounds}' for x in files],\n",
275 | " 'out_name':[str(out_dir / f'cosicorr_{x[0][date_loc]}T000000_{x[1][date_loc]}T000000.dat') for x in files]}\n",
276 | "\n",
277 | "for key in dic:\n",
278 | " with open(f'{key}.txt', 'w') as f:\n",
279 | " for line in dic[key]:\n",
280 | " f.write(line)\n",
281 | " f.write('\\n')\n",
282 | "\n",
283 | "# frequency, winMaxX, winMaxY, winMinX, winMinY, stepX, stepY, nbRobustIteration, MaskThreshold, resampling, grid\n",
284 | "options = [f'frequency {window} {window} {window} {window} {step} {step} 5 0.9 0 0'] * len(files)\n",
285 | "with open('options.txt', 'w') as f:\n",
286 | " for line in options:\n",
287 | " f.write(line)\n",
288 | " f.write('\\n')"
289 | ]
290 | },
291 | {
292 | "cell_type": "markdown",
293 | "id": "d3a6a2b9-be18-4802-9396-2f738de12cf9",
294 | "metadata": {},
295 | "source": [
296 | "## Prep for MintPy"
297 | ]
298 | },
299 | {
300 | "cell_type": "code",
301 | "execution_count": 12,
302 | "id": "05e33461-d0b6-4289-904a-356feeb8e1a6",
303 | "metadata": {},
304 | "outputs": [
305 | {
306 | "name": "stdout",
307 | "output_type": "stream",
308 | "text": [
309 | "/mnt/i/planet/andrew/cosicorr_sobel\n"
310 | ]
311 | }
312 | ],
313 | "source": [
314 | "cd /mnt/i/planet/andrew/cosicorr_sobel"
315 | ]
316 | },
317 | {
318 | "cell_type": "code",
319 | "execution_count": 13,
320 | "id": "55e57afd-12f4-4050-a601-823fad0ecfd6",
321 | "metadata": {},
322 | "outputs": [
323 | {
324 | "data": {
325 | "text/plain": [
326 | "['cosicorr_20170911T000000_20180909T000000.dat',\n",
327 | " 'cosicorr_20170911T000000_20190918T000000.dat',\n",
328 | " 'cosicorr_20170911T000000_20200903T000000.dat',\n",
329 | " 'cosicorr_20170911T000000_20210910T000000.dat',\n",
330 | " 'cosicorr_20180909T000000_20190918T000000.dat',\n",
331 | " 'cosicorr_20180909T000000_20200903T000000.dat',\n",
332 | " 'cosicorr_20180909T000000_20210910T000000.dat',\n",
333 | " 'cosicorr_20190918T000000_20200903T000000.dat',\n",
334 | " 'cosicorr_20190918T000000_20210910T000000.dat',\n",
335 | " 'cosicorr_20200903T000000_20210910T000000.dat']"
336 | ]
337 | },
338 | "execution_count": 13,
339 | "metadata": {},
340 | "output_type": "execute_result"
341 | }
342 | ],
343 | "source": [
344 | "# create separate tif files for each band\n",
345 | "files = glob.glob('*.dat')\n",
346 | "files.sort()\n",
347 | "files"
348 | ]
349 | },
350 | {
351 | "cell_type": "code",
352 | "execution_count": 14,
353 | "id": "5d7f1dc0-17ec-46dc-8081-c1d6064c5473",
354 | "metadata": {},
355 | "outputs": [],
356 | "source": [
357 | "for fname in files:\n",
358 | " for b, dataset in enumerate(['EWOffset','NSOffset','offsetSNR']):\n",
359 | " fname_out = f'{os.path.splitext(fname)[0]}_{dataset}.tif'\n",
360 | " ds = gdal.Open(fname)\n",
361 | " ds = gdal.Translate(fname_out, ds, bandList = [b+1])\n",
362 | " ds = None\n",
363 | "\n",
364 | "# write mintpy file\n",
365 | "files = glob.glob('*EWOffset.tif')+glob.glob('*NSOffset.tif')+glob.glob('*offsetSNR.tif')\n",
366 | "files.sort()\n",
367 | "lines = [f'{f} {f[9:17]} {f[25:33]}\\n' for f in files]\n",
368 | "with open('metadata.txt', 'w') as f:\n",
369 | " f.writelines(lines)"
370 | ]
371 | },
372 | {
373 | "cell_type": "code",
374 | "execution_count": null,
375 | "id": "84d24fc1-10b8-4517-a611-5727edeb3fd0",
376 | "metadata": {},
377 | "outputs": [],
378 | "source": []
379 | }
380 | ],
381 | "metadata": {
382 | "kernelspec": {
383 | "display_name": "Python 3 (ipykernel)",
384 | "language": "python",
385 | "name": "python3"
386 | },
387 | "language_info": {
388 | "codemirror_mode": {
389 | "name": "ipython",
390 | "version": 3
391 | },
392 | "file_extension": ".py",
393 | "mimetype": "text/x-python",
394 | "name": "python",
395 | "nbconvert_exporter": "python",
396 | "pygments_lexer": "ipython3",
397 | "version": "3.8.10"
398 | }
399 | },
400 | "nbformat": 4,
401 | "nbformat_minor": 5
402 | }
403 |
--------------------------------------------------------------------------------
/legacy/filtering.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "id": "e65b6178-d0ed-45a4-9e6e-207d6429773e",
6 | "metadata": {},
7 | "source": [
8 | "# Filtering"
9 | ]
10 | },
11 | {
12 | "cell_type": "markdown",
13 | "id": "3e3c0308-4e83-4771-aa52-81de219a6348",
14 | "metadata": {},
15 | "source": [
16 | "## Setup"
17 | ]
18 | },
19 | {
20 | "cell_type": "code",
21 | "execution_count": 5,
22 | "id": "e686471e-99aa-42b6-b48a-b1cc68b726cd",
23 | "metadata": {},
24 | "outputs": [
25 | {
26 | "name": "stdout",
27 | "output_type": "stream",
28 | "text": [
29 | "/home/fw/data/poroa_32\n"
30 | ]
31 | }
32 | ],
33 | "source": [
34 | "cd /home/fw/data/poroa_32"
35 | ]
36 | },
37 | {
38 | "cell_type": "markdown",
39 | "id": "b21d81ff-586a-40b5-b180-1124c0d7b8d9",
40 | "metadata": {},
41 | "source": [
42 | "## Velocity filter"
43 | ]
44 | },
45 | {
46 | "cell_type": "code",
47 | "execution_count": 3,
48 | "id": "8dc157c6-224e-4cf7-8828-729a17a28973",
49 | "metadata": {},
50 | "outputs": [],
51 | "source": [
52 | "# !generate_mask.py -h\n",
53 | "# !mask.py -h"
54 | ]
55 | },
56 | {
57 | "cell_type": "code",
58 | "execution_count": null,
59 | "id": "768cc7fc-6b56-4bb7-b243-feb06dcd5a9b",
60 | "metadata": {},
61 | "outputs": [],
62 | "source": []
63 | }
64 | ],
65 | "metadata": {
66 | "kernelspec": {
67 | "display_name": "Python 3 (ipykernel)",
68 | "language": "python",
69 | "name": "python3"
70 | },
71 | "language_info": {
72 | "codemirror_mode": {
73 | "name": "ipython",
74 | "version": 3
75 | },
76 | "file_extension": ".py",
77 | "mimetype": "text/x-python",
78 | "name": "python",
79 | "nbconvert_exporter": "python",
80 | "pygments_lexer": "ipython3",
81 | "version": "3.8.10"
82 | }
83 | },
84 | "nbformat": 4,
85 | "nbformat_minor": 5
86 | }
87 |
--------------------------------------------------------------------------------
/legacy/long_baseline.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": 18,
6 | "id": "a46a8795-12af-4524-a42f-6b8fcfdb6401",
7 | "metadata": {},
8 | "outputs": [],
9 | "source": [
10 | "%matplotlib inline\n",
11 | "import os\n",
12 | "import glob\n",
13 | "import subprocess\n",
14 | "import itertools\n",
15 | "from osgeo import gdal\n",
16 | "from datetime import datetime\n",
17 | "from datetime import timedelta\n",
18 | "import shutil\n",
19 | "import matplotlib.pyplot as plt"
20 | ]
21 | },
22 | {
23 | "cell_type": "code",
24 | "execution_count": 34,
25 | "id": "23530f99-68c7-4d3f-a556-e7c57a2c71a7",
26 | "metadata": {},
27 | "outputs": [
28 | {
29 | "name": "stdout",
30 | "output_type": "stream",
31 | "text": [
32 | "I:\\sentinel2\\upper\\poroa\n"
33 | ]
34 | }
35 | ],
36 | "source": [
37 | "cd I:\\sentinel2\\upper\\poroa"
38 | ]
39 | },
40 | {
41 | "cell_type": "code",
42 | "execution_count": 40,
43 | "id": "98a5358e-2d7b-4084-a679-fdfffcffd3ab",
44 | "metadata": {},
45 | "outputs": [],
46 | "source": [
47 | "files = glob.glob('*.tif')\n",
48 | "\n",
49 | "for f in files:\n",
50 | " date1 = datetime.strptime(f[9:24],'%Y%m%dT%H%M%S')\n",
51 | " date2 = datetime.strptime(f[25:40],'%Y%m%dT%H%M%S')\n",
52 | " d = date2 - date1\n",
53 | " if date2 - date1 < timedelta(days=365):\n",
54 | " shutil.move(f,os.path.join('short_baseline',f))"
55 | ]
56 | },
57 | {
58 | "cell_type": "code",
59 | "execution_count": 41,
60 | "id": "6a2184d9-bf17-4f50-8473-8a7a639c35b9",
61 | "metadata": {},
62 | "outputs": [
63 | {
64 | "name": "stdout",
65 | "output_type": "stream",
66 | "text": [
67 | " Volume in drive I is WD\n",
68 | " Volume Serial Number is 40FB-BE48\n",
69 | "\n",
70 | " Directory of I:\\sentinel2\\upper\\poroa\\short_baseline\n",
71 | "\n",
72 | "19/08/2021 06:43 PM
.\n",
73 | "19/08/2021 06:43 PM ..\n",
74 | "19/08/2021 05:07 PM 273,234 cosicorr_20160206T221552_20161122T221602_EWOffset.tif\n",
75 | "19/08/2021 05:07 PM 273,236 cosicorr_20160206T221552_20161122T221602_NSOffset.tif\n",
76 | "19/08/2021 05:07 PM 273,212 cosicorr_20160206T221552_20161122T221602_offsetSNR.tif\n",
77 | "19/08/2021 05:07 PM 272,900 cosicorr_20161122T221602_20170421T221601_EWOffset.tif\n",
78 | "19/08/2021 05:07 PM 272,902 cosicorr_20161122T221602_20170421T221601_NSOffset.tif\n",
79 | "19/08/2021 05:07 PM 272,894 cosicorr_20161122T221602_20170421T221601_offsetSNR.tif\n",
80 | "19/08/2021 05:07 PM 272,900 cosicorr_20161122T221602_20170501T221601_EWOffset.tif\n",
81 | "19/08/2021 05:07 PM 272,902 cosicorr_20161122T221602_20170501T221601_NSOffset.tif\n",
82 | "19/08/2021 05:07 PM 272,894 cosicorr_20161122T221602_20170501T221601_offsetSNR.tif\n",
83 | "19/08/2021 05:07 PM 272,900 cosicorr_20161122T221602_20170521T221601_EWOffset.tif\n",
84 | "19/08/2021 05:07 PM 272,902 cosicorr_20161122T221602_20170521T221601_NSOffset.tif\n",
85 | "19/08/2021 05:07 PM 272,894 cosicorr_20161122T221602_20170521T221601_offsetSNR.tif\n",
86 | "19/08/2021 05:07 PM 272,900 cosicorr_20161122T221602_20170804T221559_EWOffset.tif\n",
87 | "19/08/2021 05:07 PM 272,902 cosicorr_20161122T221602_20170804T221559_NSOffset.tif\n",
88 | "19/08/2021 05:07 PM 272,894 cosicorr_20161122T221602_20170804T221559_offsetSNR.tif\n",
89 | "19/08/2021 05:07 PM 272,900 cosicorr_20161122T221602_20171013T221549_EWOffset.tif\n",
90 | "19/08/2021 05:07 PM 272,902 cosicorr_20161122T221602_20171013T221549_NSOffset.tif\n",
91 | "19/08/2021 05:07 PM 272,894 cosicorr_20161122T221602_20171013T221549_offsetSNR.tif\n",
92 | "19/08/2021 05:07 PM 272,900 cosicorr_20161122T221602_20171122T221549_EWOffset.tif\n",
93 | "19/08/2021 05:07 PM 272,902 cosicorr_20161122T221602_20171122T221549_NSOffset.tif\n",
94 | "19/08/2021 05:07 PM 272,894 cosicorr_20161122T221602_20171122T221549_offsetSNR.tif\n",
95 | "19/08/2021 05:08 PM 272,900 cosicorr_20170421T221601_20170501T221601_EWOffset.tif\n",
96 | "19/08/2021 05:08 PM 272,902 cosicorr_20170421T221601_20170501T221601_NSOffset.tif\n",
97 | "19/08/2021 05:08 PM 272,894 cosicorr_20170421T221601_20170501T221601_offsetSNR.tif\n",
98 | "19/08/2021 05:08 PM 272,900 cosicorr_20170421T221601_20170521T221601_EWOffset.tif\n",
99 | "19/08/2021 05:08 PM 272,902 cosicorr_20170421T221601_20170521T221601_NSOffset.tif\n",
100 | "19/08/2021 05:08 PM 272,894 cosicorr_20170421T221601_20170521T221601_offsetSNR.tif\n",
101 | "19/08/2021 05:08 PM 272,900 cosicorr_20170421T221601_20170804T221559_EWOffset.tif\n",
102 | "19/08/2021 05:08 PM 272,902 cosicorr_20170421T221601_20170804T221559_NSOffset.tif\n",
103 | "19/08/2021 05:08 PM 272,894 cosicorr_20170421T221601_20170804T221559_offsetSNR.tif\n",
104 | "19/08/2021 05:08 PM 272,900 cosicorr_20170421T221601_20171013T221549_EWOffset.tif\n",
105 | "19/08/2021 05:08 PM 272,902 cosicorr_20170421T221601_20171013T221549_NSOffset.tif\n",
106 | "19/08/2021 05:08 PM 272,894 cosicorr_20170421T221601_20171013T221549_offsetSNR.tif\n",
107 | "19/08/2021 05:08 PM 272,900 cosicorr_20170421T221601_20171122T221549_EWOffset.tif\n",
108 | "19/08/2021 05:08 PM 272,902 cosicorr_20170421T221601_20171122T221549_NSOffset.tif\n",
109 | "19/08/2021 05:08 PM 272,894 cosicorr_20170421T221601_20171122T221549_offsetSNR.tif\n",
110 | "19/08/2021 05:08 PM 272,900 cosicorr_20170421T221601_20180317T221601_EWOffset.tif\n",
111 | "19/08/2021 05:08 PM 272,902 cosicorr_20170421T221601_20180317T221601_NSOffset.tif\n",
112 | "19/08/2021 05:08 PM 272,894 cosicorr_20170421T221601_20180317T221601_offsetSNR.tif\n",
113 | "19/08/2021 05:08 PM 272,900 cosicorr_20170501T221601_20170521T221601_EWOffset.tif\n",
114 | "19/08/2021 05:08 PM 272,902 cosicorr_20170501T221601_20170521T221601_NSOffset.tif\n",
115 | "19/08/2021 05:08 PM 272,894 cosicorr_20170501T221601_20170521T221601_offsetSNR.tif\n",
116 | "19/08/2021 05:08 PM 272,900 cosicorr_20170501T221601_20170804T221559_EWOffset.tif\n",
117 | "19/08/2021 05:08 PM 272,902 cosicorr_20170501T221601_20170804T221559_NSOffset.tif\n",
118 | "19/08/2021 05:08 PM 272,894 cosicorr_20170501T221601_20170804T221559_offsetSNR.tif\n",
119 | "19/08/2021 05:08 PM 272,900 cosicorr_20170501T221601_20171013T221549_EWOffset.tif\n",
120 | "19/08/2021 05:08 PM 272,902 cosicorr_20170501T221601_20171013T221549_NSOffset.tif\n",
121 | "19/08/2021 05:08 PM 272,894 cosicorr_20170501T221601_20171013T221549_offsetSNR.tif\n",
122 | "19/08/2021 05:08 PM 272,900 cosicorr_20170501T221601_20171122T221549_EWOffset.tif\n",
123 | "19/08/2021 05:08 PM 272,902 cosicorr_20170501T221601_20171122T221549_NSOffset.tif\n",
124 | "19/08/2021 05:08 PM 272,894 cosicorr_20170501T221601_20171122T221549_offsetSNR.tif\n",
125 | "19/08/2021 05:08 PM 272,900 cosicorr_20170501T221601_20180317T221601_EWOffset.tif\n",
126 | "19/08/2021 05:08 PM 272,902 cosicorr_20170501T221601_20180317T221601_NSOffset.tif\n",
127 | "19/08/2021 05:08 PM 272,894 cosicorr_20170501T221601_20180317T221601_offsetSNR.tif\n",
128 | "19/08/2021 05:08 PM 272,900 cosicorr_20170521T221601_20170804T221559_EWOffset.tif\n",
129 | "19/08/2021 05:08 PM 272,902 cosicorr_20170521T221601_20170804T221559_NSOffset.tif\n",
130 | "19/08/2021 05:08 PM 272,894 cosicorr_20170521T221601_20170804T221559_offsetSNR.tif\n"
131 | ]
132 | }
133 | ],
134 | "source": [
135 | "ls short_baseline"
136 | ]
137 | },
138 | {
139 | "cell_type": "code",
140 | "execution_count": null,
141 | "id": "9b3fb0a9-a3af-4a47-901d-2f947e1aaeab",
142 | "metadata": {},
143 | "outputs": [],
144 | "source": []
145 | }
146 | ],
147 | "metadata": {
148 | "kernelspec": {
149 | "display_name": "Python 3 (ipykernel)",
150 | "language": "python",
151 | "name": "python3"
152 | },
153 | "language_info": {
154 | "codemirror_mode": {
155 | "name": "ipython",
156 | "version": 3
157 | },
158 | "file_extension": ".py",
159 | "mimetype": "text/x-python",
160 | "name": "python",
161 | "nbconvert_exporter": "python",
162 | "pygments_lexer": "ipython3",
163 | "version": "3.9.5"
164 | }
165 | },
166 | "nbformat": 4,
167 | "nbformat_minor": 5
168 | }
169 |
--------------------------------------------------------------------------------
/legacy/peg_comparison.csv:
--------------------------------------------------------------------------------
1 | name,east,north,n_rate,e_rate,row,column,pt_n_rate,pt_e_rate
2 | Peg 1,401882.6939316753,5599990.808199079,-0.06712311393590556,-0.0348946018609858,33.0,60.0,-0.027445511892437935,0.32844486832618713
3 | Peg 10,401633.98411539797,5599488.971317613,-0.11009467719425783,-0.0193340133123257,46.0,54.0,0.7692288160324097,0.050553929060697556
4 | Peg 11,401697.91994167416,5599280.564717288,-0.8329024253291102,0.10055992797701427,51.0,56.0,-1.000311255455017,-0.27631810307502747
5 | Peg 12,401872.59238784784,5599288.520260936,-0.6559927455900556,-0.09503835967831649,51.0,60.0,-1.0552277565002441,-0.09401033073663712
6 | Peg 13,401981.524581142,5599228.460525637,-0.48485702067346403,-0.07077150428945526,52.0,63.0,-0.3287946581840515,-0.6393814086914062
7 | Peg 14,401694.80390734534,5599142.781278689,-2.017308502716166,0.47589728990530755,54.0,55.0,-0.6982775330543518,0.693308413028717
8 | Peg 15,401493.1618008809,5599274.8810435375,-0.15014577467301005,0.023383777997677775,51.0,50.0,0.6330466866493225,0.31483912467956543
9 | Peg 17,401834.83924448554,5599087.799558049,-3.1775553928598192,-0.16713454157585067,56.0,59.0,-2.8234643936157227,0.08980224281549454
10 | Peg 18,402023.42335493723,5599003.15488908,-0.4065081724661101,-0.13046164684970746,58.0,64.0,-0.5906163454055786,-0.4682910442352295
11 | Peg 19,401962.6061349193,5598962.501621593,-1.0472863479919903,-0.8888018329740411,59.0,62.0,-0.7068228721618652,-0.15149207413196564
12 | Peg 2,401604.1651194934,5599861.850595369,-0.03928295776446253,-0.031195681774754763,36.0,53.0,-0.4762050211429596,-0.9797956347465515
13 | Peg 20,401949.93129827926,5598889.073452265,-2.3972128665668895,0.011741188343708076,61.0,62.0,-1.0280429124832153,1.6613256931304932
14 | Peg 21,401809.3413031725,5598823.821893785,-7.077138303582804,3.303934492907924,62.0,58.0,-4.222097396850586,1.8861596584320068
15 | Peg 22,401768.40792255255,5598723.512624888,-6.922810715522669,10.970571836799078,65.0,57.0,-2.6244988441467285,1.8035101890563965
16 | Peg 23,401710.217476574,5598648.980075604,-0.029030700829841313,0.011522102480202578,67.0,56.0,-0.3843362331390381,-0.238570898771286
17 | Peg 24,401684.56291183503,5598882.364715566,-5.381425753334941,0.782260807595257,61.0,55.0,-3.8370678424835205,1.0758439302444458
18 | Peg 25,401666.11983532907,5598791.442497897,-5.059485304432941,2.3192368626928954,63.0,55.0,-4.176458358764648,1.321367621421814
19 | Peg 26,401628.5453922344,5598779.434005157,-0.022070635117644878,-0.05517956721377635,63.0,54.0,-2.5103423595428467,0.3686058521270752
20 | Peg 27,401507.73634172976,5598841.463468127,0.007360138465413574,-0.005571490533271401,62.0,51.0,-0.13316455483436584,0.022913722321391106
21 | Peg 28,401583.98985908687,5598939.528869877,-0.6363655456801942,0.5932036354763413,59.0,53.0,-0.0818859115242958,0.22556933760643005
22 | Peg 3,401558.2847077807,5599739.4579416,-0.06276951109061224,-0.025145607252434136,39.0,52.0,0.26044002175331116,-0.40045297145843506
23 | Peg 4,401729.0483663135,5599693.141811232,-0.09812353021228692,-0.02301017010360831,41.0,56.0,1.4369993209838867,-0.7979523539543152
24 | Peg 5,401864.92836730677,5599634.816322069,-0.16489308881474365,-0.024399665201667364,42.0,60.0,0.8369398713111877,-0.26617562770843506
25 | Peg 6,402073.6730069632,5599699.49445697,-0.11053201707695673,-0.04512789365182717,40.0,65.0,0.31937557458877563,-0.44315826892852783
26 | Peg 7,402186.36531592475,5599599.989807645,-0.07881829653466214,-0.024337462269666557,43.0,68.0,-0.8177005052566528,0.29733163118362427
27 | Peg 8,401979.7155249593,5599467.11857222,-0.21046409688984416,-0.02933302863246078,46.0,63.0,0.8186348676681519,-0.09516891837120056
28 | Peg 9,401783.7377843007,5599456.836122807,-0.3027779485341361,-0.059408431580329185,46.0,58.0,-0.10599363595247269,0.381363183259964
29 |
--------------------------------------------------------------------------------
/legacy/prep_sentinel2.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "id": "893c49f0-a83d-40ee-be22-38fead6c012d",
6 | "metadata": {},
7 | "source": [
8 | "## Setup"
9 | ]
10 | },
11 | {
12 | "cell_type": "code",
13 | "execution_count": 1,
14 | "id": "a86d9b4b-6bff-4af0-989d-4ffc896c7158",
15 | "metadata": {},
16 | "outputs": [],
17 | "source": [
18 | "%matplotlib inline\n",
19 | "import os\n",
20 | "import glob\n",
21 | "import subprocess\n",
22 | "import itertools\n",
23 | "from osgeo import gdal\n",
24 | "from datetime import datetime\n",
25 | "import shutil\n",
26 | "import matplotlib.pyplot as plt\n",
27 | "import pandas as pd"
28 | ]
29 | },
30 | {
31 | "cell_type": "code",
32 | "execution_count": 28,
33 | "id": "6c014952-f4e9-4b1b-abbf-ca5f189922ea",
34 | "metadata": {},
35 | "outputs": [
36 | {
37 | "name": "stdout",
38 | "output_type": "stream",
39 | "text": [
40 | "/mnt/i/sentinel2/upper\n"
41 | ]
42 | }
43 | ],
44 | "source": [
45 | "cd /mnt/i/sentinel2/upper"
46 | ]
47 | },
48 | {
49 | "cell_type": "markdown",
50 | "id": "0e478df8-b9a5-4241-8ad3-eb35833ef092",
51 | "metadata": {},
52 | "source": [
53 | "## Unzip"
54 | ]
55 | },
56 | {
57 | "cell_type": "code",
58 | "execution_count": 11,
59 | "id": "39383bc1-569d-4d2a-941d-33a159a89b4e",
60 | "metadata": {},
61 | "outputs": [
62 | {
63 | "name": "stdout",
64 | "output_type": "stream",
65 | "text": [
66 | "[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]\n",
67 | "20160206T221552 contains ERROR!\n",
68 | "[]\n",
69 | "{'20200311T221559'}\n"
70 | ]
71 | }
72 | ],
73 | "source": [
74 | "zips = set([x[16:31] for x in glob.glob(r'zips\\*zip')])\n",
75 | "l1s = set([x[19:34] for x in glob.glob(r'level1C\\*L1C*.SAFE')])\n",
76 | "l2s = [x[19:34] for x in glob.glob(r'level2A\\*L2A*.SAFE')]\n",
77 | "print([l2s.count(x) for x in l2s])\n",
78 | "l2s = set(l2s)\n",
79 | "not_started = l2s - l1s\n",
80 | "\n",
81 | "logs = glob.glob(r'level2A\\*L2A*.SAFE\\rep_info\\*report.xml')\n",
82 | "log_dates = set([x[19:34] for x in logs])\n",
83 | "not_finished = l2s - log_dates\n",
84 | "\n",
85 | "contains_error = []\n",
86 | "check_for = 'ERROR' #'metadata file is valid'\n",
87 | "for log in logs:\n",
88 | " with open(log) as f:\n",
89 | " lines = f.readlines()\n",
90 | " contains = [check_for in l for l in lines]\n",
91 | " if any(contains):\n",
92 | " contains_error.append(log[19:34])\n",
93 | " print(f'{log[19:34]} contains {check_for}!')\n",
94 | " \n",
95 | "redo = list(not_started)+list(not_finished)#+contains_error\n",
96 | "print(redo)\n",
97 | "print(l1s-zips)\n",
98 | "# print(len(l1s),len(l2s))"
99 | ]
100 | },
101 | {
102 | "cell_type": "markdown",
103 | "id": "b1425a74-3069-477c-9a2d-c8c4ff5948c5",
104 | "metadata": {},
105 | "source": [
106 | "## Convert to Level 2A"
107 | ]
108 | },
109 | {
110 | "cell_type": "code",
111 | "execution_count": 12,
112 | "id": "75406e99-7ee6-44ef-b53e-0d19d44898f5",
113 | "metadata": {},
114 | "outputs": [
115 | {
116 | "name": "stdout",
117 | "output_type": "stream",
118 | "text": [
119 | "26\n"
120 | ]
121 | }
122 | ],
123 | "source": [
124 | "# # for upper\n",
125 | "# subset = ['20180705','20210219','20171013']\n",
126 | "# still_need =['20200111','20200210','20200331']\n",
127 | "# corrupted = ['20190225','20200331','20210130']\n",
128 | "\n",
129 | "subset = redo\n",
130 | "safes = glob.glob(r'.\\level1C\\*SAFE')\n",
131 | "print(len(safes))\n",
132 | "lines = [f'CALL ..\\Sen2Cor-02.09.00-win64\\L2A_Process.bat {x}' for x in safes if any([y in x for y in subset])]\n",
133 | "lines = ['@ECHO OFF'] + lines\n",
134 | "with open('to_level2.bat', 'w') as f:\n",
135 | " for line in lines:\n",
136 | " f.write(line)\n",
137 | " f.write('\\n')\n",
138 | "# run to_level2.bat on command line"
139 | ]
140 | },
141 | {
142 | "cell_type": "markdown",
143 | "id": "e40a784d-c1e4-4930-9e73-56bf4ff1896b",
144 | "metadata": {},
145 | "source": [
146 | "## Convert to envi files"
147 | ]
148 | },
149 | {
150 | "cell_type": "code",
151 | "execution_count": 13,
152 | "id": "a41ea89f-bf37-4154-abca-976a5fe1dfff",
153 | "metadata": {},
154 | "outputs": [],
155 | "source": [
156 | "b08 = glob.glob('level2A\\*\\GRANULE\\*\\IMG_DATA\\R10m\\*B08_10m.jp2')\n",
157 | "lines = [f'CALL rio convert {x} -f ENVI -o envi\\\\{os.path.basename(x).split(\".\")[0]}.dat' for x in b08]\n",
158 | "lines = ['@ECHO OFF'] + lines\n",
159 | "with open('to_envi.bat', 'w') as f:\n",
160 | " for line in lines:\n",
161 | " f.write(line)\n",
162 | " f.write('\\n')\n",
163 | "\n",
164 | "# run to_envi.bat on command line"
165 | ]
166 | },
167 | {
168 | "cell_type": "markdown",
169 | "id": "d988fdd1-f661-4c58-86d8-1ec72aa94ad6",
170 | "metadata": {},
171 | "source": [
172 | "## Run Cosi-Corr"
173 | ]
174 | },
175 | {
176 | "cell_type": "code",
177 | "execution_count": 29,
178 | "id": "7985cecd-76db-4d8e-b12b-de7b73500d8a",
179 | "metadata": {},
180 | "outputs": [
181 | {
182 | "data": {
183 | "text/plain": [
184 | "15"
185 | ]
186 | },
187 | "execution_count": 29,
188 | "metadata": {},
189 | "output_type": "execute_result"
190 | }
191 | ],
192 | "source": [
193 | "home_dir = os.path.abspath('envi')\n",
194 | "pairs = pd.read_csv(os.path.join(home_dir,'pairs_yearly.csv'))\n",
195 | "files = list(zip(pairs.image1,pairs.image2))\n",
196 | "len(files)"
197 | ]
198 | },
199 | {
200 | "cell_type": "code",
201 | "execution_count": 30,
202 | "id": "b2356ff0-71c6-49f0-a016-dad98c8c3cff",
203 | "metadata": {},
204 | "outputs": [],
205 | "source": [
206 | "# if using bounds:\n",
207 | "#for bounds, sample=x, line=y\n",
208 | "#xstart, xend, ystart, yend\n",
209 | "poroa_upper = ' 1 9873 10773 9570 10773'\n",
210 | "no_bounds = ''\n",
211 | "\n",
212 | "bounds = poroa_upper\n",
213 | "data_dir = 'I:\\\\sentinel2\\\\upper\\\\envi\\\\'\n",
214 | "window = 32\n",
215 | "step = 4\n",
216 | "out_dir = f'I:\\\\sentinel2\\\\upper\\\\poroa_{window}_yearly\\\\'\n",
217 | "\n",
218 | "\n",
219 | "dic = {'primary':[f'{data_dir + x[0]}{bounds}' for x in files],\n",
220 | " 'secondary':[f'{data_dir + x[1]}{bounds}' for x in files],\n",
221 | " 'out_name':[out_dir + f'cosicorr_{os.path.basename(x[0])[7:22]}_{os.path.basename(x[1])[7:22]}.dat' for x in files]}\n",
222 | "\n",
223 | "for key in dic:\n",
224 | " with open(f'{key}.txt', 'w') as f:\n",
225 | " for line in dic[key]:\n",
226 | " f.write(line)\n",
227 | " f.write('\\n')\n",
228 | "\n",
229 | "# frequency, winMaxX, winMaxY, winMinX, winMinY, stepX, stepY, nbRobustIteration, MaskThreshold, resampling, grid\n",
230 | "options = [f'frequency {window} {window} {window} {window} {step} {step} 5 0.9 0 0'] * len(files)\n",
231 | "with open('options.txt', 'w') as f:\n",
232 | " for line in options:\n",
233 | " f.write(line)\n",
234 | " f.write('\\n')"
235 | ]
236 | },
237 | {
238 | "cell_type": "markdown",
239 | "id": "fc0c8b23-3ff0-4bdc-949d-492b3bca0ced",
240 | "metadata": {},
241 | "source": [
242 | "## Prep for MintPy"
243 | ]
244 | },
245 | {
246 | "cell_type": "code",
247 | "execution_count": 31,
248 | "id": "5ba36a0a-84fe-466a-97b0-81d9bea57c0a",
249 | "metadata": {},
250 | "outputs": [
251 | {
252 | "name": "stdout",
253 | "output_type": "stream",
254 | "text": [
255 | "/mnt/i/sentinel2/upper/poroa_32_yearly\n"
256 | ]
257 | }
258 | ],
259 | "source": [
260 | "cd /mnt/i/sentinel2/upper/poroa_32_yearly"
261 | ]
262 | },
263 | {
264 | "cell_type": "code",
265 | "execution_count": 32,
266 | "id": "14e33b3d-b089-4b71-8adc-57d9089c37ac",
267 | "metadata": {},
268 | "outputs": [
269 | {
270 | "data": {
271 | "text/plain": [
272 | "15"
273 | ]
274 | },
275 | "execution_count": 32,
276 | "metadata": {},
277 | "output_type": "execute_result"
278 | }
279 | ],
280 | "source": [
281 | "# create separate tif files for each band\n",
282 | "files = glob.glob('*.dat')\n",
283 | "files.sort()\n",
284 | "len(files)"
285 | ]
286 | },
287 | {
288 | "cell_type": "code",
289 | "execution_count": 33,
290 | "id": "457ced0d-6eb4-428d-8f3e-24403b574029",
291 | "metadata": {},
292 | "outputs": [],
293 | "source": [
294 | "for fname in files:\n",
295 | " for b, dataset in enumerate(['EWOffset','NSOffset','offsetSNR']):\n",
296 | " fname_out = f'{os.path.splitext(fname)[0]}_{dataset}.tif'\n",
297 | " ds = gdal.Open(fname)\n",
298 | " ds = gdal.Translate(fname_out, ds, bandList = [b+1])\n",
299 | " ds = None\n",
300 | "\n",
301 | "# write mintpy file\n",
302 | "files = glob.glob('*EWOffset.tif')+glob.glob('*NSOffset.tif')+glob.glob('*offsetSNR.tif')\n",
303 | "files.sort()\n",
304 | "lines = [f'{f} {f[9:17]} {f[25:33]}\\n' for f in files]\n",
305 | "with open('metadata.txt', 'w') as f:\n",
306 | " f.writelines(lines)"
307 | ]
308 | },
309 | {
310 | "cell_type": "code",
311 | "execution_count": null,
312 | "id": "c04c95d8-bf6b-41b9-8730-693167df249b",
313 | "metadata": {},
314 | "outputs": [],
315 | "source": []
316 | }
317 | ],
318 | "metadata": {
319 | "kernelspec": {
320 | "display_name": "Python 3 (ipykernel)",
321 | "language": "python",
322 | "name": "python3"
323 | },
324 | "language_info": {
325 | "codemirror_mode": {
326 | "name": "ipython",
327 | "version": 3
328 | },
329 | "file_extension": ".py",
330 | "mimetype": "text/x-python",
331 | "name": "python",
332 | "nbconvert_exporter": "python",
333 | "pygments_lexer": "ipython3",
334 | "version": "3.8.10"
335 | }
336 | },
337 | "nbformat": 4,
338 | "nbformat_minor": 5
339 | }
340 |
--------------------------------------------------------------------------------
/peg_data/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/forrestfwilliams/pixeloffset_mintpy/01710e26cb79a16a8c385d70f2b80043aa8acde2/peg_data/.DS_Store
--------------------------------------------------------------------------------
/peg_data/.ipynb_checkpoints/comparsion-checkpoint.csv:
--------------------------------------------------------------------------------
1 | ,Date,Cumulative E disp,Cumulative N disp,Name,Source
2 | 0,2016-02-06 00:00:00,0.0,0.0,Peg 05,cosicorr
3 | 1,2016-11-22 00:00:00,-1.536687970161438,-9.820199012756348,Peg 05,cosicorr
4 | 2,2017-11-22 00:00:00,4.12038516998291,-19.093372344970703,Peg 05,cosicorr
5 | 3,2019-02-25 00:00:00,4.887190818786621,-7.250380516052246,Peg 05,cosicorr
6 | 4,2019-11-22 00:00:00,4.119954586029053,-16.16533660888672,Peg 05,cosicorr
7 | 5,2021-01-30 00:00:00,2.8499908447265625,-8.145363807678223,Peg 05,cosicorr
8 | 6,2016-02-06 00:00:00,0.0,0.0,Peg 11,cosicorr
9 | 7,2016-11-22 00:00:00,0.5089700222015381,-3.387652635574341,Peg 11,cosicorr
10 | 8,2017-11-22 00:00:00,8.722000122070312,-13.677414894104004,Peg 11,cosicorr
11 | 9,2019-02-25 00:00:00,5.2726898193359375,-10.49907398223877,Peg 11,cosicorr
12 | 10,2019-11-22 00:00:00,7.431886672973633,-13.861393928527832,Peg 11,cosicorr
13 | 11,2021-01-30 00:00:00,4.315341472625732,-11.582695960998535,Peg 11,cosicorr
14 | 12,2016-02-06 00:00:00,0.0,0.0,Peg 14,cosicorr
15 | 13,2016-11-22 00:00:00,0.764194130897522,-5.324704170227051,Peg 14,cosicorr
16 | 14,2017-11-22 00:00:00,9.926322937011719,-18.295730590820312,Peg 14,cosicorr
17 | 15,2019-02-25 00:00:00,7.017014980316162,-16.9305419921875,Peg 14,cosicorr
18 | 16,2019-11-22 00:00:00,10.01329231262207,-23.08620262145996,Peg 14,cosicorr
19 | 17,2021-01-30 00:00:00,5.691682815551758,-19.611486434936523,Peg 14,cosicorr
20 | 18,2016-02-06 00:00:00,0.0,0.0,Peg 21,cosicorr
21 | 19,2016-11-22 00:00:00,3.5584323406219482,-5.917895793914795,Peg 21,cosicorr
22 | 20,2017-11-22 00:00:00,15.247777938842773,-22.924245834350586,Peg 21,cosicorr
23 | 21,2019-02-25 00:00:00,15.414938926696777,-25.891433715820312,Peg 21,cosicorr
24 | 22,2019-11-22 00:00:00,19.22612953186035,-33.626678466796875,Peg 21,cosicorr
25 | 23,2021-01-30 00:00:00,17.531524658203125,-32.218650817871094,Peg 21,cosicorr
26 | 24,2016-02-06 00:00:00,0.0,0.0,Peg 22,cosicorr
27 | 25,2016-11-22 00:00:00,-6.8488450050354,-1.6231722831726074,Peg 22,cosicorr
28 | 26,2017-11-22 00:00:00,6.236328601837158,-17.391176223754883,Peg 22,cosicorr
29 | 27,2019-02-25 00:00:00,5.178619861602783,-14.763914108276367,Peg 22,cosicorr
30 | 28,2019-11-22 00:00:00,7.485968589782715,-29.625629425048828,Peg 22,cosicorr
31 | 29,2021-01-30 00:00:00,2.763434886932373,-27.717193603515625,Peg 22,cosicorr
32 | 10,2015-07-03,0.0,0.0,Peg 22,gps
33 | 9,2015-09-30,3.752000000094995,-2.695000001229346,Peg 22,gps
34 | 8,2015-12-07,7.726865999866277,-4.648778000846505,Peg 22,gps
35 | 7,2016-03-17,7.809698000084609,-5.473954999819398,Peg 22,gps
36 | 6,2016-07-11,9.707503999816254,-6.788191501051188,Peg 22,gps
37 | 5,2016-10-23,15.169979999773204,-10.196236500516534,Peg 22,gps
38 | 4,2016-12-14,17.295319999800995,-11.462829501368104,Peg 22,gps
39 | 3,2017-03-20,18.718166999751706,-12.320733500644565,Peg 22,gps
40 | 2,2017-06-29,24.40433299983852,-15.587474500760436,Peg 22,gps
41 | 1,2017-10-11,32.9932719997596,-20.382386500947177,Peg 22,gps
42 | 0,2018-03-27,42.167439999757335,-25.27914050128311,Peg 22,gps
43 | 12,2015-07-03,0.0,0.0,Peg 21,gps
44 | 11,2015-09-30,1.2570000002160668,-3.049000001512468,Peg 21,gps
45 | 10,2015-12-07,3.358866000082344,-4.993778001517057,Peg 21,gps
46 | 9,2016-03-17,2.263073000125587,-5.439065000042319,Peg 21,gps
47 | 8,2016-07-11,2.623841000022366,-6.452151501551271,Peg 21,gps
48 | 7,2016-10-23,3.850464999908581,-9.414110501296818,Peg 21,gps
49 | 6,2016-12-14,4.2682260000146925,-10.421396501362324,Peg 21,gps
50 | 5,2017-03-20,4.521760999923572,-11.090236501768231,Peg 21,gps
51 | 4,2017-06-29,5.790555999847129,-13.971202501095831,Peg 21,gps
52 | 3,2017-10-11,7.89700199989602,-18.246762501075864,Peg 21,gps
53 | 2,2018-03-27,9.259646999882534,-20.971088501624763,Peg 21,gps
54 | 1,2018-10-09,12.483143999939784,-27.046539501287043,Peg 21,gps
55 | 0,2019-12-18,20.35600099992007,-39.37670850101858,Peg 21,gps
56 | 12,2015-07-03,0.0,0.0,Peg 14,gps
57 | 11,2015-09-30,0.1250000002328306,-0.5750000001862645,Peg 14,gps
58 | 10,2015-12-07,0.1938660000450909,-0.8927780007943511,Peg 14,gps
59 | 9,2016-03-17,0.2877270001918077,-1.2104699993506074,Peg 14,gps
60 | 8,2016-07-11,0.4053809999022633,-1.558058500289917,Peg 14,gps
61 | 7,2016-10-23,0.5601359999272972,-2.5195605009794235,Peg 14,gps
62 | 6,2016-12-14,0.6341889998875558,-2.911539500579238,Peg 14,gps
63 | 5,2017-03-20,0.7227069998625666,-3.2706115003675222,Peg 14,gps
64 | 4,2017-06-29,0.8960730000399053,-4.040582500398159,Peg 14,gps
65 | 3,2017-10-11,1.1864829999394717,-5.2919415002688766,Peg 14,gps
66 | 2,2018-03-27,1.5126320000272244,-6.5181215004995465,Peg 14,gps
67 | 1,2018-10-09,1.9645060000475496,-8.288911500945687,Peg 14,gps
68 | 0,2020-02-20,2.626092999940738,-10.650951500982046,Peg 14,gps
69 | 10,2015-07-03,0.0,0.0,Peg 11,gps
70 | 9,2015-12-07,0.0158659999724477,-0.3417780008167028,Peg 11,gps
71 | 8,2016-03-17,0.0522460001520812,-0.4604399995878339,Peg 11,gps
72 | 7,2016-07-11,0.0373129998333752,-0.6527145011350513,Peg 11,gps
73 | 6,2016-10-23,0.1067309998907148,-1.1083825007081032,Peg 11,gps
74 | 5,2017-03-20,0.1182249998673796,-1.371377500705421,Peg 11,gps
75 | 4,2017-06-29,0.1631769998930394,-1.6502925008535383,Peg 11,gps
76 | 3,2017-10-11,0.2515069998335093,-2.1469265008345246,Peg 11,gps
77 | 2,2018-03-27,0.3082099999301135,-2.6593175008893013,Peg 11,gps
78 | 1,2018-10-09,0.3908769998233765,-3.404787501320243,Peg 11,gps
79 | 0,2020-02-20,0.5154319999273866,-4.504336500540376,Peg 11,gps
80 | 12,2015-07-03,0.0,0.0,Peg 05,gps
81 | 11,2015-09-30,-0.0159999998286366,-0.069000001065433,Peg 05,gps
82 | 10,2015-12-07,-0.015133999986574,-0.065778000280261,Peg 05,gps
83 | 9,2016-03-17,0.0175730001647025,-0.0753419995307922,Peg 05,gps
84 | 8,2016-07-11,-0.0309310001321136,-0.126927500590682,Peg 05,gps
85 | 7,2016-10-23,-0.0272630001418292,-0.2224265011027455,Peg 05,gps
86 | 6,2016-12-14,-0.0468640001490712,-0.2861585011705756,Peg 05,gps
87 | 5,2017-03-20,-0.0167849999852478,-0.2952815005555749,Peg 05,gps
88 | 4,2017-06-29,-0.0653940001502633,-0.3470845008268952,Peg 05,gps
89 | 3,2017-10-11,-0.0742320001590997,-0.4345645010471344,Peg 05,gps
90 | 2,2018-03-27,-0.0927930001635104,-0.507234500721097,Peg 05,gps
91 | 1,2018-10-09,-0.1047239999752491,-0.6717345006763935,Peg 05,gps
92 | 0,2019-12-18,-0.1100260000675916,-0.850903500802815,Peg 05,gps
93 |
--------------------------------------------------------------------------------
/peg_data/Rangitikei Landslide_peg displacement_sample.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/forrestfwilliams/pixeloffset_mintpy/01710e26cb79a16a8c385d70f2b80043aa8acde2/peg_data/Rangitikei Landslide_peg displacement_sample.xlsx
--------------------------------------------------------------------------------
/peg_data/Reformatted Peg Data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/forrestfwilliams/pixeloffset_mintpy/01710e26cb79a16a8c385d70f2b80043aa8acde2/peg_data/Reformatted Peg Data.xlsx
--------------------------------------------------------------------------------
/peg_data/Survey Peg Movement_Analysis_November2020.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/forrestfwilliams/pixeloffset_mintpy/01710e26cb79a16a8c385d70f2b80043aa8acde2/peg_data/Survey Peg Movement_Analysis_November2020.xlsx
--------------------------------------------------------------------------------
/peg_data/comparsion.csv:
--------------------------------------------------------------------------------
1 | Date,Cumulative E disp,Cumulative N disp,Name,Source
2 | 2016-02-06,0.0,0.0,Peg 05,cosicorr
3 | 2016-11-22,-2.12619686126709,-7.40826940536499,Peg 05,cosicorr
4 | 2017-04-21,-0.3216954469680786,-3.1900691986083984,Peg 05,cosicorr
5 | 2017-05-01,1.669453501701355,-2.556051731109619,Peg 05,cosicorr
6 | 2017-08-04,-1.3193892240524292,-4.218697547912598,Peg 05,cosicorr
7 | 2017-10-13,-2.1197619438171387,-6.621015548706055,Peg 05,cosicorr
8 | 2017-11-22,-1.89453125,-8.738809585571289,Peg 05,cosicorr
9 | 2018-03-17,1.6164679527282715,-3.5588455200195312,Peg 05,cosicorr
10 | 2018-07-05,0.09667038917541504,-4.016844272613525,Peg 05,cosicorr
11 | 2018-10-18,-2.0574848651885986,-7.481711387634277,Peg 05,cosicorr
12 | 2019-03-02,3.640730142593384,-2.303892135620117,Peg 05,cosicorr
13 | 2019-11-02,-2.3677895069122314,-7.9740800857543945,Peg 05,cosicorr
14 | 2019-11-22,-2.4496395587921143,-6.599796772003174,Peg 05,cosicorr
15 | 2020-02-10,-1.216424822807312,-4.846120357513428,Peg 05,cosicorr
16 | 2020-03-31,2.1939640045166016,-3.0034189224243164,Peg 05,cosicorr
17 | 2020-04-10,-0.044912099838256836,-2.322197437286377,Peg 05,cosicorr
18 | 2020-07-09,-0.4572748839855194,-4.3796234130859375,Peg 05,cosicorr
19 | 2020-08-03,0.05821314454078674,-5.035052299499512,Peg 05,cosicorr
20 | 2020-12-16,-2.6564812660217285,0.9511890411376953,Peg 05,cosicorr
21 | 2021-01-25,-5.031060218811035,-1.9222724437713623,Peg 05,cosicorr
22 | 2021-02-19,-4.354963302612305,-6.476410865783691,Peg 05,cosicorr
23 | 2021-03-16,-2.1101253032684326,-4.2392988204956055,Peg 05,cosicorr
24 | 2016-02-06,0.0,0.0,Peg 11,cosicorr
25 | 2016-11-22,0.289191335439682,-1.984093427658081,Peg 11,cosicorr
26 | 2017-04-21,0.231583833694458,-5.069357395172119,Peg 11,cosicorr
27 | 2017-05-01,0.200524240732193,-4.709085464477539,Peg 11,cosicorr
28 | 2017-08-04,0.09682957828044891,-4.656291484832764,Peg 11,cosicorr
29 | 2017-10-13,0.7647183537483215,-4.33756160736084,Peg 11,cosicorr
30 | 2017-11-22,0.6200620532035828,-3.7235107421875,Peg 11,cosicorr
31 | 2018-03-17,-0.264392614364624,-5.278883457183838,Peg 11,cosicorr
32 | 2018-07-05,0.7266903519630432,-5.712875843048096,Peg 11,cosicorr
33 | 2018-10-18,1.0193500518798828,-5.837764739990234,Peg 11,cosicorr
34 | 2019-03-02,-0.047499656677246094,-6.255722522735596,Peg 11,cosicorr
35 | 2019-11-02,0.598666787147522,-7.019507884979248,Peg 11,cosicorr
36 | 2019-11-22,0.23057293891906738,-6.65059757232666,Peg 11,cosicorr
37 | 2020-02-10,-0.5899602174758911,-7.929132461547852,Peg 11,cosicorr
38 | 2020-03-31,0.4753214120864868,-8.771657943725586,Peg 11,cosicorr
39 | 2020-04-10,0.05685102939605713,-9.527230262756348,Peg 11,cosicorr
40 | 2020-07-09,1.0077781677246094,-8.285053253173828,Peg 11,cosicorr
41 | 2020-08-03,0.7218272686004639,-7.855320453643799,Peg 11,cosicorr
42 | 2020-12-16,1.1768585443496704,-6.586552619934082,Peg 11,cosicorr
43 | 2021-01-25,1.9099857807159424,-5.6834259033203125,Peg 11,cosicorr
44 | 2021-02-19,0.5393393039703369,-7.37200403213501,Peg 11,cosicorr
45 | 2021-03-16,0.4377332329750061,-8.698670387268066,Peg 11,cosicorr
46 | 2016-02-06,0.0,0.0,Peg 14,cosicorr
47 | 2016-11-22,-0.050787318497896194,-3.2396154403686523,Peg 14,cosicorr
48 | 2017-04-21,0.09801304340362549,-7.915117263793945,Peg 14,cosicorr
49 | 2017-05-01,-0.1906374990940094,-8.304161071777344,Peg 14,cosicorr
50 | 2017-08-04,0.2436300814151764,-7.234498977661133,Peg 14,cosicorr
51 | 2017-10-13,0.8685922622680664,-7.276066780090332,Peg 14,cosicorr
52 | 2017-11-22,1.4340537786483765,-6.532399654388428,Peg 14,cosicorr
53 | 2018-03-17,0.9170000553131104,-8.433046340942383,Peg 14,cosicorr
54 | 2018-07-05,1.4285924434661865,-10.202543258666992,Peg 14,cosicorr
55 | 2018-10-18,1.8019039630889893,-10.33924674987793,Peg 14,cosicorr
56 | 2019-03-02,1.1595005989074707,-10.352168083190918,Peg 14,cosicorr
57 | 2019-11-02,2.434000015258789,-12.264820098876953,Peg 14,cosicorr
58 | 2019-11-22,2.265246868133545,-11.378128051757812,Peg 14,cosicorr
59 | 2020-02-10,0.9337693452835083,-12.414868354797363,Peg 14,cosicorr
60 | 2020-03-31,1.842986822128296,-12.825793266296387,Peg 14,cosicorr
61 | 2020-04-10,1.3325214385986328,-13.37136459350586,Peg 14,cosicorr
62 | 2020-07-09,2.2022705078125,-13.479918479919434,Peg 14,cosicorr
63 | 2020-08-03,2.2263548374176025,-12.123886108398438,Peg 14,cosicorr
64 | 2020-12-16,2.8892288208007812,-12.492697715759277,Peg 14,cosicorr
65 | 2021-01-25,3.6799187660217285,-11.848355293273926,Peg 14,cosicorr
66 | 2021-02-19,1.6783983707427979,-12.774500846862793,Peg 14,cosicorr
67 | 2021-03-16,1.1650758981704712,-13.664567947387695,Peg 14,cosicorr
68 | 2016-02-06,0.0,0.0,Peg 21,cosicorr
69 | 2016-11-22,-1.6392301321029663,7.623940467834473,Peg 21,cosicorr
70 | 2017-04-21,2.434833526611328,-7.906887054443359,Peg 21,cosicorr
71 | 2017-05-01,1.893317699432373,-8.224690437316895,Peg 21,cosicorr
72 | 2017-08-04,2.705691337585449,-3.686817169189453,Peg 21,cosicorr
73 | 2017-10-13,1.5696096420288086,-0.7632584571838379,Peg 21,cosicorr
74 | 2017-11-22,1.7234312295913696,-0.444196492433548,Peg 21,cosicorr
75 | 2018-03-17,6.177772521972656,-13.12923526763916,Peg 21,cosicorr
76 | 2018-07-05,3.9702258110046387,-12.110824584960938,Peg 21,cosicorr
77 | 2018-10-18,3.972878932952881,-7.6459550857543945,Peg 21,cosicorr
78 | 2019-03-02,7.475826263427734,-18.137470245361328,Peg 21,cosicorr
79 | 2019-11-02,5.601415157318115,-13.093137741088867,Peg 21,cosicorr
80 | 2019-11-22,5.210293292999268,-12.040626525878906,Peg 21,cosicorr
81 | 2020-02-10,8.810795783996582,-18.856050491333008,Peg 21,cosicorr
82 | 2020-03-31,9.57519245147705,-24.851041793823242,Peg 21,cosicorr
83 | 2020-04-10,8.974432945251465,-24.875919342041016,Peg 21,cosicorr
84 | 2020-07-09,7.010295867919922,-19.610437393188477,Peg 21,cosicorr
85 | 2020-08-03,8.787994384765625,-18.57085418701172,Peg 21,cosicorr
86 | 2020-12-16,6.905325889587402,-14.280370712280273,Peg 21,cosicorr
87 | 2021-01-25,4.252039909362793,-6.757561683654785,Peg 21,cosicorr
88 | 2021-02-19,11.49251937866211,-25.167560577392578,Peg 21,cosicorr
89 | 2021-03-16,10.552685737609863,-27.264387130737305,Peg 21,cosicorr
90 | 2016-02-06,0.0,0.0,Peg 22,cosicorr
91 | 2016-11-22,-29.08744239807129,-9.999930381774902,Peg 22,cosicorr
92 | 2017-04-21,-0.7243690490722656,-18.969478607177734,Peg 22,cosicorr
93 | 2017-05-01,-2.969515323638916,-18.2125186920166,Peg 22,cosicorr
94 | 2017-08-04,-6.42390251159668,-19.155057907104492,Peg 22,cosicorr
95 | 2017-10-13,0.954014778137207,-20.22467803955078,Peg 22,cosicorr
96 | 2017-11-22,-18.100582122802734,-16.35075569152832,Peg 22,cosicorr
97 | 2018-03-17,-13.922697067260742,-14.353788375854492,Peg 22,cosicorr
98 | 2018-07-05,-4.417654037475586,-21.025156021118164,Peg 22,cosicorr
99 | 2018-10-18,-0.4248311519622803,-23.76163673400879,Peg 22,cosicorr
100 | 2019-03-02,-10.936479568481445,-17.812761306762695,Peg 22,cosicorr
101 | 2019-11-02,-2.788729667663574,-27.07455062866211,Peg 22,cosicorr
102 | 2019-11-22,-16.477699279785156,-26.123050689697266,Peg 22,cosicorr
103 | 2020-02-10,-10.492009162902832,-27.878713607788086,Peg 22,cosicorr
104 | 2020-03-31,-6.5355939865112305,-22.53898811340332,Peg 22,cosicorr
105 | 2020-04-10,-6.596095561981201,-23.418048858642578,Peg 22,cosicorr
106 | 2020-07-09,-0.3053450584411621,-24.121458053588867,Peg 22,cosicorr
107 | 2020-08-03,-2.924588203430176,-23.460229873657227,Peg 22,cosicorr
108 | 2020-12-16,-15.471522331237793,-28.492727279663086,Peg 22,cosicorr
109 | 2021-01-25,-17.016674041748047,-29.805185317993164,Peg 22,cosicorr
110 | 2021-02-19,-6.825654029846191,-26.365482330322266,Peg 22,cosicorr
111 | 2021-03-16,-4.891918182373047,-24.665868759155273,Peg 22,cosicorr
112 | 2015-07-03,0.0,0.0,Peg 05,gps
113 | 2015-09-30,-0.0159999998286366,-0.069000001065433,Peg 05,gps
114 | 2015-12-07,-0.015133999986574,-0.065778000280261,Peg 05,gps
115 | 2016-03-17,0.0175730001647025,-0.0753419995307922,Peg 05,gps
116 | 2016-07-11,-0.0309310001321136,-0.126927500590682,Peg 05,gps
117 | 2016-10-23,-0.0272630001418292,-0.2224265011027455,Peg 05,gps
118 | 2016-12-14,-0.0468640001490712,-0.2861585011705756,Peg 05,gps
119 | 2017-03-20,-0.0167849999852478,-0.2952815005555749,Peg 05,gps
120 | 2017-06-29,-0.0653940001502633,-0.3470845008268952,Peg 05,gps
121 | 2017-10-11,-0.0742320001590997,-0.4345645010471344,Peg 05,gps
122 | 2018-03-27,-0.0927930001635104,-0.507234500721097,Peg 05,gps
123 | 2018-10-09,-0.1047239999752491,-0.6717345006763935,Peg 05,gps
124 | 2019-12-18,-0.1100260000675916,-0.850903500802815,Peg 05,gps
125 | 2015-07-03,0.0,0.0,Peg 11,gps
126 | 2015-12-07,0.0158659999724477,-0.3417780008167028,Peg 11,gps
127 | 2016-03-17,0.0522460001520812,-0.4604399995878339,Peg 11,gps
128 | 2016-07-11,0.0373129998333752,-0.6527145011350513,Peg 11,gps
129 | 2016-10-23,0.1067309998907148,-1.1083825007081032,Peg 11,gps
130 | 2017-03-20,0.1182249998673796,-1.371377500705421,Peg 11,gps
131 | 2017-06-29,0.1631769998930394,-1.6502925008535383,Peg 11,gps
132 | 2017-10-11,0.2515069998335093,-2.1469265008345246,Peg 11,gps
133 | 2018-03-27,0.3082099999301135,-2.6593175008893013,Peg 11,gps
134 | 2018-10-09,0.3908769998233765,-3.404787501320243,Peg 11,gps
135 | 2020-02-20,0.5154319999273866,-4.504336500540376,Peg 11,gps
136 | 2015-07-03,0.0,0.0,Peg 14,gps
137 | 2015-09-30,0.1250000002328306,-0.5750000001862645,Peg 14,gps
138 | 2015-12-07,0.1938660000450909,-0.8927780007943511,Peg 14,gps
139 | 2016-03-17,0.2877270001918077,-1.2104699993506074,Peg 14,gps
140 | 2016-07-11,0.4053809999022633,-1.558058500289917,Peg 14,gps
141 | 2016-10-23,0.5601359999272972,-2.5195605009794235,Peg 14,gps
142 | 2016-12-14,0.6341889998875558,-2.911539500579238,Peg 14,gps
143 | 2017-03-20,0.7227069998625666,-3.2706115003675222,Peg 14,gps
144 | 2017-06-29,0.8960730000399053,-4.040582500398159,Peg 14,gps
145 | 2017-10-11,1.1864829999394717,-5.2919415002688766,Peg 14,gps
146 | 2018-03-27,1.5126320000272244,-6.5181215004995465,Peg 14,gps
147 | 2018-10-09,1.9645060000475496,-8.288911500945687,Peg 14,gps
148 | 2020-02-20,2.626092999940738,-10.650951500982046,Peg 14,gps
149 | 2015-07-03,0.0,0.0,Peg 21,gps
150 | 2015-09-30,1.2570000002160668,-3.049000001512468,Peg 21,gps
151 | 2015-12-07,3.358866000082344,-4.993778001517057,Peg 21,gps
152 | 2016-03-17,2.263073000125587,-5.439065000042319,Peg 21,gps
153 | 2016-07-11,2.623841000022366,-6.452151501551271,Peg 21,gps
154 | 2016-10-23,3.850464999908581,-9.414110501296818,Peg 21,gps
155 | 2016-12-14,4.2682260000146925,-10.421396501362324,Peg 21,gps
156 | 2017-03-20,4.521760999923572,-11.090236501768231,Peg 21,gps
157 | 2017-06-29,5.790555999847129,-13.971202501095831,Peg 21,gps
158 | 2017-10-11,7.89700199989602,-18.246762501075864,Peg 21,gps
159 | 2018-03-27,9.259646999882534,-20.971088501624763,Peg 21,gps
160 | 2018-10-09,12.483143999939784,-27.046539501287043,Peg 21,gps
161 | 2019-12-18,20.35600099992007,-39.37670850101858,Peg 21,gps
162 | 2015-07-03,0.0,0.0,Peg 22,gps
163 | 2015-09-30,3.752000000094995,-2.695000001229346,Peg 22,gps
164 | 2015-12-07,7.726865999866277,-4.648778000846505,Peg 22,gps
165 | 2016-03-17,7.809698000084609,-5.473954999819398,Peg 22,gps
166 | 2016-07-11,9.707503999816254,-6.788191501051188,Peg 22,gps
167 | 2016-10-23,15.169979999773204,-10.196236500516534,Peg 22,gps
168 | 2016-12-14,17.295319999800995,-11.462829501368104,Peg 22,gps
169 | 2017-03-20,18.718166999751706,-12.320733500644565,Peg 22,gps
170 | 2017-06-29,24.40433299983852,-15.587474500760436,Peg 22,gps
171 | 2017-10-11,32.9932719997596,-20.382386500947177,Peg 22,gps
172 | 2018-03-27,42.167439999757335,-25.27914050128311,Peg 22,gps
173 |
--------------------------------------------------------------------------------
/peg_data/comparsion_dd.csv:
--------------------------------------------------------------------------------
1 | ,Date,Cumulative E disp,Cumulative N disp,Name,Source
2 | 0,2016-02-06 00:00:00,0.0,0.0,Peg 05,cosicorr
3 | 1,2016-11-22 00:00:00,-0.026700181886553764,0.4394740164279938,Peg 05,cosicorr
4 | 2,2017-11-22 00:00:00,0.6356710195541382,2.4578893184661865,Peg 05,cosicorr
5 | 3,2019-02-25 00:00:00,0.16782206296920776,-1.4980812072753906,Peg 05,cosicorr
6 | 4,2019-11-22 00:00:00,1.24922776222229,0.8221392631530762,Peg 05,cosicorr
7 | 5,2021-01-30 00:00:00,-1.1848781108856201,0.06152063608169556,Peg 05,cosicorr
8 | 6,2016-02-06 00:00:00,0.0,0.0,Peg 11,cosicorr
9 | 7,2016-11-22 00:00:00,-0.12107490003108978,0.19417162239551544,Peg 11,cosicorr
10 | 8,2017-11-22 00:00:00,-0.6764111518859863,0.11810605227947235,Peg 11,cosicorr
11 | 9,2019-02-25 00:00:00,1.2463068962097168,0.7974262833595276,Peg 11,cosicorr
12 | 10,2019-11-22 00:00:00,0.06413590908050537,1.0171921253204346,Peg 11,cosicorr
13 | 11,2021-01-30 00:00:00,-0.6612834334373474,0.0900229811668396,Peg 11,cosicorr
14 | 12,2016-02-06 00:00:00,0.0,0.0,Peg 14,cosicorr
15 | 13,2016-11-22 00:00:00,0.2403384894132614,-1.318016529083252,Peg 14,cosicorr
16 | 14,2017-11-22 00:00:00,-0.4350019097328186,-0.9032098054885864,Peg 14,cosicorr
17 | 15,2019-02-25 00:00:00,0.8258458971977234,0.02252727746963501,Peg 14,cosicorr
18 | 16,2019-11-22 00:00:00,-0.6311827301979065,2.1986985206604004,Peg 14,cosicorr
19 | 17,2021-01-30 00:00:00,-0.24065086245536804,1.937610149383545,Peg 14,cosicorr
20 | 18,2016-02-06 00:00:00,0.0,0.0,Peg 21,cosicorr
21 | 19,2016-11-22 00:00:00,1.3848081827163696,-2.348700761795044,Peg 21,cosicorr
22 | 20,2017-11-22 00:00:00,-1.6448534727096558,4.154672622680664,Peg 21,cosicorr
23 | 21,2019-02-25 00:00:00,-2.2514660358428955,7.846601486206055,Peg 21,cosicorr
24 | 22,2019-11-22 00:00:00,-3.8865275382995605,10.712757110595703,Peg 21,cosicorr
25 | 23,2021-01-30 00:00:00,-6.243865013122559,16.664033889770508,Peg 21,cosicorr
26 | 24,2016-02-06 00:00:00,0.0,0.0,Peg 22,cosicorr
27 | 25,2016-11-22 00:00:00,3.626246929168701,-2.3464622497558594,Peg 22,cosicorr
28 | 26,2017-11-22 00:00:00,1.5784344673156738,2.480820655822754,Peg 22,cosicorr
29 | 27,2019-02-25 00:00:00,0.8276139497756958,6.206935405731201,Peg 22,cosicorr
30 | 28,2019-11-22 00:00:00,-0.16316789388656616,7.606389045715332,Peg 22,cosicorr
31 | 29,2021-01-30 00:00:00,1.0439796447753906,12.77413272857666,Peg 22,cosicorr
32 | 10,2015-07-03,0.0,0.0,Peg 22,gps
33 | 9,2015-09-30,3.752000000094995,-2.695000001229346,Peg 22,gps
34 | 8,2015-12-07,7.726865999866277,-4.648778000846505,Peg 22,gps
35 | 7,2016-03-17,7.809698000084609,-5.473954999819398,Peg 22,gps
36 | 6,2016-07-11,9.707503999816254,-6.788191501051188,Peg 22,gps
37 | 5,2016-10-23,15.169979999773204,-10.196236500516534,Peg 22,gps
38 | 4,2016-12-14,17.295319999800995,-11.462829501368104,Peg 22,gps
39 | 3,2017-03-20,18.718166999751706,-12.320733500644565,Peg 22,gps
40 | 2,2017-06-29,24.40433299983852,-15.587474500760436,Peg 22,gps
41 | 1,2017-10-11,32.9932719997596,-20.382386500947177,Peg 22,gps
42 | 0,2018-03-27,42.167439999757335,-25.27914050128311,Peg 22,gps
43 | 12,2015-07-03,0.0,0.0,Peg 21,gps
44 | 11,2015-09-30,1.2570000002160668,-3.049000001512468,Peg 21,gps
45 | 10,2015-12-07,3.358866000082344,-4.993778001517057,Peg 21,gps
46 | 9,2016-03-17,2.263073000125587,-5.439065000042319,Peg 21,gps
47 | 8,2016-07-11,2.623841000022366,-6.452151501551271,Peg 21,gps
48 | 7,2016-10-23,3.850464999908581,-9.414110501296818,Peg 21,gps
49 | 6,2016-12-14,4.2682260000146925,-10.421396501362324,Peg 21,gps
50 | 5,2017-03-20,4.521760999923572,-11.090236501768231,Peg 21,gps
51 | 4,2017-06-29,5.790555999847129,-13.971202501095831,Peg 21,gps
52 | 3,2017-10-11,7.89700199989602,-18.246762501075864,Peg 21,gps
53 | 2,2018-03-27,9.259646999882534,-20.971088501624763,Peg 21,gps
54 | 1,2018-10-09,12.483143999939784,-27.046539501287043,Peg 21,gps
55 | 0,2019-12-18,20.35600099992007,-39.37670850101858,Peg 21,gps
56 | 12,2015-07-03,0.0,0.0,Peg 14,gps
57 | 11,2015-09-30,0.1250000002328306,-0.5750000001862645,Peg 14,gps
58 | 10,2015-12-07,0.1938660000450909,-0.8927780007943511,Peg 14,gps
59 | 9,2016-03-17,0.2877270001918077,-1.2104699993506074,Peg 14,gps
60 | 8,2016-07-11,0.4053809999022633,-1.558058500289917,Peg 14,gps
61 | 7,2016-10-23,0.5601359999272972,-2.5195605009794235,Peg 14,gps
62 | 6,2016-12-14,0.6341889998875558,-2.911539500579238,Peg 14,gps
63 | 5,2017-03-20,0.7227069998625666,-3.2706115003675222,Peg 14,gps
64 | 4,2017-06-29,0.8960730000399053,-4.040582500398159,Peg 14,gps
65 | 3,2017-10-11,1.1864829999394717,-5.2919415002688766,Peg 14,gps
66 | 2,2018-03-27,1.5126320000272244,-6.5181215004995465,Peg 14,gps
67 | 1,2018-10-09,1.9645060000475496,-8.288911500945687,Peg 14,gps
68 | 0,2020-02-20,2.626092999940738,-10.650951500982046,Peg 14,gps
69 | 10,2015-07-03,0.0,0.0,Peg 11,gps
70 | 9,2015-12-07,0.0158659999724477,-0.3417780008167028,Peg 11,gps
71 | 8,2016-03-17,0.0522460001520812,-0.4604399995878339,Peg 11,gps
72 | 7,2016-07-11,0.0373129998333752,-0.6527145011350513,Peg 11,gps
73 | 6,2016-10-23,0.1067309998907148,-1.1083825007081032,Peg 11,gps
74 | 5,2017-03-20,0.1182249998673796,-1.371377500705421,Peg 11,gps
75 | 4,2017-06-29,0.1631769998930394,-1.6502925008535383,Peg 11,gps
76 | 3,2017-10-11,0.2515069998335093,-2.1469265008345246,Peg 11,gps
77 | 2,2018-03-27,0.3082099999301135,-2.6593175008893013,Peg 11,gps
78 | 1,2018-10-09,0.3908769998233765,-3.404787501320243,Peg 11,gps
79 | 0,2020-02-20,0.5154319999273866,-4.504336500540376,Peg 11,gps
80 | 12,2015-07-03,0.0,0.0,Peg 05,gps
81 | 11,2015-09-30,-0.0159999998286366,-0.069000001065433,Peg 05,gps
82 | 10,2015-12-07,-0.015133999986574,-0.065778000280261,Peg 05,gps
83 | 9,2016-03-17,0.0175730001647025,-0.0753419995307922,Peg 05,gps
84 | 8,2016-07-11,-0.0309310001321136,-0.126927500590682,Peg 05,gps
85 | 7,2016-10-23,-0.0272630001418292,-0.2224265011027455,Peg 05,gps
86 | 6,2016-12-14,-0.0468640001490712,-0.2861585011705756,Peg 05,gps
87 | 5,2017-03-20,-0.0167849999852478,-0.2952815005555749,Peg 05,gps
88 | 4,2017-06-29,-0.0653940001502633,-0.3470845008268952,Peg 05,gps
89 | 3,2017-10-11,-0.0742320001590997,-0.4345645010471344,Peg 05,gps
90 | 2,2018-03-27,-0.0927930001635104,-0.507234500721097,Peg 05,gps
91 | 1,2018-10-09,-0.1047239999752491,-0.6717345006763935,Peg 05,gps
92 | 0,2019-12-18,-0.1100260000675916,-0.850903500802815,Peg 05,gps
93 |
--------------------------------------------------------------------------------
/peg_data/comparsion_local.csv:
--------------------------------------------------------------------------------
1 | ,Date,Cumulative E disp,Cumulative N disp,Name,Source
2 | 0,2016-02-06 00:00:00,0.0,0.0,Peg 05,cosicorr
3 | 1,2016-11-22 00:00:00,0.7046433091163635,-2.4256277084350586,Peg 05,cosicorr
4 | 2,2017-04-21 00:00:00,3.3146276473999023,1.9564285278320312,Peg 05,cosicorr
5 | 3,2017-05-01 00:00:00,0.9512653350830078,0.2016146183013916,Peg 05,cosicorr
6 | 4,2017-05-21 00:00:00,0.9890015721321106,0.07568886876106262,Peg 05,cosicorr
7 | 5,2017-08-04 00:00:00,1.1878383159637451,-1.4047049283981323,Peg 05,cosicorr
8 | 6,2017-10-13 00:00:00,0.6474446058273315,-2.0317676067352295,Peg 05,cosicorr
9 | 7,2017-11-22 00:00:00,-0.2520192861557007,-2.86905837059021,Peg 05,cosicorr
10 | 8,2018-03-17 00:00:00,0.25102686882019043,-0.4897572994232178,Peg 05,cosicorr
11 | 9,2018-07-05 00:00:00,2.6522879600524902,2.776510715484619,Peg 05,cosicorr
12 | 10,2018-10-18 00:00:00,0.3037710189819336,-1.3423051834106445,Peg 05,cosicorr
13 | 11,2019-01-16 00:00:00,4.154426574707031,-2.902397394180298,Peg 05,cosicorr
14 | 12,2019-03-02 00:00:00,-0.12093114852905273,1.425022840499878,Peg 05,cosicorr
15 | 13,2019-11-02 00:00:00,-0.2450830638408661,-2.9342687129974365,Peg 05,cosicorr
16 | 14,2019-11-22 00:00:00,-0.18335619568824768,-2.434691905975342,Peg 05,cosicorr
17 | 15,2020-01-16 00:00:00,-0.22556787729263306,-0.5163522958755493,Peg 05,cosicorr
18 | 16,2020-02-10 00:00:00,0.7041599750518799,-0.3737693428993225,Peg 05,cosicorr
19 | 17,2020-03-11 00:00:00,0.6719288229942322,2.468656539916992,Peg 05,cosicorr
20 | 18,2020-03-31 00:00:00,0.4287033975124359,0.47802770137786865,Peg 05,cosicorr
21 | 19,2020-04-10 00:00:00,0.6312656998634338,1.378617763519287,Peg 05,cosicorr
22 | 20,2020-07-09 00:00:00,-2.0180506706237793,1.2975860834121704,Peg 05,cosicorr
23 | 21,2020-08-03 00:00:00,1.571577787399292,-2.117785930633545,Peg 05,cosicorr
24 | 22,2020-12-16 00:00:00,-1.7735295295715332,9.64133071899414,Peg 05,cosicorr
25 | 23,2021-01-25 00:00:00,-2.881016254425049,6.269132614135742,Peg 05,cosicorr
26 | 24,2021-02-19 00:00:00,-6.783956527709961,-0.6426429748535156,Peg 05,cosicorr
27 | 25,2021-03-16 00:00:00,-5.331975936889648,-2.1549229621887207,Peg 05,cosicorr
28 | 26,2016-02-06 00:00:00,0.0,0.0,Peg 11,cosicorr
29 | 27,2016-11-22 00:00:00,0.9768499732017517,-1.1745681762695312,Peg 11,cosicorr
30 | 28,2017-04-21 00:00:00,0.2000974416732788,-5.755038261413574,Peg 11,cosicorr
31 | 29,2017-05-01 00:00:00,-0.08555889129638672,-5.519522190093994,Peg 11,cosicorr
32 | 30,2017-05-21 00:00:00,0.3335866630077362,-5.791182041168213,Peg 11,cosicorr
33 | 31,2017-08-04 00:00:00,0.3165815770626068,-7.925702095031738,Peg 11,cosicorr
34 | 32,2017-10-13 00:00:00,1.1423206329345703,-4.581782817840576,Peg 11,cosicorr
35 | 33,2017-11-22 00:00:00,1.604773759841919,-3.3845815658569336,Peg 11,cosicorr
36 | 34,2018-03-17 00:00:00,0.07501423358917236,-5.909722328186035,Peg 11,cosicorr
37 | 35,2018-07-05 00:00:00,1.1223565340042114,-9.027538299560547,Peg 11,cosicorr
38 | 36,2018-10-18 00:00:00,1.244884967803955,-6.396243095397949,Peg 11,cosicorr
39 | 37,2019-01-16 00:00:00,1.911393642425537,-4.203003883361816,Peg 11,cosicorr
40 | 38,2019-03-02 00:00:00,0.05208420753479004,-6.737990379333496,Peg 11,cosicorr
41 | 39,2019-11-02 00:00:00,1.1713464260101318,-7.717543601989746,Peg 11,cosicorr
42 | 40,2019-11-22 00:00:00,0.926616907119751,-7.252964973449707,Peg 11,cosicorr
43 | 41,2020-01-16 00:00:00,0.4874272644519806,-6.637289047241211,Peg 11,cosicorr
44 | 42,2020-02-10 00:00:00,0.22808653116226196,-8.443567276000977,Peg 11,cosicorr
45 | 43,2020-03-11 00:00:00,-0.055647462606430054,-9.634103775024414,Peg 11,cosicorr
46 | 44,2020-03-31 00:00:00,0.4476431906223297,-9.19466781616211,Peg 11,cosicorr
47 | 45,2020-04-10 00:00:00,0.14026710391044617,-10.316967010498047,Peg 11,cosicorr
48 | 46,2020-07-09 00:00:00,1.3746258020401,-12.143938064575195,Peg 11,cosicorr
49 | 47,2020-08-03 00:00:00,0.7811291813850403,-10.929167747497559,Peg 11,cosicorr
50 | 48,2020-12-16 00:00:00,2.6712563037872314,-6.103105068206787,Peg 11,cosicorr
51 | 49,2021-01-25 00:00:00,2.49507737159729,-5.860330104827881,Peg 11,cosicorr
52 | 50,2021-02-19 00:00:00,1.3637745380401611,-7.782742500305176,Peg 11,cosicorr
53 | 51,2021-03-16 00:00:00,0.8511472940444946,-9.373276710510254,Peg 11,cosicorr
54 | 52,2016-02-06 00:00:00,0.0,0.0,Peg 14,cosicorr
55 | 53,2016-11-22 00:00:00,1.2363786697387695,-2.280789375305176,Peg 14,cosicorr
56 | 54,2017-04-21 00:00:00,1.1824951171875,-7.7378926277160645,Peg 14,cosicorr
57 | 55,2017-05-01 00:00:00,1.0262935161590576,-7.726996898651123,Peg 14,cosicorr
58 | 56,2017-05-21 00:00:00,1.365350365638733,-9.12497615814209,Peg 14,cosicorr
59 | 57,2017-08-04 00:00:00,0.5142653584480286,-10.744511604309082,Peg 14,cosicorr
60 | 58,2017-10-13 00:00:00,2.3543403148651123,-6.396057605743408,Peg 14,cosicorr
61 | 59,2017-11-22 00:00:00,3.0027146339416504,-5.677243232727051,Peg 14,cosicorr
62 | 60,2018-03-17 00:00:00,1.7791584730148315,-8.397893905639648,Peg 14,cosicorr
63 | 61,2018-07-05 00:00:00,2.460094928741455,-12.760690689086914,Peg 14,cosicorr
64 | 62,2018-10-18 00:00:00,3.218912124633789,-9.243610382080078,Peg 14,cosicorr
65 | 63,2019-01-16 00:00:00,3.008460283279419,-8.448074340820312,Peg 14,cosicorr
66 | 64,2019-03-02 00:00:00,1.5861953496932983,-10.173908233642578,Peg 14,cosicorr
67 | 65,2019-11-02 00:00:00,3.8391618728637695,-10.984589576721191,Peg 14,cosicorr
68 | 66,2019-11-22 00:00:00,3.650909423828125,-10.484148979187012,Peg 14,cosicorr
69 | 67,2020-01-16 00:00:00,2.074510097503662,-10.223982810974121,Peg 14,cosicorr
70 | 68,2020-02-10 00:00:00,0.9648375511169434,-11.86883544921875,Peg 14,cosicorr
71 | 69,2020-03-11 00:00:00,1.18851637840271,-13.080243110656738,Peg 14,cosicorr
72 | 70,2020-03-31 00:00:00,2.662367820739746,-13.036172866821289,Peg 14,cosicorr
73 | 71,2020-04-10 00:00:00,2.1246113777160645,-13.772560119628906,Peg 14,cosicorr
74 | 72,2020-07-09 00:00:00,3.3059585094451904,-16.071962356567383,Peg 14,cosicorr
75 | 73,2020-08-03 00:00:00,2.4178264141082764,-15.535646438598633,Peg 14,cosicorr
76 | 74,2020-12-16 00:00:00,3.9489314556121826,-11.941455841064453,Peg 14,cosicorr
77 | 75,2021-01-25 00:00:00,3.890766143798828,-11.36993408203125,Peg 14,cosicorr
78 | 76,2021-02-19 00:00:00,2.5517830848693848,-12.446699142456055,Peg 14,cosicorr
79 | 77,2021-03-16 00:00:00,2.030893325805664,-13.850458145141602,Peg 14,cosicorr
80 | 78,2016-02-06 00:00:00,0.0,0.0,Peg 21,cosicorr
81 | 79,2016-11-22 00:00:00,2.085374355316162,-5.801770210266113,Peg 21,cosicorr
82 | 80,2017-04-21 00:00:00,2.630707025527954,-9.90408706665039,Peg 21,cosicorr
83 | 81,2017-05-01 00:00:00,0.13269829750061035,-10.52602481842041,Peg 21,cosicorr
84 | 82,2017-05-21 00:00:00,-3.6800601482391357,-11.47634506225586,Peg 21,cosicorr
85 | 83,2017-08-04 00:00:00,3.8864195346832275,-13.80860424041748,Peg 21,cosicorr
86 | 84,2017-10-13 00:00:00,6.029419898986816,-9.61982536315918,Peg 21,cosicorr
87 | 85,2017-11-22 00:00:00,5.895587921142578,-10.40848445892334,Peg 21,cosicorr
88 | 86,2018-03-17 00:00:00,6.049984455108643,-14.665072441101074,Peg 21,cosicorr
89 | 87,2018-07-05 00:00:00,5.923711776733398,-22.020801544189453,Peg 21,cosicorr
90 | 88,2018-10-18 00:00:00,8.17432975769043,-16.667991638183594,Peg 21,cosicorr
91 | 89,2019-01-16 00:00:00,7.037999629974365,-17.11480712890625,Peg 21,cosicorr
92 | 90,2019-03-02 00:00:00,6.974925518035889,-19.0137939453125,Peg 21,cosicorr
93 | 91,2019-11-02 00:00:00,9.90236759185791,-21.99767303466797,Peg 21,cosicorr
94 | 92,2019-11-22 00:00:00,10.080549240112305,-21.346559524536133,Peg 21,cosicorr
95 | 93,2020-01-16 00:00:00,13.729251861572266,-20.12954330444336,Peg 21,cosicorr
96 | 94,2020-02-10 00:00:00,9.657949447631836,-22.056711196899414,Peg 21,cosicorr
97 | 95,2020-03-11 00:00:00,9.011445045471191,-24.694091796875,Peg 21,cosicorr
98 | 96,2020-03-31 00:00:00,9.28555965423584,-25.79360008239746,Peg 21,cosicorr
99 | 97,2020-04-10 00:00:00,9.137528419494629,-26.753206253051758,Peg 21,cosicorr
100 | 98,2020-07-09 00:00:00,10.203228950500488,-23.51553726196289,Peg 21,cosicorr
101 | 99,2020-08-03 00:00:00,8.732086181640625,-27.80316925048828,Peg 21,cosicorr
102 | 100,2020-12-16 00:00:00,12.050621032714844,-24.23237419128418,Peg 21,cosicorr
103 | 101,2021-01-25 00:00:00,10.006139755249023,-25.9642276763916,Peg 21,cosicorr
104 | 102,2021-02-19 00:00:00,11.911375045776367,-28.06908416748047,Peg 21,cosicorr
105 | 103,2021-03-16 00:00:00,9.41170883178711,-27.51998519897461,Peg 21,cosicorr
106 | 104,2016-02-06 00:00:00,0.0,0.0,Peg 22,cosicorr
107 | 105,2016-11-22 00:00:00,-7.557013988494873,-9.43545150756836,Peg 22,cosicorr
108 | 106,2017-04-21 00:00:00,-4.980212211608887,-16.61626625061035,Peg 22,cosicorr
109 | 107,2017-05-01 00:00:00,-10.368284225463867,-26.721412658691406,Peg 22,cosicorr
110 | 108,2017-05-21 00:00:00,-6.969278335571289,-18.61579132080078,Peg 22,cosicorr
111 | 109,2017-08-04 00:00:00,-7.0734543800354,-8.571739196777344,Peg 22,cosicorr
112 | 110,2017-10-13 00:00:00,-3.214310884475708,-6.333656311035156,Peg 22,cosicorr
113 | 111,2017-11-22 00:00:00,1.0173499584197998,-2.159432888031006,Peg 22,cosicorr
114 | 112,2018-03-17 00:00:00,-3.447802782058716,-4.467426776885986,Peg 22,cosicorr
115 | 113,2018-07-05 00:00:00,-3.542963981628418,-7.057640075683594,Peg 22,cosicorr
116 | 114,2018-10-18 00:00:00,-3.2142040729522705,-5.137879371643066,Peg 22,cosicorr
117 | 115,2019-01-16 00:00:00,-0.7971892356872559,-3.253918409347534,Peg 22,cosicorr
118 | 116,2019-03-02 00:00:00,-0.8162429928779602,-4.027185440063477,Peg 22,cosicorr
119 | 117,2019-11-02 00:00:00,0.8045818209648132,-9.162330627441406,Peg 22,cosicorr
120 | 118,2019-11-22 00:00:00,3.046600103378296,-0.12127685546875,Peg 22,cosicorr
121 | 119,2020-01-16 00:00:00,2.5729825496673584,-8.07583999633789,Peg 22,cosicorr
122 | 120,2020-02-10 00:00:00,1.5961627960205078,-7.26674747467041,Peg 22,cosicorr
123 | 121,2020-03-11 00:00:00,1.3178284168243408,-8.671246528625488,Peg 22,cosicorr
124 | 122,2020-03-31 00:00:00,0.16343367099761963,-9.590702056884766,Peg 22,cosicorr
125 | 123,2020-04-10 00:00:00,1.0895700454711914,-7.40506649017334,Peg 22,cosicorr
126 | 124,2020-07-09 00:00:00,-2.567152500152588,-13.310246467590332,Peg 22,cosicorr
127 | 125,2020-08-03 00:00:00,-2.8232533931732178,-10.163725852966309,Peg 22,cosicorr
128 | 126,2020-12-16 00:00:00,4.849926948547363,0.6950502395629883,Peg 22,cosicorr
129 | 127,2021-01-25 00:00:00,5.654144287109375,-10.279911994934082,Peg 22,cosicorr
130 | 128,2021-02-19 00:00:00,5.037361145019531,-3.60922908782959,Peg 22,cosicorr
131 | 129,2021-03-16 00:00:00,3.470592498779297,-5.7018914222717285,Peg 22,cosicorr
132 | 10,2015-07-03,0.0,0.0,Peg 22,gps
133 | 9,2015-09-30,3.752000000094995,-2.695000001229346,Peg 22,gps
134 | 8,2015-12-07,7.726865999866277,-4.648778000846505,Peg 22,gps
135 | 7,2016-03-17,7.809698000084609,-5.473954999819398,Peg 22,gps
136 | 6,2016-07-11,9.707503999816254,-6.788191501051188,Peg 22,gps
137 | 5,2016-10-23,15.169979999773204,-10.196236500516534,Peg 22,gps
138 | 4,2016-12-14,17.295319999800995,-11.462829501368104,Peg 22,gps
139 | 3,2017-03-20,18.718166999751706,-12.320733500644565,Peg 22,gps
140 | 2,2017-06-29,24.40433299983852,-15.587474500760436,Peg 22,gps
141 | 1,2017-10-11,32.9932719997596,-20.382386500947177,Peg 22,gps
142 | 0,2018-03-27,42.167439999757335,-25.27914050128311,Peg 22,gps
143 | 12,2015-07-03,0.0,0.0,Peg 21,gps
144 | 11,2015-09-30,1.2570000002160668,-3.049000001512468,Peg 21,gps
145 | 10,2015-12-07,3.358866000082344,-4.993778001517057,Peg 21,gps
146 | 9,2016-03-17,2.263073000125587,-5.439065000042319,Peg 21,gps
147 | 8,2016-07-11,2.623841000022366,-6.452151501551271,Peg 21,gps
148 | 7,2016-10-23,3.850464999908581,-9.414110501296818,Peg 21,gps
149 | 6,2016-12-14,4.2682260000146925,-10.421396501362324,Peg 21,gps
150 | 5,2017-03-20,4.521760999923572,-11.090236501768231,Peg 21,gps
151 | 4,2017-06-29,5.790555999847129,-13.971202501095831,Peg 21,gps
152 | 3,2017-10-11,7.89700199989602,-18.246762501075864,Peg 21,gps
153 | 2,2018-03-27,9.259646999882534,-20.971088501624763,Peg 21,gps
154 | 1,2018-10-09,12.483143999939784,-27.046539501287043,Peg 21,gps
155 | 0,2019-12-18,20.35600099992007,-39.37670850101858,Peg 21,gps
156 | 12,2015-07-03,0.0,0.0,Peg 14,gps
157 | 11,2015-09-30,0.1250000002328306,-0.5750000001862645,Peg 14,gps
158 | 10,2015-12-07,0.1938660000450909,-0.8927780007943511,Peg 14,gps
159 | 9,2016-03-17,0.2877270001918077,-1.2104699993506074,Peg 14,gps
160 | 8,2016-07-11,0.4053809999022633,-1.558058500289917,Peg 14,gps
161 | 7,2016-10-23,0.5601359999272972,-2.5195605009794235,Peg 14,gps
162 | 6,2016-12-14,0.6341889998875558,-2.911539500579238,Peg 14,gps
163 | 5,2017-03-20,0.7227069998625666,-3.2706115003675222,Peg 14,gps
164 | 4,2017-06-29,0.8960730000399053,-4.040582500398159,Peg 14,gps
165 | 3,2017-10-11,1.1864829999394717,-5.2919415002688766,Peg 14,gps
166 | 2,2018-03-27,1.5126320000272244,-6.5181215004995465,Peg 14,gps
167 | 1,2018-10-09,1.9645060000475496,-8.288911500945687,Peg 14,gps
168 | 0,2020-02-20,2.626092999940738,-10.650951500982046,Peg 14,gps
169 | 10,2015-07-03,0.0,0.0,Peg 11,gps
170 | 9,2015-12-07,0.0158659999724477,-0.3417780008167028,Peg 11,gps
171 | 8,2016-03-17,0.0522460001520812,-0.4604399995878339,Peg 11,gps
172 | 7,2016-07-11,0.0373129998333752,-0.6527145011350513,Peg 11,gps
173 | 6,2016-10-23,0.1067309998907148,-1.1083825007081032,Peg 11,gps
174 | 5,2017-03-20,0.1182249998673796,-1.371377500705421,Peg 11,gps
175 | 4,2017-06-29,0.1631769998930394,-1.6502925008535383,Peg 11,gps
176 | 3,2017-10-11,0.2515069998335093,-2.1469265008345246,Peg 11,gps
177 | 2,2018-03-27,0.3082099999301135,-2.6593175008893013,Peg 11,gps
178 | 1,2018-10-09,0.3908769998233765,-3.404787501320243,Peg 11,gps
179 | 0,2020-02-20,0.5154319999273866,-4.504336500540376,Peg 11,gps
180 | 12,2015-07-03,0.0,0.0,Peg 05,gps
181 | 11,2015-09-30,-0.0159999998286366,-0.069000001065433,Peg 05,gps
182 | 10,2015-12-07,-0.015133999986574,-0.065778000280261,Peg 05,gps
183 | 9,2016-03-17,0.0175730001647025,-0.0753419995307922,Peg 05,gps
184 | 8,2016-07-11,-0.0309310001321136,-0.126927500590682,Peg 05,gps
185 | 7,2016-10-23,-0.0272630001418292,-0.2224265011027455,Peg 05,gps
186 | 6,2016-12-14,-0.0468640001490712,-0.2861585011705756,Peg 05,gps
187 | 5,2017-03-20,-0.0167849999852478,-0.2952815005555749,Peg 05,gps
188 | 4,2017-06-29,-0.0653940001502633,-0.3470845008268952,Peg 05,gps
189 | 3,2017-10-11,-0.0742320001590997,-0.4345645010471344,Peg 05,gps
190 | 2,2018-03-27,-0.0927930001635104,-0.507234500721097,Peg 05,gps
191 | 1,2018-10-09,-0.1047239999752491,-0.6717345006763935,Peg 05,gps
192 | 0,2019-12-18,-0.1100260000675916,-0.850903500802815,Peg 05,gps
193 |
--------------------------------------------------------------------------------
/peg_data/comparsion_median.csv:
--------------------------------------------------------------------------------
1 | ,Date,Cumulative E disp,Cumulative N disp,Name,Source
2 | 0,2016-02-06 00:00:00,0.0,0.0,Peg 05,cosicorr
3 | 1,2016-11-22 00:00:00,0.8684605956077576,-1.8039816617965698,Peg 05,cosicorr
4 | 2,2017-04-21 00:00:00,4.471202373504639,3.2440643310546875,Peg 05,cosicorr
5 | 3,2017-05-01 00:00:00,1.1365745067596436,0.25312042236328125,Peg 05,cosicorr
6 | 4,2017-05-21 00:00:00,1.2564095258712769,0.08737720549106598,Peg 05,cosicorr
7 | 5,2017-08-04 00:00:00,1.1987947225570679,-2.252047538757324,Peg 05,cosicorr
8 | 6,2017-10-13 00:00:00,0.9994680881500244,-2.402531147003174,Peg 05,cosicorr
9 | 7,2017-11-22 00:00:00,-1.1578953266143799,-2.3461031913757324,Peg 05,cosicorr
10 | 8,2018-03-17 00:00:00,0.848766565322876,-0.008911371231079102,Peg 05,cosicorr
11 | 9,2018-07-05 00:00:00,4.7701873779296875,-2.9478518962860107,Peg 05,cosicorr
12 | 10,2018-10-18 00:00:00,0.05031108856201172,-2.303748369216919,Peg 05,cosicorr
13 | 11,2019-01-16 00:00:00,3.948194980621338,1.3885736465454102,Peg 05,cosicorr
14 | 12,2019-03-02 00:00:00,-0.16312694549560547,3.2692434787750244,Peg 05,cosicorr
15 | 13,2019-11-02 00:00:00,-0.07848510891199112,-2.3035781383514404,Peg 05,cosicorr
16 | 14,2019-11-22 00:00:00,-0.18131400644779205,-1.6196424961090088,Peg 05,cosicorr
17 | 15,2020-01-16 00:00:00,-0.45336735248565674,-1.2015235424041748,Peg 05,cosicorr
18 | 16,2020-02-10 00:00:00,0.6465297937393188,-1.5955333709716797,Peg 05,cosicorr
19 | 17,2020-03-11 00:00:00,2.9033031463623047,1.3908870220184326,Peg 05,cosicorr
20 | 18,2020-03-31 00:00:00,2.589373826980591,-0.41208314895629883,Peg 05,cosicorr
21 | 19,2020-04-10 00:00:00,1.8599419593811035,0.5250407457351685,Peg 05,cosicorr
22 | 20,2020-07-09 00:00:00,-2.6201887130737305,3.8879551887512207,Peg 05,cosicorr
23 | 21,2020-08-03 00:00:00,2.5054521560668945,-4.616037845611572,Peg 05,cosicorr
24 | 22,2020-12-16 00:00:00,-0.8470640182495117,15.170886993408203,Peg 05,cosicorr
25 | 23,2021-01-25 00:00:00,-4.300424575805664,6.863006591796875,Peg 05,cosicorr
26 | 24,2021-02-19 00:00:00,-10.804279327392578,0.6055917739868164,Peg 05,cosicorr
27 | 25,2021-03-16 00:00:00,-5.372568130493164,-3.14648699760437,Peg 05,cosicorr
28 | 26,2016-02-06 00:00:00,0.0,0.0,Peg 11,cosicorr
29 | 27,2016-11-22 00:00:00,0.9608381986618042,-1.1459245681762695,Peg 11,cosicorr
30 | 28,2017-04-21 00:00:00,0.2146906852722168,-5.868095397949219,Peg 11,cosicorr
31 | 29,2017-05-01 00:00:00,-0.1919735074043274,-5.555642127990723,Peg 11,cosicorr
32 | 30,2017-05-21 00:00:00,0.24039185047149658,-5.854299068450928,Peg 11,cosicorr
33 | 31,2017-08-04 00:00:00,0.2584483027458191,-7.983550071716309,Peg 11,cosicorr
34 | 32,2017-10-13 00:00:00,1.3261089324951172,-4.508571624755859,Peg 11,cosicorr
35 | 33,2017-11-22 00:00:00,1.8380296230316162,-3.552011728286743,Peg 11,cosicorr
36 | 34,2018-03-17 00:00:00,0.1533581018447876,-6.0138630867004395,Peg 11,cosicorr
37 | 35,2018-07-05 00:00:00,1.0197229385375977,-9.174657821655273,Peg 11,cosicorr
38 | 36,2018-10-18 00:00:00,1.1829259395599365,-6.511019229888916,Peg 11,cosicorr
39 | 37,2019-01-16 00:00:00,2.0475881099700928,-4.219444274902344,Peg 11,cosicorr
40 | 38,2019-03-02 00:00:00,0.11831116676330566,-6.776764869689941,Peg 11,cosicorr
41 | 39,2019-11-02 00:00:00,1.0476384162902832,-7.555851936340332,Peg 11,cosicorr
42 | 40,2019-11-22 00:00:00,0.8921913504600525,-7.110203266143799,Peg 11,cosicorr
43 | 41,2020-01-16 00:00:00,0.5082623958587646,-6.5623860359191895,Peg 11,cosicorr
44 | 42,2020-02-10 00:00:00,0.24007612466812134,-8.544851303100586,Peg 11,cosicorr
45 | 43,2020-03-11 00:00:00,-0.03218400478363037,-9.891326904296875,Peg 11,cosicorr
46 | 44,2020-03-31 00:00:00,0.37826791405677795,-9.28553295135498,Peg 11,cosicorr
47 | 45,2020-04-10 00:00:00,0.10039898753166199,-10.430305480957031,Peg 11,cosicorr
48 | 46,2020-07-09 00:00:00,1.7532858848571777,-12.511659622192383,Peg 11,cosicorr
49 | 47,2020-08-03 00:00:00,1.2293453216552734,-11.38526439666748,Peg 11,cosicorr
50 | 48,2020-12-16 00:00:00,2.481189250946045,-6.203633785247803,Peg 11,cosicorr
51 | 49,2021-01-25 00:00:00,2.2568044662475586,-5.525925636291504,Peg 11,cosicorr
52 | 50,2021-02-19 00:00:00,1.322105884552002,-7.888666152954102,Peg 11,cosicorr
53 | 51,2021-03-16 00:00:00,0.7814989686012268,-9.442252159118652,Peg 11,cosicorr
54 | 52,2016-02-06 00:00:00,0.0,0.0,Peg 14,cosicorr
55 | 53,2016-11-22 00:00:00,1.327255368232727,-1.8363019227981567,Peg 14,cosicorr
56 | 54,2017-04-21 00:00:00,1.2249140739440918,-8.07007122039795,Peg 14,cosicorr
57 | 55,2017-05-01 00:00:00,0.8807958364486694,-7.984952449798584,Peg 14,cosicorr
58 | 56,2017-05-21 00:00:00,1.2990858554840088,-9.36690616607666,Peg 14,cosicorr
59 | 57,2017-08-04 00:00:00,0.24601662158966064,-11.24121379852295,Peg 14,cosicorr
60 | 58,2017-10-13 00:00:00,2.526458263397217,-6.1158127784729,Peg 14,cosicorr
61 | 59,2017-11-22 00:00:00,3.2049732208251953,-5.4268107414245605,Peg 14,cosicorr
62 | 60,2018-03-17 00:00:00,1.935526728630066,-8.317426681518555,Peg 14,cosicorr
63 | 61,2018-07-05 00:00:00,2.4533495903015137,-12.904537200927734,Peg 14,cosicorr
64 | 62,2018-10-18 00:00:00,3.2127716541290283,-9.263049125671387,Peg 14,cosicorr
65 | 63,2019-01-16 00:00:00,3.0824553966522217,-8.407373428344727,Peg 14,cosicorr
66 | 64,2019-03-02 00:00:00,1.5838156938552856,-10.40059757232666,Peg 14,cosicorr
67 | 65,2019-11-02 00:00:00,3.9060873985290527,-11.019851684570312,Peg 14,cosicorr
68 | 66,2019-11-22 00:00:00,3.800750970840454,-10.40703296661377,Peg 14,cosicorr
69 | 67,2020-01-16 00:00:00,1.9894287586212158,-10.242195129394531,Peg 14,cosicorr
70 | 68,2020-02-10 00:00:00,0.7236690521240234,-11.924224853515625,Peg 14,cosicorr
71 | 69,2020-03-11 00:00:00,1.2246880531311035,-13.179730415344238,Peg 14,cosicorr
72 | 70,2020-03-31 00:00:00,2.800292491912842,-13.131917953491211,Peg 14,cosicorr
73 | 71,2020-04-10 00:00:00,2.117433786392212,-13.711542129516602,Peg 14,cosicorr
74 | 72,2020-07-09 00:00:00,3.0263497829437256,-17.089462280273438,Peg 14,cosicorr
75 | 73,2020-08-03 00:00:00,2.3749430179595947,-15.648703575134277,Peg 14,cosicorr
76 | 74,2020-12-16 00:00:00,4.451626777648926,-11.250484466552734,Peg 14,cosicorr
77 | 75,2021-01-25 00:00:00,3.9405856132507324,-11.371249198913574,Peg 14,cosicorr
78 | 76,2021-02-19 00:00:00,2.5505359172821045,-12.35069465637207,Peg 14,cosicorr
79 | 77,2021-03-16 00:00:00,1.9986270666122437,-13.820213317871094,Peg 14,cosicorr
80 | 78,2016-02-06 00:00:00,0.0,0.0,Peg 21,cosicorr
81 | 79,2016-11-22 00:00:00,1.812307596206665,-7.459732532501221,Peg 21,cosicorr
82 | 80,2017-04-21 00:00:00,3.288499116897583,-10.206121444702148,Peg 21,cosicorr
83 | 81,2017-05-01 00:00:00,-0.16467523574829102,-10.767670631408691,Peg 21,cosicorr
84 | 82,2017-05-21 00:00:00,-5.282382011413574,-11.088589668273926,Peg 21,cosicorr
85 | 83,2017-08-04 00:00:00,4.836723327636719,-13.156204223632812,Peg 21,cosicorr
86 | 84,2017-10-13 00:00:00,6.302547454833984,-9.201376914978027,Peg 21,cosicorr
87 | 85,2017-11-22 00:00:00,5.876781463623047,-10.714094161987305,Peg 21,cosicorr
88 | 86,2018-03-17 00:00:00,6.1450676918029785,-14.995166778564453,Peg 21,cosicorr
89 | 87,2018-07-05 00:00:00,5.919912338256836,-22.233983993530273,Peg 21,cosicorr
90 | 88,2018-10-18 00:00:00,8.185906410217285,-16.78606414794922,Peg 21,cosicorr
91 | 89,2019-01-16 00:00:00,6.924319744110107,-17.638431549072266,Peg 21,cosicorr
92 | 90,2019-03-02 00:00:00,6.584926605224609,-19.33339500427246,Peg 21,cosicorr
93 | 91,2019-11-02 00:00:00,9.514568328857422,-22.56759262084961,Peg 21,cosicorr
94 | 92,2019-11-22 00:00:00,9.52142333984375,-22.062950134277344,Peg 21,cosicorr
95 | 93,2020-01-16 00:00:00,16.230005264282227,-20.050193786621094,Peg 21,cosicorr
96 | 94,2020-02-10 00:00:00,9.429594039916992,-21.96289825439453,Peg 21,cosicorr
97 | 95,2020-03-11 00:00:00,8.523852348327637,-25.651622772216797,Peg 21,cosicorr
98 | 96,2020-03-31 00:00:00,8.722278594970703,-27.193063735961914,Peg 21,cosicorr
99 | 97,2020-04-10 00:00:00,8.907715797424316,-28.075326919555664,Peg 21,cosicorr
100 | 98,2020-07-09 00:00:00,9.669411659240723,-21.193925857543945,Peg 21,cosicorr
101 | 99,2020-08-03 00:00:00,8.2489652633667,-27.110309600830078,Peg 21,cosicorr
102 | 100,2020-12-16 00:00:00,12.4334716796875,-23.77362823486328,Peg 21,cosicorr
103 | 101,2021-01-25 00:00:00,10.056394577026367,-25.966121673583984,Peg 21,cosicorr
104 | 102,2021-02-19 00:00:00,12.518089294433594,-29.482595443725586,Peg 21,cosicorr
105 | 103,2021-03-16 00:00:00,8.939064979553223,-27.6088809967041,Peg 21,cosicorr
106 | 104,2016-02-06 00:00:00,0.0,0.0,Peg 22,cosicorr
107 | 105,2016-11-22 00:00:00,-10.015305519104004,-10.405147552490234,Peg 22,cosicorr
108 | 106,2017-04-21 00:00:00,-5.652276515960693,-20.02902603149414,Peg 22,cosicorr
109 | 107,2017-05-01 00:00:00,-13.88349723815918,-35.181129455566406,Peg 22,cosicorr
110 | 108,2017-05-21 00:00:00,-8.458942413330078,-22.80643081665039,Peg 22,cosicorr
111 | 109,2017-08-04 00:00:00,-8.723668098449707,-6.941154479980469,Peg 22,cosicorr
112 | 110,2017-10-13 00:00:00,-3.4460668563842773,-4.251992225646973,Peg 22,cosicorr
113 | 111,2017-11-22 00:00:00,2.7462801933288574,1.7245731353759766,Peg 22,cosicorr
114 | 112,2018-03-17 00:00:00,-3.8251986503601074,-1.4930179119110107,Peg 22,cosicorr
115 | 113,2018-07-05 00:00:00,-4.8879289627075195,-8.396560668945312,Peg 22,cosicorr
116 | 114,2018-10-18 00:00:00,-5.3546295166015625,-6.365277290344238,Peg 22,cosicorr
117 | 115,2019-01-16 00:00:00,-1.7453365325927734,-4.074812889099121,Peg 22,cosicorr
118 | 116,2019-03-02 00:00:00,-1.6137218475341797,-4.275121688842773,Peg 22,cosicorr
119 | 117,2019-11-02 00:00:00,-0.18861830234527588,-11.240869522094727,Peg 22,cosicorr
120 | 118,2019-11-22 00:00:00,3.500171184539795,4.522638320922852,Peg 22,cosicorr
121 | 119,2020-01-16 00:00:00,3.2391490936279297,-10.115970611572266,Peg 22,cosicorr
122 | 120,2020-02-10 00:00:00,1.3013750314712524,-8.68496036529541,Peg 22,cosicorr
123 | 121,2020-03-11 00:00:00,1.013399362564087,-10.092024803161621,Peg 22,cosicorr
124 | 122,2020-03-31 00:00:00,-1.7511930465698242,-12.827336311340332,Peg 22,cosicorr
125 | 123,2020-04-10 00:00:00,-0.12672531604766846,-7.942965507507324,Peg 22,cosicorr
126 | 124,2020-07-09 00:00:00,-7.368585109710693,-18.97268295288086,Peg 22,cosicorr
127 | 125,2020-08-03 00:00:00,-9.198629379272461,-12.933643341064453,Peg 22,cosicorr
128 | 126,2020-12-16 00:00:00,4.205738067626953,5.565073013305664,Peg 22,cosicorr
129 | 127,2021-01-25 00:00:00,6.8958353996276855,-11.929645538330078,Peg 22,cosicorr
130 | 128,2021-02-19 00:00:00,5.38100004196167,-1.8968706130981445,Peg 22,cosicorr
131 | 129,2021-03-16 00:00:00,3.210353136062622,-5.096599578857422,Peg 22,cosicorr
132 | 10,2015-07-03,0.0,0.0,Peg 22,gps
133 | 9,2015-09-30,3.752000000094995,-2.695000001229346,Peg 22,gps
134 | 8,2015-12-07,7.726865999866277,-4.648778000846505,Peg 22,gps
135 | 7,2016-03-17,7.809698000084609,-5.473954999819398,Peg 22,gps
136 | 6,2016-07-11,9.707503999816254,-6.788191501051188,Peg 22,gps
137 | 5,2016-10-23,15.169979999773204,-10.196236500516534,Peg 22,gps
138 | 4,2016-12-14,17.295319999800995,-11.462829501368104,Peg 22,gps
139 | 3,2017-03-20,18.718166999751706,-12.320733500644565,Peg 22,gps
140 | 2,2017-06-29,24.40433299983852,-15.587474500760436,Peg 22,gps
141 | 1,2017-10-11,32.9932719997596,-20.382386500947177,Peg 22,gps
142 | 0,2018-03-27,42.167439999757335,-25.27914050128311,Peg 22,gps
143 | 12,2015-07-03,0.0,0.0,Peg 21,gps
144 | 11,2015-09-30,1.2570000002160668,-3.049000001512468,Peg 21,gps
145 | 10,2015-12-07,3.358866000082344,-4.993778001517057,Peg 21,gps
146 | 9,2016-03-17,2.263073000125587,-5.439065000042319,Peg 21,gps
147 | 8,2016-07-11,2.623841000022366,-6.452151501551271,Peg 21,gps
148 | 7,2016-10-23,3.850464999908581,-9.414110501296818,Peg 21,gps
149 | 6,2016-12-14,4.2682260000146925,-10.421396501362324,Peg 21,gps
150 | 5,2017-03-20,4.521760999923572,-11.090236501768231,Peg 21,gps
151 | 4,2017-06-29,5.790555999847129,-13.971202501095831,Peg 21,gps
152 | 3,2017-10-11,7.89700199989602,-18.246762501075864,Peg 21,gps
153 | 2,2018-03-27,9.259646999882534,-20.971088501624763,Peg 21,gps
154 | 1,2018-10-09,12.483143999939784,-27.046539501287043,Peg 21,gps
155 | 0,2019-12-18,20.35600099992007,-39.37670850101858,Peg 21,gps
156 | 12,2015-07-03,0.0,0.0,Peg 14,gps
157 | 11,2015-09-30,0.1250000002328306,-0.5750000001862645,Peg 14,gps
158 | 10,2015-12-07,0.1938660000450909,-0.8927780007943511,Peg 14,gps
159 | 9,2016-03-17,0.2877270001918077,-1.2104699993506074,Peg 14,gps
160 | 8,2016-07-11,0.4053809999022633,-1.558058500289917,Peg 14,gps
161 | 7,2016-10-23,0.5601359999272972,-2.5195605009794235,Peg 14,gps
162 | 6,2016-12-14,0.6341889998875558,-2.911539500579238,Peg 14,gps
163 | 5,2017-03-20,0.7227069998625666,-3.2706115003675222,Peg 14,gps
164 | 4,2017-06-29,0.8960730000399053,-4.040582500398159,Peg 14,gps
165 | 3,2017-10-11,1.1864829999394717,-5.2919415002688766,Peg 14,gps
166 | 2,2018-03-27,1.5126320000272244,-6.5181215004995465,Peg 14,gps
167 | 1,2018-10-09,1.9645060000475496,-8.288911500945687,Peg 14,gps
168 | 0,2020-02-20,2.626092999940738,-10.650951500982046,Peg 14,gps
169 | 10,2015-07-03,0.0,0.0,Peg 11,gps
170 | 9,2015-12-07,0.0158659999724477,-0.3417780008167028,Peg 11,gps
171 | 8,2016-03-17,0.0522460001520812,-0.4604399995878339,Peg 11,gps
172 | 7,2016-07-11,0.0373129998333752,-0.6527145011350513,Peg 11,gps
173 | 6,2016-10-23,0.1067309998907148,-1.1083825007081032,Peg 11,gps
174 | 5,2017-03-20,0.1182249998673796,-1.371377500705421,Peg 11,gps
175 | 4,2017-06-29,0.1631769998930394,-1.6502925008535383,Peg 11,gps
176 | 3,2017-10-11,0.2515069998335093,-2.1469265008345246,Peg 11,gps
177 | 2,2018-03-27,0.3082099999301135,-2.6593175008893013,Peg 11,gps
178 | 1,2018-10-09,0.3908769998233765,-3.404787501320243,Peg 11,gps
179 | 0,2020-02-20,0.5154319999273866,-4.504336500540376,Peg 11,gps
180 | 12,2015-07-03,0.0,0.0,Peg 05,gps
181 | 11,2015-09-30,-0.0159999998286366,-0.069000001065433,Peg 05,gps
182 | 10,2015-12-07,-0.015133999986574,-0.065778000280261,Peg 05,gps
183 | 9,2016-03-17,0.0175730001647025,-0.0753419995307922,Peg 05,gps
184 | 8,2016-07-11,-0.0309310001321136,-0.126927500590682,Peg 05,gps
185 | 7,2016-10-23,-0.0272630001418292,-0.2224265011027455,Peg 05,gps
186 | 6,2016-12-14,-0.0468640001490712,-0.2861585011705756,Peg 05,gps
187 | 5,2017-03-20,-0.0167849999852478,-0.2952815005555749,Peg 05,gps
188 | 4,2017-06-29,-0.0653940001502633,-0.3470845008268952,Peg 05,gps
189 | 3,2017-10-11,-0.0742320001590997,-0.4345645010471344,Peg 05,gps
190 | 2,2018-03-27,-0.0927930001635104,-0.507234500721097,Peg 05,gps
191 | 1,2018-10-09,-0.1047239999752491,-0.6717345006763935,Peg 05,gps
192 | 0,2019-12-18,-0.1100260000675916,-0.850903500802815,Peg 05,gps
193 |
--------------------------------------------------------------------------------
/peg_data/comparsion_vanilla.csv:
--------------------------------------------------------------------------------
1 | ,Date,Cumulative E disp,Cumulative N disp,Name,Source
2 | 0,2016-02-06 00:00:00,0.0,0.0,Peg 05,cosicorr
3 | 1,2016-11-22 00:00:00,0.419061541557312,-7.0646562576293945,Peg 05,cosicorr
4 | 2,2017-11-22 00:00:00,-1.8202871084213257,-7.531397342681885,Peg 05,cosicorr
5 | 3,2019-02-25 00:00:00,-0.6214745044708252,-1.6094961166381836,Peg 05,cosicorr
6 | 4,2019-11-22 00:00:00,-1.5820423364639282,-6.414085388183594,Peg 05,cosicorr
7 | 5,2021-01-30 00:00:00,0.6565972566604614,-3.322794198989868,Peg 05,cosicorr
8 | 6,2016-02-06 00:00:00,0.0,0.0,Peg 11,cosicorr
9 | 7,2016-11-22 00:00:00,2.4647200107574463,-0.6321113705635071,Peg 11,cosicorr
10 | 8,2017-11-22 00:00:00,2.795602798461914,-2.11419415473938,Peg 11,cosicorr
11 | 9,2019-02-25 00:00:00,-0.2359790802001953,-4.858185768127441,Peg 11,cosicorr
12 | 10,2019-11-22 00:00:00,1.735810399055481,-4.116517066955566,Peg 11,cosicorr
13 | 11,2021-01-30 00:00:00,2.1017472743988037,-6.754979610443115,Peg 11,cosicorr
14 | 12,2016-02-06 00:00:00,0.0,0.0,Peg 14,cosicorr
15 | 13,2016-11-22 00:00:00,2.867445230484009,-2.38666033744812,Peg 14,cosicorr
16 | 14,2017-11-22 00:00:00,4.147430419921875,-6.549999237060547,Peg 14,cosicorr
17 | 15,2019-02-25 00:00:00,1.6558501720428467,-11.107145309448242,Peg 14,cosicorr
18 | 16,2019-11-22 00:00:00,4.464719772338867,-13.158815383911133,Peg 14,cosicorr
19 | 17,2021-01-30 00:00:00,3.7730937004089355,-14.418757438659668,Peg 14,cosicorr
20 | 18,2016-02-06 00:00:00,0.0,0.0,Peg 21,cosicorr
21 | 19,2016-11-22 00:00:00,5.514182090759277,-3.162351131439209,Peg 21,cosicorr
22 | 20,2017-11-22 00:00:00,9.321380615234375,-11.361024856567383,Peg 21,cosicorr
23 | 21,2019-02-25 00:00:00,9.906267166137695,-20.250545501708984,Peg 21,cosicorr
24 | 22,2019-11-22 00:00:00,13.530051231384277,-23.88180160522461,Peg 21,cosicorr
25 | 23,2021-01-30 00:00:00,15.317926406860352,-27.390933990478516,Peg 21,cosicorr
26 | 24,2016-02-06 00:00:00,0.0,0.0,Peg 22,cosicorr
27 | 25,2016-11-22 00:00:00,-4.893095970153809,1.1323691606521606,Peg 22,cosicorr
28 | 26,2017-11-22 00:00:00,0.3099331855773926,-5.827958106994629,Peg 22,cosicorr
29 | 27,2019-02-25 00:00:00,-0.33004701137542725,-9.123030662536621,Peg 22,cosicorr
30 | 28,2019-11-22 00:00:00,1.789894461631775,-19.880756378173828,Peg 22,cosicorr
31 | 29,2021-01-30 00:00:00,0.5498435497283936,-22.889482498168945,Peg 22,cosicorr
32 | 10,2015-07-03,0.0,0.0,Peg 22,gps
33 | 9,2015-09-30,3.752000000094995,-2.695000001229346,Peg 22,gps
34 | 8,2015-12-07,7.726865999866277,-4.648778000846505,Peg 22,gps
35 | 7,2016-03-17,7.809698000084609,-5.473954999819398,Peg 22,gps
36 | 6,2016-07-11,9.707503999816254,-6.788191501051188,Peg 22,gps
37 | 5,2016-10-23,15.169979999773204,-10.196236500516534,Peg 22,gps
38 | 4,2016-12-14,17.295319999800995,-11.462829501368104,Peg 22,gps
39 | 3,2017-03-20,18.718166999751706,-12.320733500644565,Peg 22,gps
40 | 2,2017-06-29,24.40433299983852,-15.587474500760436,Peg 22,gps
41 | 1,2017-10-11,32.9932719997596,-20.382386500947177,Peg 22,gps
42 | 0,2018-03-27,42.167439999757335,-25.27914050128311,Peg 22,gps
43 | 12,2015-07-03,0.0,0.0,Peg 21,gps
44 | 11,2015-09-30,1.2570000002160668,-3.049000001512468,Peg 21,gps
45 | 10,2015-12-07,3.358866000082344,-4.993778001517057,Peg 21,gps
46 | 9,2016-03-17,2.263073000125587,-5.439065000042319,Peg 21,gps
47 | 8,2016-07-11,2.623841000022366,-6.452151501551271,Peg 21,gps
48 | 7,2016-10-23,3.850464999908581,-9.414110501296818,Peg 21,gps
49 | 6,2016-12-14,4.2682260000146925,-10.421396501362324,Peg 21,gps
50 | 5,2017-03-20,4.521760999923572,-11.090236501768231,Peg 21,gps
51 | 4,2017-06-29,5.790555999847129,-13.971202501095831,Peg 21,gps
52 | 3,2017-10-11,7.89700199989602,-18.246762501075864,Peg 21,gps
53 | 2,2018-03-27,9.259646999882534,-20.971088501624763,Peg 21,gps
54 | 1,2018-10-09,12.483143999939784,-27.046539501287043,Peg 21,gps
55 | 0,2019-12-18,20.35600099992007,-39.37670850101858,Peg 21,gps
56 | 12,2015-07-03,0.0,0.0,Peg 14,gps
57 | 11,2015-09-30,0.1250000002328306,-0.5750000001862645,Peg 14,gps
58 | 10,2015-12-07,0.1938660000450909,-0.8927780007943511,Peg 14,gps
59 | 9,2016-03-17,0.2877270001918077,-1.2104699993506074,Peg 14,gps
60 | 8,2016-07-11,0.4053809999022633,-1.558058500289917,Peg 14,gps
61 | 7,2016-10-23,0.5601359999272972,-2.5195605009794235,Peg 14,gps
62 | 6,2016-12-14,0.6341889998875558,-2.911539500579238,Peg 14,gps
63 | 5,2017-03-20,0.7227069998625666,-3.2706115003675222,Peg 14,gps
64 | 4,2017-06-29,0.8960730000399053,-4.040582500398159,Peg 14,gps
65 | 3,2017-10-11,1.1864829999394717,-5.2919415002688766,Peg 14,gps
66 | 2,2018-03-27,1.5126320000272244,-6.5181215004995465,Peg 14,gps
67 | 1,2018-10-09,1.9645060000475496,-8.288911500945687,Peg 14,gps
68 | 0,2020-02-20,2.626092999940738,-10.650951500982046,Peg 14,gps
69 | 10,2015-07-03,0.0,0.0,Peg 11,gps
70 | 9,2015-12-07,0.0158659999724477,-0.3417780008167028,Peg 11,gps
71 | 8,2016-03-17,0.0522460001520812,-0.4604399995878339,Peg 11,gps
72 | 7,2016-07-11,0.0373129998333752,-0.6527145011350513,Peg 11,gps
73 | 6,2016-10-23,0.1067309998907148,-1.1083825007081032,Peg 11,gps
74 | 5,2017-03-20,0.1182249998673796,-1.371377500705421,Peg 11,gps
75 | 4,2017-06-29,0.1631769998930394,-1.6502925008535383,Peg 11,gps
76 | 3,2017-10-11,0.2515069998335093,-2.1469265008345246,Peg 11,gps
77 | 2,2018-03-27,0.3082099999301135,-2.6593175008893013,Peg 11,gps
78 | 1,2018-10-09,0.3908769998233765,-3.404787501320243,Peg 11,gps
79 | 0,2020-02-20,0.5154319999273866,-4.504336500540376,Peg 11,gps
80 | 12,2015-07-03,0.0,0.0,Peg 05,gps
81 | 11,2015-09-30,-0.0159999998286366,-0.069000001065433,Peg 05,gps
82 | 10,2015-12-07,-0.015133999986574,-0.065778000280261,Peg 05,gps
83 | 9,2016-03-17,0.0175730001647025,-0.0753419995307922,Peg 05,gps
84 | 8,2016-07-11,-0.0309310001321136,-0.126927500590682,Peg 05,gps
85 | 7,2016-10-23,-0.0272630001418292,-0.2224265011027455,Peg 05,gps
86 | 6,2016-12-14,-0.0468640001490712,-0.2861585011705756,Peg 05,gps
87 | 5,2017-03-20,-0.0167849999852478,-0.2952815005555749,Peg 05,gps
88 | 4,2017-06-29,-0.0653940001502633,-0.3470845008268952,Peg 05,gps
89 | 3,2017-10-11,-0.0742320001590997,-0.4345645010471344,Peg 05,gps
90 | 2,2018-03-27,-0.0927930001635104,-0.507234500721097,Peg 05,gps
91 | 1,2018-10-09,-0.1047239999752491,-0.6717345006763935,Peg 05,gps
92 | 0,2019-12-18,-0.1100260000675916,-0.850903500802815,Peg 05,gps
93 |
--------------------------------------------------------------------------------
/peg_data/legacy/locations.csv:
--------------------------------------------------------------------------------
1 | Name,Easting,Northing,row,column
2 | Peg 05,401864.9283032848,5599634.816406395,118,79
3 | Peg 11,401697.90087304136,5599280.503948357,127,74
4 | Peg 14,401694.8038717443,5599142.781357283,130,74
5 | Peg 21,401809.34125312755,5598823.821932256,138,77
6 | Peg 22,401768.4078909826,5598723.512741158,141,76
7 |
--------------------------------------------------------------------------------
/peg_data/legacy/pegProj.csv:
--------------------------------------------------------------------------------
1 | FID,Shape,Survey_date,Name,Survey_num,Easting,Northing,Elevation,E disp,N disp,V disp,Net H disp,net H&V disp,net disp/yr,cum net disp,latitude,longitude
2 | 72,Point ZM,3/07/2015,Peg 05,1,1844577.693,5596364.971,414.715546,0,0,0,0,0,0,0,-39.7475,175.855
3 | 71,Point ZM,30/09/2015,Peg 05,2,1844577.677,5596364.902,414.707546,-0.016,-0.069,-0.008,0.070831,0.071281,0.292333,0.071281,-39.7475,175.855
4 | 70,Point ZM,7/12/2015,Peg 05,3,1844577.678,5596364.905,414.725572,0.000866,0.003222,0.018027,0.003336,0.018333,0.098403,0.089614,-39.7475,175.855
5 | 69,Point ZM,17/03/2016,Peg 05,4,1844577.71,5596364.896,414.702004,0.032707,-0.009564,-0.023568,0.034077,0.041433,0.149733,0.131047,-39.7475,175.855
6 | 68,Point ZM,11/07/2016,Peg 05,5,1844577.662,5596364.844,414.657175,-0.048504,-0.051586,-0.044829,0.070807,0.083805,0.263698,0.214852,-39.7475,175.855
7 | 67,Point ZM,23/10/2016,Peg 05,6,1844577.666,5596364.749,414.652216,0.003668,-0.095499,-0.004959,0.095569,0.095698,0.335863,0.31055,-39.7475,175.855
8 | 66,Point ZM,14/12/2016,Peg 05,7,1844577.646,5596364.685,414.651637,-0.019601,-0.063732,-0.000579,0.066678,0.066681,0.468047,0.377231,-39.7475,175.855
9 | 65,Point ZM,20/03/2017,Peg 05,8,1844577.676,5596364.676,414.655279,0.030079,-0.009123,0.003642,0.031432,0.031642,0.120307,0.408873,-39.7475,175.855
10 | 64,Point ZM,29/06/2017,Peg 05,9,1844577.627,5596364.624,414.694308,-0.048609,-0.051803,0.039029,0.071038,0.081053,0.292916,0.489926,-39.7475,175.855
11 | 63,Point ZM,11/10/2017,Peg 05,10,1844577.619,5596364.537,414.638339,-0.008838,-0.08748,-0.055969,0.087925,0.104228,0.365799,0.594154,-39.7475,175.855
12 | 62,Point ZM,27/03/2018,Peg 05,11,1844577.6,5596364.464,414.461383,-0.018561,-0.07267,-0.176956,0.075003,0.192195,0.420067,0.786349,-39.7475,175.855
13 | 61,Point ZM,9/10/2018,Peg 05,12,1844577.588,5596364.3,414.583059,-0.011931,-0.1645,0.121676,0.164932,0.204958,0.381681,0.991306,-39.7476,175.855
14 | 60,Point ZM,18/12/2019,Peg 05,13,1844577.583,5596364.12,414.539135,-0.005302,-0.179169,-0.043924,0.179247,0.184551,0.154853,1.175857,-39.7476,175.855
15 | 59,Point ZM,3/07/2015,Peg 11,1,1844394.679,5596019.614,390.493546,0,0,0,0,0,0,0,-39.7507,175.853
16 | 58,Point ZM,7/12/2015,Peg 11,2,1844394.695,5596019.272,390.426572,0.015866,-0.341778,-0.066974,0.342146,0.348639,0.810531,0.348639,-39.7507,175.853
17 | 57,Point ZM,17/03/2016,Peg 11,3,1844394.731,5596019.154,390.443321,0.03638,-0.118662,0.016748,0.124114,0.125239,0.452595,0.473878,-39.7507,175.853
18 | 56,Point ZM,11/07/2016,Peg 11,4,1844394.716,5596018.962,390.341576,-0.014933,-0.192275,-0.101745,0.192854,0.218047,0.686096,0.691925,-39.7507,175.853
19 | 55,Point ZM,23/10/2016,Peg 11,5,1844394.786,5596018.506,390.193595,0.069418,-0.455668,-0.147981,0.460925,0.484098,1.698997,1.176022,-39.7507,175.853
20 | 54,Point ZM,20/03/2017,Peg 11,6,1844394.797,5596018.243,390.158495,0.011494,-0.262995,-0.0351,0.263246,0.265576,0.654967,1.441598,-39.7507,175.853
21 | 53,Point ZM,29/06/2017,Peg 11,7,1844394.842,5596017.964,390.163777,0.044952,-0.278915,0.005282,0.282514,0.282564,1.021145,1.724162,-39.7507,175.853
22 | 52,Point ZM,11/10/2017,Peg 11,8,1844394.93,5596017.467,389.98803,0.08833,-0.496634,-0.175747,0.504428,0.534167,1.874721,2.258329,-39.7507,175.853
23 | 51,Point ZM,27/03/2018,Peg 11,9,1844394.987,5596016.955,389.797578,0.056703,-0.512391,-0.190452,0.515519,0.549574,1.201165,2.807903,-39.7507,175.853
24 | 50,Point ZM,9/10/2018,Peg 11,10,1844395.07,5596016.209,389.732238,0.082667,-0.74547,-0.06534,0.75004,0.75288,1.402047,3.560783,-39.7507,175.853
25 | 49,Point ZM,20/02/2020,Peg 11,11,1844395.194,5596015.11,389.428943,0.124555,-1.099549,-0.303295,1.106581,1.147393,0.839275,4.708176,-39.7507,175.853
26 | 48,Point ZM,3/07/2015,Peg 14,1,1844384.754,5595884.09,383.784546,0,0,0,0,0,0,0,-39.7519,175.852
27 | 47,Point ZM,30/09/2015,Peg 14,2,1844384.879,5595883.515,383.660546,0.125,-0.575,-0.124,0.58843,0.601353,2.466225,0.601353,-39.7519,175.852
28 | 46,Point ZM,7/12/2015,Peg 14,3,1844384.948,5595883.197,383.597572,0.068866,-0.317778,-0.062974,0.325154,0.331196,1.777745,0.93255,-39.7519,175.852
29 | 45,Point ZM,17/03/2016,Peg 14,4,1844385.042,5595882.88,383.529479,0.093861,-0.317692,-0.068094,0.331267,0.338193,1.222184,1.270743,-39.7519,175.852
30 | 44,Point ZM,11/07/2016,Peg 14,5,1844385.159,5595882.532,383.520534,0.117654,-0.347589,-0.008945,0.366961,0.36707,1.155004,1.637813,-39.7519,175.852
31 | 43,Point ZM,23/10/2016,Peg 14,6,1844385.314,5595881.571,383.289425,0.154755,-0.961502,-0.231109,0.973876,1.000923,3.512854,2.638736,-39.7519,175.852
32 | 42,Point ZM,14/12/2016,Peg 14,7,1844385.388,5595881.179,383.158536,0.074053,-0.391979,-0.130889,0.398913,0.419837,2.946935,3.058573,-39.752,175.852
33 | 41,Point ZM,20/03/2017,Peg 14,8,1844385.477,5595880.82,383.050903,0.088518,-0.359072,-0.107633,0.369822,0.385166,1.464434,3.443739,-39.752,175.852
34 | 40,Point ZM,29/06/2017,Peg 14,9,1844385.65,5595880.05,382.920937,0.173366,-0.769971,-0.129966,0.789247,0.799876,2.890642,4.243616,-39.752,175.852
35 | 39,Point ZM,11/10/2017,Peg 14,10,1844385.94,5595878.798,382.340354,0.29041,-1.251359,-0.580583,1.284616,1.409721,4.947579,5.653337,-39.752,175.853
36 | 38,Point ZM,27/03/2018,Peg 14,11,1844386.266,5595877.572,381.821342,0.326149,-1.22618,-0.519012,1.268815,1.370863,2.996197,7.0242,-39.752,175.853
37 | 37,Point ZM,9/10/2018,Peg 14,12,1844386.718,5595875.801,381.602004,0.451874,-1.77079,-0.219338,1.827536,1.840651,3.427743,8.864851,-39.752,175.853
38 | 36,Point ZM,20/02/2020,Peg 14,13,1844387.38,5595873.439,381.389906,0.661587,-2.36204,-0.212098,2.452943,2.462096,1.800932,11.326947,-39.752,175.853
39 | 35,Point ZM,3/07/2015,Peg 19,1,1844646.966,5595690.229,360.973546,0,0,0,0,0,0,0,-39.7536,175.856
40 | 34,Point ZM,30/09/2015,Peg 19,2,1844646.618,5595689.803,360.696546,-0.348,-0.426,-0.277,0.550073,0.615881,2.525803,0.615881,-39.7536,175.856
41 | 33,Point ZM,7/12/2015,Peg 19,3,1844646.41,5595689.634,360.478572,-0.208134,-0.168778,-0.217973,0.267966,0.345425,1.854118,0.961305,-39.7536,175.856
42 | 32,Point ZM,17/03/2016,Peg 19,4,1844646.255,5595689.441,360.362073,-0.154317,-0.193199,-0.1165,0.247264,0.273334,0.987793,1.23464,-39.7536,175.856
43 | 31,Point ZM,11/07/2016,Peg 19,5,1844646.041,5595689.23,360.207386,-0.214093,-0.210852,-0.154687,0.30049,0.337968,1.063433,1.572608,-39.7536,175.856
44 | 30,Point ZM,14/12/2016,Peg 19,6,1844645.479,5595688.573,359.77514,-0.56179,-0.657465,-0.432246,0.864794,0.966801,2.262067,2.539409,-39.7536,175.856
45 | 29,Point ZM,20/03/2017,Peg 19,7,1844645.372,5595688.407,359.670041,-0.107697,-0.166469,-0.105099,0.198269,0.224402,0.853196,2.763811,-39.7536,175.856
46 | 28,Point ZM,29/06/2017,Peg 19,8,1844645.049,5595688.116,359.532196,-0.32288,-0.290837,-0.137845,0.434555,0.455894,1.647536,3.219705,-39.7536,175.856
47 | 27,Point ZM,11/10/2017,Peg 19,9,1844644.629,5595687.577,359.114558,-0.420213,-0.538355,-0.417638,0.682939,0.800516,2.809505,4.020221,-39.7536,175.856
48 | 26,Point ZM,27/03/2018,Peg 19,10,1844644.204,5595687.034,358.653305,-0.424988,-0.543653,-0.461253,0.690053,0.830017,1.814108,4.850238,-39.7536,175.856
49 | 25,Point ZM,9/10/2018,Peg 19,11,1844643.523,5595686.137,358.353708,-0.680349,-0.896802,-0.299597,1.125668,1.164855,2.169245,6.015093,-39.7536,175.856
50 | 24,Point ZM,20/02/2020,Peg 19,12,1844642.521,5595684.747,357.654439,-1.002749,-1.389702,-0.699269,1.713703,1.850879,1.35385,7.865972,-39.7536,175.856
51 | 23,Point ZM,3/07/2015,Peg 21,1,1844479.859,5595569.577,313.057546,0,0,0,0,0,0,0,-39.7547,175.854
52 | 22,Point ZM,30/09/2015,Peg 21,2,1844481.116,5595566.528,312.432546,1.257,-3.049,-0.625,3.297946,3.356646,13.766022,3.356646,-39.7548,175.854
53 | 21,Point ZM,7/12/2015,Peg 21,3,1844483.218,5595564.583,313.092572,2.101866,-1.944778,0.660026,2.863565,2.938645,15.773612,6.295292,-39.7548,175.854
54 | 20,Point ZM,17/03/2016,Peg 21,4,1844482.122,5595564.138,312.272227,-1.095793,-0.445287,-0.820345,1.182811,1.439448,5.201964,7.73474,-39.7548,175.854
55 | 19,Point ZM,11/07/2016,Peg 21,5,1844482.483,5595563.125,312.249361,0.360768,-1.013087,-0.022866,1.075406,1.075649,3.384585,8.810388,-39.7548,175.854
56 | 18,Point ZM,23/10/2016,Peg 21,6,1844483.709,5595560.163,311.887846,1.226624,-2.961959,-0.361515,3.205902,3.226221,11.322794,12.036609,-39.7548,175.854
57 | 17,Point ZM,14/12/2016,Peg 21,7,1844484.127,5595559.156,311.855769,0.417761,-1.007286,-0.032077,1.090481,1.090953,7.65765,13.127562,-39.7548,175.854
58 | 16,Point ZM,20/03/2017,Peg 21,8,1844484.381,5595558.487,311.850908,0.253535,-0.66884,-0.004861,0.715281,0.715298,2.719621,13.84286,-39.7548,175.854
59 | 15,Point ZM,29/06/2017,Peg 21,9,1844485.649,5595555.606,311.379595,1.268795,-2.880966,-0.471313,3.147984,3.183071,11.503178,17.025931,-39.7549,175.854
60 | 14,Point ZM,11/10/2017,Peg 21,10,1844487.756,5595551.331,310.509477,2.106446,-4.27556,-0.870118,4.766291,4.845063,17.004307,21.870994,-39.7549,175.854
61 | 13,Point ZM,27/03/2018,Peg 21,11,1844489.118,5595548.606,310.142791,1.362645,-2.724326,-0.366686,3.046105,3.068096,6.705718,24.939089,-39.7549,175.854
62 | 12,Point ZM,9/10/2018,Peg 21,12,1844492.342,5595542.531,309.128029,3.223497,-6.075451,-1.014762,6.877648,6.952106,12.946524,31.891196,-39.755,175.854
63 | 11,Point ZM,18/12/2019,Peg 21,13,1844500.215,5595530.201,304.42494,7.872857,-12.330169,-4.703089,14.62925,15.366652,12.893857,47.257848,-39.7551,175.854
64 | 10,Point ZM,3/07/2015,Peg 22,1,1844424.114,5595468.461,305.910546,0,0,0,0,0,0,0,-39.7557,175.853
65 | 9,Point ZM,30/09/2015,Peg 22,2,1844427.866,5595465.766,305.633546,3.752,-2.695,-0.277,4.619581,4.627878,18.979501,4.627878,-39.7557,175.853
66 | 8,Point ZM,7/12/2015,Peg 22,3,1844431.841,5595463.812,306.317572,3.974866,-1.953778,0.684026,4.429087,4.481596,24.055624,9.109474,-39.7557,175.853
67 | 7,Point ZM,17/03/2016,Peg 22,4,1844431.924,5595462.987,305.42486,0.082832,-0.825177,-0.892713,0.829324,1.218488,4.403448,10.327962,-39.7557,175.853
68 | 6,Point ZM,11/07/2016,Peg 22,5,1844433.821,5595461.673,305.20927,1.897806,-1.314237,-0.21559,2.308438,2.318483,7.295227,12.646446,-39.7557,175.853
69 | 5,Point ZM,23/10/2016,Peg 22,6,1844439.284,5595458.265,304.596376,5.462476,-3.408045,-0.612894,6.438433,6.467538,22.698573,19.113984,-39.7557,175.853
70 | 4,Point ZM,14/12/2016,Peg 22,7,1844441.409,5595456.998,304.367888,2.12534,-1.266593,-0.228488,2.474132,2.48466,17.440401,21.598644,-39.7558,175.853
71 | 3,Point ZM,20/03/2017,Peg 22,8,1844442.832,5595456.141,304.222367,1.422847,-0.857904,-0.145521,1.661473,1.667834,6.341243,23.266478,-39.7558,175.853
72 | 2,Point ZM,29/06/2017,Peg 22,9,1844448.518,5595452.874,303.422884,5.686166,-3.266741,-0.799483,6.55775,6.606304,23.874267,29.872782,-39.7558,175.853
73 | 1,Point ZM,11/10/2017,Peg 22,10,1844457.107,5595448.079,302.561676,8.588939,-4.794912,-0.861208,9.83672,9.874347,34.655161,39.747129,-39.7558,175.853
74 | 0,Point ZM,27/03/2018,Peg 22,11,1844466.281,5595443.182,300.925239,9.174168,-4.896754,-1.636437,10.399209,10.527178,23.008504,50.274307,-39.7559,175.854
75 |
--------------------------------------------------------------------------------
/peg_data/legacy/pegs.CPG:
--------------------------------------------------------------------------------
1 | UTF-8
--------------------------------------------------------------------------------
/peg_data/legacy/pegs.csv:
--------------------------------------------------------------------------------
1 | Survey date,Name,Survey number,Easting,Northing,Elevation (NZVD2016),E disp,N disp,V disp,Net H disp,net H&V disp,net disp/yr,cum net disp
2 | 43186,Peg 22,11,1844466.281,5595443.182,300.925239,9.174168,-4.896754,-1.636437,10.3992095,10.52717836,23.00850361,50.27430731
3 | 43019,Peg 22,10,1844457.107,5595448.079,302.561676,8.588939,-4.794912,-0.861208,9.836719689,9.874347242,34.65516099,39.74712895
4 | 42915,Peg 22,9,1844448.518,5595452.874,303.422884,5.686166,-3.266741,-0.799483,6.557749655,6.606304081,23.87426722,29.8727817
5 | 42814,Peg 22,8,1844442.832,5595456.141,304.222367,1.422847,-0.857903999,-0.145521,1.661473099,1.66783369,6.341242677,23.26647762
6 | 42718,Peg 22,7,1844441.409,5595456.998,304.367888,2.12534,-1.266593001,-0.228488,2.474131756,2.484659878,17.44040107,21.59864393
7 | 42666,Peg 22,6,1844439.284,5595458.265,304.596376,5.462476,-3.408044999,-0.612894,6.438432633,6.467538467,22.6985725,19.11398405
8 | 42562,Peg 22,5,1844433.821,5595461.673,305.20927,1.897806,-1.314236501,-0.21558975,2.308437825,2.318483154,7.295227165,12.64644559
9 | 42446,Peg 22,4,1844431.924,5595462.987,305.4248598,0.082832,-0.825176999,-0.8927125,0.829323954,1.218488337,4.403447951,10.32796243
10 | 42345,Peg 22,3,1844431.841,5595463.812,306.3175723,3.974866,-1.953778,0.6840265,4.429086609,4.481595747,24.05562423,9.109474095
11 | 42277,Peg 22,2,1844427.866,5595465.766,305.6335458,3.752,-2.695000001,-0.277,4.619581042,4.627878348,18.97950109,4.627878348
12 | 42188,Peg 22,1,1844424.114,5595468.461,305.9105458,0,0,0,0,0,0,0
13 | 43817,Peg 21,13,1844500.215,5595530.201,304.42494,7.872857,-12.330169,-4.703089,14.62924964,15.36665191,12.89385735,47.25784752
14 | 43382,Peg 21,12,1844492.342,5595542.531,309.128029,3.223497,-6.075451,-1.014762,6.877647691,6.952106132,12.94652418,31.89119561
15 | 43186,Peg 21,11,1844489.118,5595548.606,310.142791,1.362645,-2.724326001,-0.366686,3.046104652,3.068095855,6.705718486,24.93908948
16 | 43019,Peg 21,10,1844487.756,5595551.331,310.509477,2.106446,-4.27556,-0.870118,4.766290808,4.845062786,17.00430689,21.87099362
17 | 42915,Peg 21,9,1844485.649,5595555.606,311.379595,1.268795,-2.880965999,-0.471313,3.147984409,3.183071125,11.50317783,17.02593084
18 | 42814,Peg 21,8,1844484.381,5595558.487,311.850908,0.253535,-0.66884,-0.004861,0.715281023,0.715297541,2.719620858,13.84285971
19 | 42718,Peg 21,7,1844484.127,5595559.156,311.855769,0.417761,-1.007286,-0.032077,1.090481242,1.09095292,7.657650302,13.12756217
20 | 42666,Peg 21,6,1844483.709,5595560.163,311.887846,1.226624,-2.961959,-0.361515,3.205901987,3.2262208,11.32279415,12.03660925
21 | 42562,Peg 21,5,1844482.483,5595563.125,312.249361,0.360768,-1.013086502,-0.02286575,1.075405881,1.075648945,3.384585041,8.810388451
22 | 42446,Peg 21,4,1844482.122,5595564.138,312.2722268,-1.095793,-0.445286999,-0.8203455,1.182811401,1.439447654,5.201964295,7.734739506
23 | 42345,Peg 21,3,1844483.218,5595564.583,313.0925723,2.101866,-1.944778,0.6600265,2.863564588,2.938645459,15.77361165,6.295291852
24 | 42277,Peg 21,2,1844481.116,5595566.528,312.4325458,1.257,-3.049000002,-0.625,3.297946332,3.356646393,13.76602173,3.356646393
25 | 42188,Peg 21,1,1844479.859,5595569.577,313.0575458,0,0,0,0,0,0,0
26 | 43881,Peg 19,12,1844642.521,5595684.747,357.654439,-1.002749,-1.389702001,-0.699269,1.713702777,1.850879343,1.35384962,7.865972008
27 | 43382,Peg 19,11,1844643.523,5595686.137,358.353708,-0.680349,-0.896802,-0.299597,1.125668063,1.164854906,2.169245105,6.015092665
28 | 43186,Peg 19,10,1844644.204,5595687.034,358.653305,-0.424988,-0.543653,-0.461253,0.690053175,0.830016695,1.814108346,4.850237759
29 | 43019,Peg 19,9,1844644.629,5595687.577,359.114558,-0.420213,-0.538354999,-0.417638,0.682938556,0.800516439,2.809504811,4.020221064
30 | 42915,Peg 19,8,1844645.049,5595688.116,359.532196,-0.32288,-0.290837,-0.137845,0.434554548,0.455893517,1.647535978,3.219704624
31 | 42814,Peg 19,7,1844645.372,5595688.407,359.670041,-0.107697,-0.166469,-0.105099,0.198268938,0.224402254,0.85319607,2.763811107
32 | 42718,Peg 19,6,1844645.479,5595688.573,359.77514,-0.56179,-0.657465,-0.432246,0.86479375,0.966801342,2.262067242,2.539408853
33 | 42562,Peg 19,5,1844646.041,5595689.23,360.207386,-0.214093,-0.210851502,-0.15468675,0.300489881,0.337967689,1.063432816,1.572607511
34 | 42446,Peg 19,4,1844646.255,5595689.441,360.3620728,-0.154317,-0.193198998,-0.1164995,0.24726421,0.273334452,0.987792823,1.234639822
35 | 42345,Peg 19,3,1844646.41,5595689.634,360.4785723,-0.208134,-0.168778,-0.2179735,0.267965997,0.345424698,1.854117866,0.961305369
36 | 42277,Peg 19,2,1844646.618,5595689.803,360.6965458,-0.348,-0.426000001,-0.277,0.550072723,0.615880671,2.525802751,0.615880671
37 | 42188,Peg 19,1,1844646.966,5595690.229,360.9735458,0,0,0,0,0,0,0
38 | 43881,Peg 14,13,1844387.38,5595873.439,381.389906,0.661587,-2.36204,-0.212098,2.452943195,2.462095831,1.80093182,11.32694651
39 | 43382,Peg 14,12,1844386.718,5595875.801,381.602004,0.451874,-1.77079,-0.219338,1.827535865,1.840651106,3.427743132,8.86485068
40 | 43186,Peg 14,11,1844386.266,5595877.572,381.821342,0.326149,-1.22618,-0.519012,1.268814629,1.370862509,2.996196502,7.024199574
41 | 43019,Peg 14,10,1844385.94,5595878.798,382.340354,0.29041,-1.251359,-0.580583,1.284615629,1.409721226,4.947579302,5.653337064
42 | 42915,Peg 14,9,1844385.65,5595880.05,382.920937,0.173366,-0.769971,-0.129966,0.78924718,0.79987641,2.890642474,4.243615838
43 | 42814,Peg 14,8,1844385.477,5595880.82,383.050903,0.088518,-0.359072,-0.107633,0.369821764,0.385166198,1.464433982,3.443739428
44 | 42718,Peg 14,7,1844385.388,5595881.179,383.158536,0.074053,-0.391979,-0.130889,0.398912751,0.419837246,2.946934516,3.05857323
45 | 42666,Peg 14,6,1844385.314,5595881.571,383.289425,0.154755,-0.961502001,-0.231109,0.973876382,1.000922863,3.512854278,2.638735984
46 | 42562,Peg 14,5,1844385.159,5595882.532,383.520534,0.117654,-0.347588501,-0.00894475,0.366960801,0.3670698,1.155004113,1.637813121
47 | 42446,Peg 14,4,1844385.042,5595882.88,383.5294788,0.093861,-0.317691999,-0.0680935,0.331267405,0.338193462,1.222184295,1.270743321
48 | 42345,Peg 14,3,1844384.948,5595883.197,383.5975723,0.068866,-0.317778001,-0.0629735,0.3251544,0.331196385,1.777745301,0.932549858
49 | 42277,Peg 14,2,1844384.879,5595883.515,383.6605458,0.125,-0.575,-0.124,0.588430115,0.601353474,2.46622492,0.601353474
50 | 42188,Peg 14,1,1844384.754,5595884.09,383.7845458,0,0,0,0,0,0,0
51 | 43881,Peg 11,11,1844395.194,5596015.11,389.428943,0.124555,-1.099548999,-0.303295,1.106581199,1.147392612,0.839275157,4.708175931
52 | 43382,Peg 11,10,1844395.07,5596016.209,389.732238,0.082667,-0.74547,-0.06534,0.750039569,0.752880249,1.402047403,3.560783318
53 | 43186,Peg 11,9,1844394.987,5596016.955,389.797578,0.056703,-0.512391,-0.190452,0.51551893,0.549574136,1.201165029,2.807903069
54 | 43019,Peg 11,8,1844394.93,5596017.467,389.98803,0.08833,-0.496634,-0.175747,0.504427912,0.534167134,1.874721191,2.258328932
55 | 42915,Peg 11,7,1844394.842,5596017.964,390.163777,0.044952,-0.278915,0.005282,0.282514176,0.282563549,1.021145498,1.724161799
56 | 42814,Peg 11,6,1844394.797,5596018.243,390.158495,0.011494,-0.262995,-0.0351,0.263246049,0.265575775,0.654967282,1.44159825
57 | 42666,Peg 11,5,1844394.786,5596018.506,390.193595,0.069418,-0.455668,-0.147981,0.460925357,0.484097677,1.698996655,1.176022475
58 | 42562,Peg 11,4,1844394.716,5596018.962,390.341576,-0.014933,-0.192274502,-0.10174475,0.192853516,0.21804695,0.686096008,0.691924798
59 | 42446,Peg 11,3,1844394.731,5596019.154,390.4433208,0.03638,-0.118661999,0.0167485,0.124113554,0.125238519,0.452594648,0.473877848
60 | 42345,Peg 11,2,1844394.695,5596019.272,390.4265723,0.015866,-0.341778001,-0.0669735,0.342146068,0.348639329,0.810530923,0.348639329
61 | 42188,Peg 11,1,1844394.679,5596019.614,390.4935458,0,0,0,0,0,0,0
62 | 43817,Peg 05,13,1844577.583,5596364.12,414.539135,-0.005302,-0.179169,-0.043924,0.179247432,0.184550697,0.154852883,1.175857153
63 | 43382,Peg 05,12,1844577.588,5596364.3,414.583059,-0.011931,-0.1645,0.121676,0.164932103,0.204957673,0.381681381,0.991306456
64 | 43186,Peg 05,11,1844577.6,5596364.464,414.461383,-0.018561,-0.07267,-0.176956,0.07500293,0.192194863,0.420066618,0.786348783
65 | 43019,Peg 05,10,1844577.619,5596364.537,414.638339,-0.008838,-0.08748,-0.055969,0.087925313,0.104227586,0.365798739,0.59415392
66 | 42915,Peg 05,9,1844577.627,5596364.624,414.694308,-0.048609,-0.051803,0.039029,0.071037918,0.081053369,0.292915639,0.489926334
67 | 42814,Peg 05,8,1844577.676,5596364.676,414.655279,0.030079,-0.009122999,0.003642,0.031432075,0.031642369,0.120306925,0.408872965
68 | 42718,Peg 05,7,1844577.646,5596364.685,414.651637,-0.019601,-0.063732,-0.000579,0.066678085,0.066680599,0.468046512,0.377230596
69 | 42666,Peg 05,6,1844577.666,5596364.749,414.652216,0.003668,-0.095499001,-0.004959,0.095569416,0.095697989,0.335863133,0.310549997
70 | 42562,Peg 05,5,1844577.662,5596364.844,414.657175,-0.048504,-0.051585501,-0.04482875,0.070807499,0.083805243,0.263697533,0.214852008
71 | 42446,Peg 05,4,1844577.71,5596364.896,414.7020038,0.032707,-0.009563999,-0.0235685,0.034076648,0.041432984,0.14973306,0.131046765
72 | 42345,Peg 05,3,1844577.678,5596364.905,414.7255723,0.000866,0.003222001,0.0180265,0.003336352,0.018332647,0.098403179,0.089613782
73 | 42277,Peg 05,2,1844577.677,5596364.902,414.7075458,-0.016,-0.069000001,-0.008,0.070830785,0.071281135,0.292332743,0.071281135
74 | 42188,Peg 05,1,1844577.693,5596364.971,414.7155458,0,0,0,0,0,0,0
75 |
--------------------------------------------------------------------------------
/peg_data/legacy/pegs.dbf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/forrestfwilliams/pixeloffset_mintpy/01710e26cb79a16a8c385d70f2b80043aa8acde2/peg_data/legacy/pegs.dbf
--------------------------------------------------------------------------------
/peg_data/legacy/pegs.prj:
--------------------------------------------------------------------------------
1 | PROJCS["NZGD_2000_New_Zealand_Transverse_Mercator",GEOGCS["GCS_NZGD_2000",DATUM["D_NZGD_2000",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",1600000.0],PARAMETER["False_Northing",10000000.0],PARAMETER["Central_Meridian",173.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]],VERTCS["NZVD2016_height",VDATUM["New_Zealand_Vertical_Datum_2016"],PARAMETER["Vertical_Shift",0.0],PARAMETER["Direction",1.0],UNIT["Meter",1.0]]
--------------------------------------------------------------------------------
/peg_data/legacy/pegs.sbn:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/forrestfwilliams/pixeloffset_mintpy/01710e26cb79a16a8c385d70f2b80043aa8acde2/peg_data/legacy/pegs.sbn
--------------------------------------------------------------------------------
/peg_data/legacy/pegs.sbx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/forrestfwilliams/pixeloffset_mintpy/01710e26cb79a16a8c385d70f2b80043aa8acde2/peg_data/legacy/pegs.sbx
--------------------------------------------------------------------------------
/peg_data/legacy/pegs.shp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/forrestfwilliams/pixeloffset_mintpy/01710e26cb79a16a8c385d70f2b80043aa8acde2/peg_data/legacy/pegs.shp
--------------------------------------------------------------------------------
/peg_data/legacy/pegs.shp.xml:
--------------------------------------------------------------------------------
1 |
2 | 20200520152642001.0TRUECopyFeatures pegs_Layer C:\Users\localadmin\Desktop\pegData\peg5.shp # # # #XYTableToPoint pegs.csv C:\Users\localadmin\Desktop\pegData\peg5.shp Easting Northing "Elevation (NZVD2016)" "PROJCS['NZGD_2000_New_Zealand_Transverse_Mercator',GEOGCS['GCS_NZGD_2000',DATUM['D_NZGD_2000',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',1600000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',173.0],PARAMETER['Scale_Factor',0.9996],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]],VERTCS['NZVD2016_height',VDATUM['New_Zealand_Vertical_Datum_2016'],PARAMETER['Vertical_Shift',0.0],PARAMETER['Direction',1.0],UNIT['Meter',1.0]];-4020900 1900 450445547.391054;-100000 10000;-100000 10000;0.001;0.001;0.001;IsHighPrecision"Rename C:\Users\localadmin\Desktop\pegData\peg5.shp C:\Users\localadmin\Desktop\pegData\pegs.shp ShapeFileUpdateSchema "CIMDATA=<CIMStandardDataConnection xsi:type='typens:CIMStandardDataConnection' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:typens='http://www.esri.com/schemas/ArcGIS/2.2.0'><WorkspaceConnectionString>DATABASE=C:\Users\localadmin\Desktop\pegData</WorkspaceConnectionString><WorkspaceFactory>Shapefile</WorkspaceFactory><Dataset>pegs.shp</Dataset><DatasetType>esriDTAny</DatasetType></CIMStandardDataConnection>" <operationSequence><workflow><AddField><field_name>lat</field_name><field_type>LONG</field_type><field_is_nullable>False</field_is_nullable><field_is_required>False</field_is_required></AddField></workflow><workflow><AddField><field_name>lon</field_name><field_type>LONG</field_type><field_is_nullable>False</field_is_nullable><field_is_required>False</field_is_required></AddField></workflow></operationSequence>UpdateSchema "CIMDATA=<CIMStandardDataConnection xsi:type='typens:CIMStandardDataConnection' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:typens='http://www.esri.com/schemas/ArcGIS/2.2.0'><WorkspaceConnectionString>DATABASE=C:\Users\localadmin\Desktop\pegData</WorkspaceConnectionString><WorkspaceFactory>Shapefile</WorkspaceFactory><Dataset>pegs.shp</Dataset><DatasetType>esriDTAny</DatasetType></CIMStandardDataConnection>" <operationSequence><workflow><AddField><field_name>z</field_name><field_type>LONG</field_type><field_is_nullable>False</field_is_nullable><field_is_required>False</field_is_required></AddField></workflow><workflow><AddField><field_name>Field</field_name><field_type>LONG</field_type><field_is_nullable>False</field_is_nullable><field_is_required>False</field_is_required></AddField></workflow></operationSequence>DeleteField pegs FieldCalculateGeometryAttributes pegs "lat POINT_Y;lon POINT_Y" # # GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]CalculateGeometryAttributes pegs "lat POINT_Y;lon POINT_X" # # GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]DeleteField pegs lat;lon;zUpdateSchema "CIMDATA=<CIMStandardDataConnection xsi:type='typens:CIMStandardDataConnection' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:typens='http://www.esri.com/schemas/ArcGIS/2.2.0'><WorkspaceConnectionString>DATABASE=C:\Users\localadmin\Desktop\pegData</WorkspaceConnectionString><WorkspaceFactory>Shapefile</WorkspaceFactory><Dataset>pegs.shp</Dataset><DatasetType>esriDTAny</DatasetType></CIMStandardDataConnection>" <operationSequence><workflow><AddField><field_name>latitude</field_name><field_type>FLOAT</field_type><field_is_nullable>False</field_is_nullable><field_is_required>False</field_is_required></AddField></workflow><workflow><AddField><field_name>longitude</field_name><field_type>FLOAT</field_type><field_is_nullable>False</field_is_nullable><field_is_required>False</field_is_required></AddField></workflow></operationSequence>CalculateGeometryAttributes pegs "latitude POINT_Y;longitude POINT_X" # # GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]
3 |
--------------------------------------------------------------------------------
/peg_data/legacy/pegs.shx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/forrestfwilliams/pixeloffset_mintpy/01710e26cb79a16a8c385d70f2b80043aa8acde2/peg_data/legacy/pegs.shx
--------------------------------------------------------------------------------
/peg_data/legacy/pegs_32760.csv:
--------------------------------------------------------------------------------
1 | ,Survey date,Name,Survey number,Easting,Northing,Elevation (NZVD2016),E disp,N disp,V disp,Net H disp,net H&V disp,net disp/yr,cum net disp,Cumulative E disp,Cumulative N disp,geometry,Elevation
2 | 10,2015-07-03,Peg 22,1,401751.62801416474,5598733.206293851,305.91054575000004,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,POINT Z (401751.6280141647 5598733.206293851 305.91054575),305.91054575000004
3 | 9,2015-09-30,Peg 22,2,401755.494215025,5598730.6830592435,305.63354575,3.752000000094995,-2.695000001229346,-0.27700000000004366,4.6195810424040635,4.627878348372938,18.979501091641826,4.627878348372938,3.752000000094995,-2.695000001229346,POINT Z (401755.494215025 5598730.683059243 305.63354575),305.63354575
4 | 8,2015-12-07,Peg 22,3,401759.5498482182,5598728.909795545,306.31757225,3.974865999771282,-1.9537779996171594,0.6840265000000159,4.429086608763232,4.481595747122676,24.055624230879072,9.109474095495614,7.726865999866277,-4.648778000846505,POINT Z (401759.5498482182 5598728.909795545 306.31757225),306.31757225
5 | 7,2016-03-17,Peg 22,4,401759.6693668098,5598728.089645793,305.42485975,0.08283200021833181,-0.8251769989728928,-0.892712500000016,0.8293239535272565,1.2184883370596362,4.4034479507600714,10.32796243255525,7.809698000084609,-5.473954999819398,POINT Z (401759.6693668098 5598728.089645793 305.42485975),305.42485975
6 | 6,2016-07-11,Peg 22,5,401761.62275374756,5598726.862211483,305.20927,1.897805999731645,-1.3142365012317896,-0.21558974999999236,2.308437825410813,2.3184831537219464,7.295227164728538,12.646445586277196,9.707503999816254,-6.7881915010511875,POINT Z (401761.6227537476 5598726.862211483 305.20927),305.20927
7 | 5,2016-10-23,Peg 22,6,401767.2284877434,5598723.703405857,304.596376,5.4624759999569505,-3.4080449994653463,-0.612893999999983,6.438432632907363,6.467538467123517,22.698572504808496,19.113984053400713,15.169979999773204,-10.196236500516534,POINT Z (401767.2284877434 5598723.703405857 304.596376),304.596376
8 | 4,2016-12-14,Peg 22,7,401769.40691561846,5598722.53369114,304.367888,2.1253400000277907,-1.2665930008515716,-0.2284880000000271,2.474131755894241,2.4846598784679426,17.440401070015366,21.598643931868658,17.295319999800995,-11.462829501368105,POINT Z (401769.4069156185 5598722.53369114 304.367888),304.367888
9 | 3,2017-03-20,Peg 22,8,401770.8657476876,5598721.740660141,304.222367,1.422846999950707,-0.8579039992764592,-0.1455209999999738,1.6614730985614152,1.6678336903553252,6.3412426768718095,23.266477622223984,18.718166999751702,-12.320733500644565,POINT Z (401770.8657476876 5598721.740660141 304.222367),304.222367
10 | 2,2017-06-29,Peg 22,9,401776.68850536464,5598718.732912325,303.422884,5.686166000086814,-3.2667410001158714,-0.7994830000000093,6.557749655360543,6.606304080926819,23.874267223151374,29.872781703150803,24.404332999838516,-15.587474500760436,POINT Z (401776.6885053646 5598718.732912325 303.422884),303.422884
11 | 1,2017-10-11,Peg 22,10,401785.47754107835,5598714.328984368,302.56167600000003,8.588938999921083,-4.794912000186741,-0.8612079999999764,9.836719688691968,9.874347241877013,34.65516099312605,39.74712894502782,32.9932719997596,-20.382386500947177,POINT Z (401785.4775410783 5598714.328984368 302.561676),302.56167600000003
12 | 0,2018-03-27,Peg 22,11,401794.85540535086,5598709.849492993,300.925239,9.174167999997735,-4.896754000335932,-1.6364370000000577,10.399209500341282,10.527178363025753,23.00850360781078,50.27430730805357,42.167439999757335,-25.27914050128311,POINT Z (401794.8554053509 5598709.849492993 300.925239),300.925239
13 | 12,2015-07-03,Peg 21,1,401802.7712282605,5598836.646526802,313.05754575000003,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,POINT Z (401802.7712282605 5598836.646526802 313.05754575),313.05754575000003
14 | 11,2015-09-30,Peg 21,2,401804.1622466405,5598833.658534092,312.43254575000003,1.2570000002160668,-3.049000001512468,-0.625,3.297946332153727,3.356646393316731,13.766021725400078,3.356646393316731,1.2570000002160668,-3.049000001512468,POINT Z (401804.1622466405 5598833.658534092 312.43254575),312.43254575000003
15 | 10,2015-12-07,Peg 21,3,401806.3474972726,5598831.810679694,313.09257225000005,2.101865999866277,-1.9447780000045896,0.660026500000015,2.863564588183007,2.9386454586080957,15.773611652822867,6.295291851924826,3.358866000082344,-4.993778001517057,POINT Z (401806.3474972726 5598831.810679694 313.09257225),313.09257225000005
16 | 9,2016-03-17,Peg 21,4,401805.2733412155,5598831.317216797,312.27222675,-1.0957929999567568,-0.4452869985252619,-0.8203455000000304,1.182811400777768,1.4394476541994035,5.201964294879033,7.73473950612423,2.263073000125587,-5.439065000042319,POINT Z (401805.2733412155 5598831.317216797 312.27222675),312.27222675
17 | 8,2016-07-11,Peg 21,5,401805.67873112636,5598830.321862534,312.249361,0.36076799989677966,-1.0130865015089512,-0.022865749999994023,1.0754058811858753,1.0756489445038429,3.3845850408957125,8.810388450628073,2.6238410000223666,-6.4521515015512705,POINT Z (401805.6787311264 5598830.321862534 312.249361),312.249361
18 | 7,2016-10-23,Peg 21,6,401807.03553886915,5598827.419415135,311.887846,1.2266239998862147,-2.9619589997455478,-0.36151499999999714,3.205901987470999,3.2262207997121806,11.322794152836018,12.036609250340254,3.8504649999085814,-9.414110501296818,POINT Z (401807.0355388692 5598827.419415135 311.887846),311.887846
19 | 6,2016-12-14,Peg 21,7,401807.49757102475,5598826.432395076,311.855769,0.41776100010611117,-1.0072860000655055,-0.03207700000001523,1.0904812419925543,1.0909529197296393,7.65765030194843,13.127562170069893,4.2682260000146925,-10.421396501362324,POINT Z (401807.4975710248 5598826.432395076 311.855769),311.855769
20 | 5,2017-03-20,Peg 21,8,401807.7805406683,5598825.775947111,311.850908,0.2535349999088794,-0.6688400004059076,-0.004861000000005333,0.7152810233200444,0.7152975406379991,2.7196208576340593,13.842859710707893,4.521760999923572,-11.090236501768231,POINT Z (401807.7805406683 5598825.775947111 311.850908),311.850908
21 | 4,2017-06-29,Peg 21,9,401809.17583752715,5598822.956243799,311.379595,1.268794999923557,-2.8809659993276,-0.4713130000000092,3.1479844092867895,3.183071124728712,11.5031778269899,17.025930835436604,5.790555999847129,-13.971202501095831,POINT Z (401809.1758375271 5598822.956243799 311.379595),311.379595
22 | 3,2017-10-11,Peg 21,10,401811.46966085926,5598818.78157312,310.509477,2.1064460000488907,-4.275559999980032,-0.8701179999999908,4.766290807803404,4.845062785813535,17.004306892518656,21.87099362125014,7.89700199989602,-18.246762501075864,POINT Z (401811.4696608593 5598818.78157312 310.509477),310.509477
23 | 2,2018-03-27,Peg 21,11,401812.95166708686,5598816.122444818,310.142791,1.3626449999865144,-2.724326000548899,-0.3666860000000156,3.0461046523806448,3.0680958550623902,6.705718485615404,24.93908947631253,9.259646999882534,-20.971088501624763,POINT Z (401812.9516670869 5598816.122444818 310.142791),310.142791
24 | 1,2018-10-09,Peg 21,12,401816.4410506793,5598810.2006310215,309.128029,3.2234970000572503,-6.07545099966228,-1.014761999999962,6.877647690793379,6.952106132339999,12.946524175020917,31.89119560865253,12.483143999939784,-27.046539501287043,POINT Z (401816.4410506793 5598810.200631022 309.128029),309.128029
25 | 0,2019-12-18,Peg 21,13,401824.8513794274,5598798.24164933,304.42494,7.872856999980286,-12.33016899973154,-4.703089000000034,14.629249635715405,15.366651913998725,12.893857353125366,47.257847522651254,20.35600099992007,-39.376708501018584,POINT Z (401824.8513794274 5598798.24164933 304.42494),304.42494
26 | 12,2015-07-03,Peg 14,1,401693.78645661805,5599146.4087144565,383.78454575,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,POINT Z (401693.7864566181 5599146.408714456 383.78454575),383.78454575
27 | 11,2015-09-30,Peg 14,2,401693.9369100927,5599145.840218906,383.66054575,0.12500000023283064,-0.5750000001862645,-0.12400000000002365,0.5884301150284644,0.6013534736512443,2.466224920030384,0.6013534736512443,0.12500000023283064,-0.5750000001862645,POINT Z (401693.9369100927 5599145.840218906 383.66054575),383.66054575
28 | 10,2015-12-07,Peg 14,3,401694.0198434921,5599145.52602599,383.59757225000004,0.06886599981226027,-0.3177780006080866,-0.0629734999999414,0.3251543996328749,0.3311963847973856,1.777745300750673,0.9325498584486298,0.1938660000450909,-0.8927780007943511,POINT Z (401694.0198434921 5599145.52602599 383.59757225),383.59757225000004
29 | 9,2016-03-17,Peg 14,4,401694.12772774685,5599145.213034157,383.52947875,0.09386100014671683,-0.3176919985562563,-0.06809350000003178,0.33126740451666886,0.3381934624404568,1.2221842949580863,1.2707433208890866,0.28772700019180775,-1.2104699993506074,POINT Z (401694.1277277468 5599145.213034157 383.52947875),383.52947875
30 | 8,2016-07-11,Peg 14,5,401694.2607005397,5599144.871255615,383.520534,0.11765399971045554,-0.3475885009393096,-0.008944750000011936,0.3669608012214715,0.3670698001547758,1.1550041125559756,1.6378131210438625,0.4053809999022633,-1.558058500289917,POINT Z (401694.2607005397 5599144.871255615 383.520534),383.520534
31 | 7,2016-10-23,Peg 14,6,401694.4581057897,5599143.918208948,383.289425,0.15475500002503395,-0.9615020006895065,-0.23110900000000356,0.973876381971897,1.000922862783978,3.5128542780399226,2.63873598382784,0.5601359999272972,-2.5195605009794235,POINT Z (401694.4581057897 5599143.918208948 383.289425),383.289425
32 | 6,2016-12-14,Peg 14,7,401694.54952849227,5599143.530166129,383.158536,0.0740529999602586,-0.3919789995998144,-0.13088899999996784,0.39891275102506485,0.4198372461459047,2.946934516216446,3.058573229973745,0.6341889998875558,-2.911539500579238,POINT Z (401694.5495284923 5599143.530166129 383.158536),383.158536
33 | 5,2017-03-20,Peg 14,8,401694.6539246414,5599143.175622635,383.050903,0.08851799997501075,-0.3590719997882843,-0.10763300000002118,0.36982176430212116,0.38516619794646856,1.4644339817756358,3.4437394279202134,0.7227069998625666,-3.2706115003675222,POINT Z (401694.6539246414 5599143.175622635 383.050903),383.050903
34 | 4,2017-06-29,Peg 14,9,401694.8613652532,5599142.4146284815,382.920937,0.17336600017733872,-0.7699710000306368,-0.12996600000002445,0.7892471798528443,0.7998764104920674,2.8906424735604417,4.243615838412281,0.8960730000399053,-4.040582500398159,POINT Z (401694.8613652532 5599142.414628481 382.920937),382.920937
35 | 3,2017-10-11,Peg 14,10,401695.2071394578,5599141.178244845,382.340354,0.2904099998995662,-1.2513589998707175,-0.5805829999999901,1.2846156291276813,1.4097212258060445,4.947579302107752,5.653337064218325,1.1864829999394715,-5.2919415002688766,POINT Z (401695.2071394578 5599141.178244845 382.340354),382.340354
36 | 2,2018-03-27,Peg 14,11,401695.58747161645,5599139.968594205,381.821342,0.32614900008775294,-1.22618000023067,-0.5190119999999752,1.268814629181082,1.3708625092867268,2.996196502333265,7.024199573505053,1.5126320000272244,-6.5181215004995465,POINT Z (401695.5874716165 5599139.968594205 381.821342),381.821342
37 | 1,2018-10-09,Peg 14,12,401696.1176251961,5599138.220821373,381.602004,0.4518740000203252,-1.7707900004461408,-0.21933799999999337,1.82753586492151,1.8406511064887907,3.4277431319816767,8.864850679993843,1.9645060000475496,-8.288911500945687,POINT Z (401696.1176251961 5599138.220821373 381.602004),381.602004
38 | 0,2020-02-20,Peg 14,13,401696.8835337397,5599135.8921089275,381.389906,0.6615869998931885,-2.362040000036359,-0.21209800000002588,2.4529431954693592,2.462095831157561,1.8009318203857914,11.326946511151405,2.626092999940738,-10.650951500982046,POINT Z (401696.8835337397 5599135.892108927 381.389906),381.389906
39 | 10,2015-07-03,Peg 11,1,401697.6487895199,5599282.156985761,390.49354575,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,POINT Z (401697.6487895199 5599282.156985761 390.49354575),390.49354575
40 | 9,2015-12-07,Peg 11,2,401697.6798788146,5599281.816466811,390.42657225000005,0.015865999972447753,-0.34177800081670284,-0.0669734999999605,0.34214606792624086,0.34863932867597214,0.8105309233549671,0.34863932867597214,0.015865999972447753,-0.34177800081670284,POINT Z (401697.6798788146 5599281.816466811 390.42657225),390.42657225000005
41 | 8,2016-03-17,Peg 11,3,401697.72149441106,5599281.699619315,390.44332075,0.0363800001796335,-0.11866199877113104,0.016748499999948763,0.12411355431793111,0.1252385189056399,0.4525946475302827,0.473877847581612,0.05224600015208125,-0.4604399995878339,POINT Z (401697.7214944111 5599281.699619315 390.44332075),390.44332075
42 | 7,2016-07-11,Peg 11,4,401697.7151640759,5599281.506988628,390.34157600000003,-0.014933000318706036,-0.19227450154721737,-0.10174474999996619,0.19285351550788324,0.21804695044027783,0.6860960078508742,0.6919247980218899,0.037312999833375216,-0.6527145011350513,POINT Z (401697.7151640759 5599281.506988628 390.341576),390.34157600000003
43 | 6,2016-10-23,Peg 11,5,401697.8048003686,5599281.055152639,390.193595,0.06941800005733967,-0.45566799957305193,-0.14798100000001568,0.4609253568278357,0.4840976770527538,1.6989966550409148,1.1760224750746437,0.10673099989071488,-1.1083825007081032,POINT Z (401697.8048003686 5599281.055152639 390.193595),390.193595
44 | 5,2017-03-20,Peg 11,6,401697.8280097072,5599280.793094578,390.158495,0.011493999976664782,-0.2629949999973178,-0.03509999999999991,0.2632460485155528,0.26557577460877857,0.6549672819743526,1.4415982496834223,0.11822499986737967,-1.371377500705421,POINT Z (401697.8280097072 5599280.793094578 390.158495),390.158495
45 | 4,2017-06-29,Peg 11,7,401697.885333385,5599280.516634966,390.163777,0.0449520000256598,-0.27891500014811754,0.005281999999965592,0.2825141759521659,0.282563548848628,1.0211454983143486,1.7241617985320503,0.16317699989303946,-1.6502925008535385,POINT Z (401697.885333385 5599280.516634966 390.163777),390.163777
46 | 3,2017-10-11,Peg 11,8,401697.9956789357,5599280.024742826,389.98803000000004,0.08832999994046986,-0.4966339999809861,-0.17574699999994436,0.5044279124182142,0.5341671338032489,1.8747211907517867,2.2583289323352993,0.2515069998335093,-2.1469265008345246,POINT Z (401697.9956789357 5599280.024742826 389.98803),389.98803000000004
47 | 2,2018-03-27,Peg 11,9,401698.0751515104,5599279.515708014,389.797578,0.05670300009660423,-0.5123910000547767,-0.19045200000005025,0.5155189299696856,0.5495741364557731,1.201165028780582,2.8079030687910724,0.30820999993011355,-2.6593175008893013,POINT Z (401698.0751515104 5599279.515708014 389.797578),389.797578
48 | 1,2018-10-09,Peg 11,10,401698.19094535435,5599278.7751285015,389.732238,0.08266699989326298,-0.7454700004309416,-0.06533999999999196,0.7500395685654596,0.7528802494513054,1.4020474033149308,3.560783318242378,0.39087699982337654,-3.404787501320243,POINT Z (401698.1909453543 5599278.775128501 389.732238),389.732238
49 | 0,2020-02-20,Peg 11,11,401698.36435737193,5599277.682909886,389.428943,0.1245550001040101,-1.0995489992201328,-0.30329499999999143,1.1065811988900343,1.1473926123005587,0.8392751572939958,4.708175930542937,0.5154319999273866,-4.504336500540376,POINT Z (401698.3643573719 5599277.682909886 389.428943),389.428943
50 | 12,2015-07-03,Peg 05,1,401864.95948031195,5599635.121948451,414.71554575,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,POINT Z (401864.959480312 5599635.121948451 414.71554575),414.71554575
51 | 11,2015-09-30,Peg 05,2,401864.94658445835,5599635.052346003,414.70754575,-0.015999999828636646,-0.06900000106543303,-0.007999999999981355,0.07083078526704424,0.07128113454165719,0.2923327427832008,0.07128113454165719,-0.015999999828636646,-0.06900000106543303,POINT Z (401864.9465844583 5599635.052346003 414.70754575),414.70754575
52 | 10,2015-12-07,Peg 05,3,401864.947305316,5599635.0556014385,414.72557225,0.0008659998420625925,0.0032220007851719856,0.01802650000001904,0.0033363520177135575,0.018332647027551364,0.09840317889788601,0.08961378156920854,-0.015133999986574054,-0.06577800028026104,POINT Z (401864.947305316 5599635.055601439 414.72557225),414.72557225
53 | 9,2016-03-17,Peg 05,4,401864.980386207,5599635.047512045,414.70200375,0.03270700015127659,-0.009563999250531197,-0.023568500000010317,0.034076648024120096,0.04143298363393896,0.14973305966720515,0.1310467652031475,0.017573000164702535,-0.07534199953079224,POINT Z (401864.980386207 5599635.047512045 414.70200375),414.70200375
54 | 8,2016-07-11,Peg 05,5,401864.9342618955,5599634.993845879,414.657175,-0.04850400029681623,-0.05158550105988979,-0.044828750000021955,0.07080749935136418,0.08380524321877425,0.26369753254183276,0.21485200842192176,-0.030931000132113695,-0.12692750059068203,POINT Z (401864.9342618955 5599634.993845879 414.657175),414.657175
55 | 7,2016-10-23,Peg 05,6,401864.9421845043,5599634.898664657,414.652216,0.003667999990284443,-0.0954990005120635,-0.004958999999985281,0.09556941625191519,0.09569798850410433,0.33586313273075075,0.3105499969260261,-0.027263000141829252,-0.22242650110274553,POINT Z (401864.9421845043 5599634.898664657 414.652216),414.652216
56 | 6,2016-12-14,Peg 05,7,401864.9254584389,5599634.834161055,414.651637,-0.019601000007241964,-0.06373200006783009,-0.0005790000000160944,0.06667808510995044,0.06668059893949523,0.4680465117868415,0.3772305958655213,-0.04686400014907122,-0.2861585011705756,POINT Z (401864.9254584389 5599634.834161055 414.651637),414.651637
57 | 5,2017-03-20,Peg 05,8,401864.9558958976,5599634.826394706,414.655279,0.030079000163823366,-0.009122999384999275,0.003642000000013468,0.03143207547448917,0.03164236926391704,0.12030692480551791,0.4088729651294384,-0.01678499998524785,-0.2952815005555749,POINT Z (401864.9558958976 5599634.826394706 414.655279),414.655279
58 | 4,2017-06-29,Peg 05,9,401864.9096764586,5599634.7725067055,414.694308,-0.04860900016501546,-0.05180300027132034,0.03902899999997089,0.07103791758035204,0.08105336868477842,0.29291563930637743,0.4899263338142168,-0.06539400015026331,-0.34708450082689524,POINT Z (401864.9096764586 5599634.772506705 414.694308),414.694308
59 | 3,2017-10-11,Peg 05,10,401864.90475549834,5599634.684773608,414.63833900000003,-0.008838000008836389,-0.08748000022023916,-0.055968999999947755,0.0879253130940643,0.10422758580953215,0.36579873865845414,0.594153919623749,-0.0742320001590997,-0.4345645010471344,POINT Z (401864.9047554983 5599634.684773608 414.638339),414.63833900000003
60 | 2,2018-03-27,Peg 05,11,401864.88946650876,5599634.611392831,414.461383,-0.018561000004410744,-0.0726699996739626,-0.17695600000001832,0.07500293043460007,0.1921948633803306,0.42006661756778846,0.7863487830040796,-0.09279300016351044,-0.507234500721097,POINT Z (401864.8894665088 5599634.611392831 414.461383),414.461383
61 | 1,2018-10-09,Peg 05,12,401864.88489365985,5599634.446626058,414.583059,-0.01193099981173873,-0.16449999995529652,0.12167599999997947,0.16493210342986675,0.2049576729907794,0.38168138082466574,0.991306455994859,-0.10472399997524917,-0.6717345006763935,POINT Z (401864.8848936599 5599634.446626058 414.583059),414.583059
62 | 0,2019-12-18,Peg 05,13,401864.8875935464,5599634.267509701,414.539135,-0.005302000092342496,-0.17916900012642145,-0.04392400000000407,0.17924743181223213,0.1845506965234246,0.15485288328977007,1.1758571525182835,-0.11002600006759167,-0.850903500802815,POINT Z (401864.8875935464 5599634.267509701 414.539135),414.539135
63 |
--------------------------------------------------------------------------------
/peg_data/pegs.CPG:
--------------------------------------------------------------------------------
1 | ISO-8859-1
--------------------------------------------------------------------------------
/peg_data/pegs.dbf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/forrestfwilliams/pixeloffset_mintpy/01710e26cb79a16a8c385d70f2b80043aa8acde2/peg_data/pegs.dbf
--------------------------------------------------------------------------------
/peg_data/pegs.prj:
--------------------------------------------------------------------------------
1 | PROJCS["WGS_1984_UTM_Zone_60S",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",10000000.0],PARAMETER["Central_Meridian",177.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]
--------------------------------------------------------------------------------
/peg_data/pegs.shp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/forrestfwilliams/pixeloffset_mintpy/01710e26cb79a16a8c385d70f2b80043aa8acde2/peg_data/pegs.shp
--------------------------------------------------------------------------------
/peg_data/pegs.shx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/forrestfwilliams/pixeloffset_mintpy/01710e26cb79a16a8c385d70f2b80043aa8acde2/peg_data/pegs.shx
--------------------------------------------------------------------------------
/peg_data/prep_peg_data.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "id": "0ca5703d-03e8-461d-ba34-850ea92d535d",
6 | "metadata": {},
7 | "source": [
8 | "# Prep Peg Data"
9 | ]
10 | },
11 | {
12 | "cell_type": "markdown",
13 | "id": "1a41c604-1220-465e-bf89-fb8d58aa60cf",
14 | "metadata": {
15 | "jp-MarkdownHeadingCollapsed": true,
16 | "tags": []
17 | },
18 | "source": [
19 | "## In geo environment (not MintPy!)"
20 | ]
21 | },
22 | {
23 | "cell_type": "code",
24 | "execution_count": 46,
25 | "id": "3d703829-6d97-4b01-81be-dc07131b251e",
26 | "metadata": {},
27 | "outputs": [],
28 | "source": [
29 | "%matplotlib inline\n",
30 | "import pandas as pd\n",
31 | "import geopandas as gpd\n",
32 | "import matplotlib.pyplot as plt\n",
33 | "from datetime import datetime"
34 | ]
35 | },
36 | {
37 | "cell_type": "code",
38 | "execution_count": 70,
39 | "id": "433b994f-20e6-459c-ac58-c5cc3fa373eb",
40 | "metadata": {},
41 | "outputs": [],
42 | "source": [
43 | "path = 'peg_data/Rangitikei Landslide_peg displacement_sample.xlsx'\n",
44 | "names = ['P22','P21','P14','P11','P5']\n",
45 | "df = pd.DataFrame()\n",
46 | "\n",
47 | "for n in names:\n",
48 | " temp = pd.read_excel(path, sheet_name=n).sort_values('Survey date')\n",
49 | " temp['Cumulative E disp'] = temp['E disp'].cumsum()\n",
50 | " temp['Cumulative N disp'] = temp['N disp'].cumsum()\n",
51 | " df = df.append(temp)"
52 | ]
53 | },
54 | {
55 | "cell_type": "code",
56 | "execution_count": 71,
57 | "id": "80c3bda9-c6dc-4fba-b00d-283f5fe87e33",
58 | "metadata": {},
59 | "outputs": [],
60 | "source": [
61 | "pegs = gpd.GeoDataFrame(df, geometry=gpd.points_from_xy(x=df['Easting'], y=df['Northing'], z=df['Elevation (NZVD2016)'], crs='EPSG:2193'))"
62 | ]
63 | },
64 | {
65 | "cell_type": "code",
66 | "execution_count": 72,
67 | "id": "6371acb6-a93e-4689-af11-e0de269e7a57",
68 | "metadata": {},
69 | "outputs": [],
70 | "source": [
71 | "pegs = pegs.to_crs(epsg=32760)\n",
72 | "\n",
73 | "pegs['Easting'] = pegs.geometry.x\n",
74 | "pegs['Northing'] = pegs.geometry.y\n",
75 | "pegs['Elevation'] = pegs.geometry.z"
76 | ]
77 | },
78 | {
79 | "cell_type": "code",
80 | "execution_count": 73,
81 | "id": "ba3c9c3c-91a1-4693-a2ef-9844c6363db8",
82 | "metadata": {},
83 | "outputs": [
84 | {
85 | "name": "stdout",
86 | "output_type": "stream",
87 | "text": [
88 | "Index(['Survey date', 'Name', 'Survey number', 'Easting', 'Northing',\n",
89 | " 'Elevation (NZVD2016)', 'E disp', 'N disp', 'V disp', 'Net H disp',\n",
90 | " 'net H&V disp', 'net disp/yr', 'cum net disp', 'Cumulative E disp',\n",
91 | " 'Cumulative N disp', 'geometry', 'Elevation'],\n",
92 | " dtype='object')\n"
93 | ]
94 | }
95 | ],
96 | "source": [
97 | "pegs.to_csv('peg_data/pegs_32760.csv')\n",
98 | "print(pegs.columns)"
99 | ]
100 | },
101 | {
102 | "cell_type": "code",
103 | "execution_count": null,
104 | "id": "82639ecf-c5a2-4b00-b646-f85d12860c9c",
105 | "metadata": {},
106 | "outputs": [],
107 | "source": []
108 | }
109 | ],
110 | "metadata": {
111 | "kernelspec": {
112 | "display_name": "Python 3 (ipykernel)",
113 | "language": "python",
114 | "name": "python3"
115 | },
116 | "language_info": {
117 | "codemirror_mode": {
118 | "name": "ipython",
119 | "version": 3
120 | },
121 | "file_extension": ".py",
122 | "mimetype": "text/x-python",
123 | "name": "python",
124 | "nbconvert_exporter": "python",
125 | "pygments_lexer": "ipython3",
126 | "version": "3.8.10"
127 | }
128 | },
129 | "nbformat": 4,
130 | "nbformat_minor": 5
131 | }
132 |
--------------------------------------------------------------------------------
/peg_data/sam_message.txt:
--------------------------------------------------------------------------------
1 | Re: Survey Peg Movement_Analysis_November2020.xlsx
2 |
3 | Attached are the GPS data for the Rangitikei Pegs in Excel file. The excel file is rather complicated, but if you use the fourth sheet labelled as 'Movement graphs v2' you can query the sheet for any pegs in the landslide you want data for. To do so follow the instructions, but essentially you replace the number in the green cell (L5) with the peg number of interest (e.g. peg 1), and then you can copy the results (from top block of pink cells) for each peg. The only tricky thing is when there are data missing from one or more dates (shown as 'null' in the summary table starting in cell O8). In that situation you have to adjust the pink rows in lines 9-22, by copy and pasting to move the pink cells up. If it is the earliest date (bottom row) that has data missing, then just delete the data in columns G-L for that row. To reinstate the pink cells again for each new query (if you have adjusted the pink cells), copy and paste from the master block.
4 |
5 | Instructions: To get a graph for a survey peg, enter survey mark exact name into the GREEN cell below. You can edit the top block of results to adjust the graph for missing data shown as null in table below right. Do that by copy and pasting pink rows belw to move them up to overwrite a null row). Afterwards reinstate the top block by copying from the master block
--------------------------------------------------------------------------------
/testGeogridOptical.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 | # Copyright 2019 California Institute of Technology. ALL RIGHTS RESERVED.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 | # United States Government Sponsorship acknowledged. This software is subject to
19 | # U.S. export control laws and regulations and has been classified as 'EAR99 NLR'
20 | # (No [Export] License Required except when exporting to an embargoed country,
21 | # end user, or in support of a prohibited end use). By downloading this software,
22 | # the user agrees to comply with all applicable U.S. export laws and regulations.
23 | # The user has the responsibility to obtain export licenses, or other export
24 | # authority as may be required before exporting this software to any 'EAR99'
25 | # embargoed foreign country or citizen of those countries.
26 | #
27 | # Authors: Piyush Agram, Yang Lei
28 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29 |
30 |
31 | def cmdLineParse():
32 | '''
33 | Command line parser.
34 | '''
35 | import argparse
36 |
37 | parser = argparse.ArgumentParser(description='Output geo grid')
38 | parser.add_argument('-m', '--input_m', dest='indir_m', type=str, required=True,
39 | help='Input master image file name (in GeoTIFF format and Cartesian coordinates)')
40 | parser.add_argument('-s', '--input_s', dest='indir_s', type=str, required=True,
41 | help='Input slave image file name (in GeoTIFF format and Cartesian coordinates)')
42 | # parser.add_argument('-o', '--output', dest='outfile', type=str, default='geogrid.csv',
43 | # help='Output grid mapping')
44 | parser.add_argument('-d', '--dem', dest='demfile', type=str, required=True,
45 | help='Input DEM')
46 | parser.add_argument('-sx', '--dhdx', dest='dhdxfile', type=str, default="",
47 | help='Input slope in X')
48 | parser.add_argument('-sy', '--dhdy', dest='dhdyfile', type=str, default="",
49 | help='Input slope in Y')
50 | parser.add_argument('-vx', '--vx', dest='vxfile', type=str, default="",
51 | help='Input velocity in X')
52 | parser.add_argument('-vy', '--vy', dest='vyfile', type=str, default="",
53 | help='Input velocity in Y')
54 | parser.add_argument('-srx', '--srx', dest='srxfile', type=str, default="",
55 | help='Input search range in X')
56 | parser.add_argument('-sry', '--sry', dest='sryfile', type=str, default="",
57 | help='Input search range in Y')
58 | parser.add_argument('-csminx', '--csminx', dest='csminxfile', type=str, default="",
59 | help='Input chip size min in X')
60 | parser.add_argument('-csminy', '--csminy', dest='csminyfile', type=str, default="",
61 | help='Input chip size min in Y')
62 | parser.add_argument('-csmaxx', '--csmaxx', dest='csmaxxfile', type=str, default="",
63 | help='Input chip size max in X')
64 | parser.add_argument('-csmaxy', '--csmaxy', dest='csmaxyfile', type=str, default="",
65 | help='Input chip size max in Y')
66 | parser.add_argument('-ssm', '--ssm', dest='ssmfile', type=str, default="",
67 | help='Input stable surface mask')
68 |
69 | return parser.parse_args()
70 |
71 | class Dummy(object):
72 | pass
73 |
74 |
75 | def coregisterLoadMetadata(indir_m, indir_s):
76 | '''
77 | Input file.
78 | '''
79 | import os
80 | import numpy as np
81 |
82 | from osgeo import gdal, osr
83 | import struct
84 | import re
85 |
86 | from geogrid import GeogridOptical
87 | # import isce
88 | # from components.contrib.geo_autoRIFT.geogrid import GeogridOptical
89 |
90 | obj = GeogridOptical()
91 |
92 | x1a, y1a, xsize1, ysize1, x2a, y2a, xsize2, ysize2, trans = obj.coregister(indir_m, indir_s)
93 |
94 | DS = gdal.Open(indir_m, gdal.GA_ReadOnly)
95 |
96 | info = Dummy()
97 | info.startingX = trans[0]
98 | info.startingY = trans[3]
99 | info.XSize = trans[1]
100 | info.YSize = trans[5]
101 |
102 | if re.findall("L[CO]08_",DS.GetDescription()).__len__() > 0:
103 | nameString = os.path.basename(DS.GetDescription())
104 | info.time = nameString.split('_')[3]
105 | elif re.findall("L[EO]07_",DS.GetDescription()).__len__() > 0:
106 | nameString = os.path.basename(DS.GetDescription())
107 | info.time = nameString.split('_')[3]
108 | elif re.findall("S2._",DS.GetDescription()).__len__() > 0:
109 | info.time = DS.GetDescription().split('_')[2]
110 | else:
111 | raise Exception('Optical data NOT supported yet!')
112 |
113 | info.numberOfLines = ysize1
114 | info.numberOfSamples = xsize1
115 |
116 | info.filename = indir_m
117 |
118 | DS1 = gdal.Open(indir_s, gdal.GA_ReadOnly)
119 |
120 | info1 = Dummy()
121 |
122 | if re.findall("L[CO]08_",DS1.GetDescription()).__len__() > 0:
123 | nameString1 = os.path.basename(DS1.GetDescription())
124 | info1.time = nameString1.split('_')[3]
125 | elif re.findall("L[EO]07_",DS1.GetDescription()).__len__() > 0:
126 | nameString1 = os.path.basename(DS1.GetDescription())
127 | info1.time = nameString1.split('_')[3]
128 | elif re.findall("S2._",DS1.GetDescription()).__len__() > 0:
129 | info1.time = DS1.GetDescription().split('_')[2]
130 | else:
131 | raise Exception('Optical data NOT supported yet!')
132 |
133 | return info, info1
134 |
135 |
136 | def runGeogrid(info, info1, dem, dhdx, dhdy, vx, vy, srx, sry, csminx, csminy, csmaxx, csmaxy, ssm, **kwargs):
137 | '''
138 | Wire and run geogrid.
139 | '''
140 |
141 | from geogrid import GeogridOptical
142 | # import isce
143 | # from components.contrib.geo_autoRIFT.geogrid import GeogridOptical
144 |
145 | from osgeo import gdal
146 | dem_info = gdal.Info(dem, format='json')
147 |
148 | obj = GeogridOptical()
149 |
150 | obj.startingX = info.startingX
151 | obj.startingY = info.startingY
152 | obj.XSize = info.XSize
153 | obj.YSize = info.YSize
154 | from datetime import date
155 | import numpy as np
156 | d0 = date(np.int(info.time[0:4]),np.int(info.time[4:6]),np.int(info.time[6:8]))
157 | d1 = date(np.int(info1.time[0:4]),np.int(info1.time[4:6]),np.int(info1.time[6:8]))
158 | date_dt_base = d1 - d0
159 | obj.repeatTime = date_dt_base.total_seconds()
160 | # obj.repeatTime = (info1.time - info.time) * 24.0 * 3600.0
161 | obj.numberOfLines = info.numberOfLines
162 | obj.numberOfSamples = info.numberOfSamples
163 | obj.nodata_out = -32767
164 | obj.chipSizeX0 = 240
165 | obj.gridSpacingX = dem_info['geoTransform'][1]
166 |
167 | obj.dat1name = info.filename
168 | obj.demname = dem
169 | obj.dhdxname = dhdx
170 | obj.dhdyname = dhdy
171 | obj.vxname = vx
172 | obj.vyname = vy
173 | obj.srxname = srx
174 | obj.sryname = sry
175 | obj.csminxname = csminx
176 | obj.csminyname = csminy
177 | obj.csmaxxname = csmaxx
178 | obj.csmaxyname = csmaxy
179 | obj.ssmname = ssm
180 | obj.winlocname = "window_location.tif"
181 | obj.winoffname = "window_offset.tif"
182 | obj.winsrname = "window_search_range.tif"
183 | obj.wincsminname = "window_chip_size_min.tif"
184 | obj.wincsmaxname = "window_chip_size_max.tif"
185 | obj.winssmname = "window_stable_surface_mask.tif"
186 | obj.winro2vxname = "window_rdr_off2vel_x_vec.tif"
187 | obj.winro2vyname = "window_rdr_off2vel_y_vec.tif"
188 | ##dt-varying search range scale (srs) rountine parameters
189 | # obj.srs_dt_unity = 32
190 | # obj.srs_max_scale = 10
191 | # obj.srs_max_search = 20000
192 | # obj.srs_min_search = 0
193 |
194 | obj.runGeogrid()
195 |
196 | run_info = {
197 | 'chipsizex0': obj.chipSizeX0,
198 | 'gridspacingx': obj.gridSpacingX,
199 | 'vxname': vx,
200 | 'vyname': vy,
201 | 'sxname': kwargs.get('dhdxs'),
202 | 'syname': kwargs.get('dhdys'),
203 | 'maskname': kwargs.get('sp'),
204 | 'xoff': obj.pOff,
205 | 'yoff': obj.lOff,
206 | 'xcount': obj.pCount,
207 | 'ycount': obj.lCount,
208 | 'dt': obj.repeatTime,
209 | 'epsg': kwargs.get('epsg'),
210 | 'XPixelSize': obj.X_res,
211 | 'YPixelSize': obj.Y_res,
212 | 'cen_lat': obj.cen_lat,
213 | 'cen_lon': obj.cen_lon,
214 | }
215 |
216 | return run_info
217 |
218 | def main():
219 | '''
220 | Main driver.
221 | '''
222 |
223 | inps = cmdLineParse()
224 |
225 | metadata_m, metadata_s = coregisterLoadMetadata(inps.indir_m, inps.indir_s)
226 |
227 | runGeogrid(metadata_m, metadata_s, inps.demfile, inps.dhdxfile, inps.dhdyfile, inps.vxfile, inps.vyfile, inps.srxfile, inps.sryfile, inps.csminxfile, inps.csminyfile, inps.csmaxxfile, inps.csmaxyfile, inps.ssmfile)
228 |
229 |
230 | if __name__ == '__main__':
231 | main()
232 |
--------------------------------------------------------------------------------