├── modules
├── ping
│ ├── ping_batch.sh
│ └── ping.sh
├── gdal_merge
│ └── gdal_merge.sh
├── unstable_coh_metric
│ ├── UCM-batch.sh
│ └── unstable_coh_metric.sh
├── __module_template__
│ └── __module_template__.sh
├── timeseries_xy
│ └── timeseries_xy.sh
├── grid_difference
│ └── grid_difference.sh
├── displacement
│ └── displacement.sh
├── harmonize_grids
│ └── harmonize_grids.sh
├── crop
│ └── crop.sh
├── detrend
│ └── detrend.sh
├── sgp_identification
│ └── sgp_identification.sh
├── gacos_correction
│ └── PP-gacos-correction.sh
├── preview_files
│ └── preview_files.sh
├── summary_pdf
│ └── PP-summary-pdf.sh
├── prep_arctic_dem
│ └── add_single_col.sh
└── mask_unwrapping_errors
│ └── mask_unwrapping_errors.sh
├── lib
├── combination
├── .gitignore
├── s1-orbit-download.sh
├── palettes
│ ├── con_comp_01.cpt
│ ├── diverging_blue_white_red.cpt
│ ├── diverging_blue_yellow_red.cpt
│ ├── diverging_blue_red_dark.cpt
│ ├── diverging_brown_green.cpt
│ ├── diverging_red_yellow_green.cpt
│ └── diverging_red_yellow_blue.cpt
├── meta4-to-filelist.py
├── PP-extract.sh
├── GMTSAR-mods
│ ├── single-swath-unwrap-geocode.csh
│ ├── snaphu_OSARIS.csh
│ ├── merge_unwrap_geocode.sh
│ └── geocode_OSARIS.csh
├── process-stack.sh
├── crop-dem.sh
├── sbas.sh
├── PP-multiswath.sh
├── mask-grdseries.sh
├── z_min_max.sh
├── PP-stack.sh
├── steps_boundaries.sh
├── InSAR
│ └── intf.sh
├── harmonize_grids.sh
├── process-multi-swath.sh
├── min_grd_extent.sh
├── process-MUG.sh
├── PP-MUG.sh
├── PP-SBAS.sh
├── unwrapping-sum.sh
├── s1-file-download.sh
├── difference.sh
└── check-queue.sh
├── doc
├── contributors.md
└── CHANGELOG.md
├── templates
├── filelist.template
├── module-config
│ ├── displacement.config.template
│ ├── __module_template__.config.template
│ ├── unstable_coh_metric.config_template
│ ├── timeseries_xy.config.template
│ ├── harmonize_grids.config.template
│ ├── statistics.config.template
│ ├── ping.config_template
│ ├── detrend.config.template
│ ├── sgp_identification.config.template
│ ├── prep_arctic_dem.config_template
│ ├── crop.config.template
│ ├── mask_unwrapping_errors.config.template
│ ├── gacos_correction.config.template
│ └── summary_pdf.config.template
├── login.credentials
├── grid_difference.config.template
└── GMTSAR-config.template
├── .gitignore
└── tools
├── dem-from-tifs.sh
└── shift_longitude_coords.sh
/modules/ping/ping_batch.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | echo "PONG!"
4 |
--------------------------------------------------------------------------------
/lib/combination:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cryotools/osaris/HEAD/lib/combination
--------------------------------------------------------------------------------
/lib/.gitignore:
--------------------------------------------------------------------------------
1 | /MANIFEST
2 | /OSquery-result.xml
3 | /failed_MD5_check_list.txt
4 | /filelist-golubin.txt
5 | /product_list
6 | /products-list.csv
7 |
--------------------------------------------------------------------------------
/doc/contributors.md:
--------------------------------------------------------------------------------
1 | The original author of OSARIS is [David Loibl](https://github.com/David-Loibl).
2 | The following people have contributed in some way or another to OSARIS.
3 |
4 | - [Bodo Bookhagen](https://github.com/BodoBookhagen)
5 | - [Laila](https://github.com/dedetmix)
6 | - [Ziyadin Cakir](https://github.com/ziyadin)
--------------------------------------------------------------------------------
/templates/filelist.template:
--------------------------------------------------------------------------------
1 | x 090e58f8-7e69-4256-b127-9de5588130ff x S1A_IW_SLC__1SDV_20170217T125851_20170217T125918_015324_0191F4_666E
2 | x d9d33681-ad91-4a57-9bd6-02a5b8238b81 x S1A_IW_SLC__1SSV_20161113T125855_20161113T125922_013924_0166A2_6DB8
3 | x 67fbce35-f044-4593-84d9-d700ca64ead4 x S1A_IW_SLC__1SSV_20160130T125846_20160130T125912_009724_00E32D_642B
4 |
--------------------------------------------------------------------------------
/templates/module-config/displacement.config.template:
--------------------------------------------------------------------------------
1 | ######################################################################
2 | #
3 | # Template configuration for the 'Displacement' module
4 | #
5 | # Copy to 'config' folder, rename to 'displacement.config'
6 | # and fit to your machine's configuration.
7 | #
8 | ######################################################################
9 |
10 | unwrapped_intf_PATH=( "$output_PATH/Interf-unwrpd" )
11 | # Paths to unwrapped intergferogram files
12 |
--------------------------------------------------------------------------------
/templates/login.credentials:
--------------------------------------------------------------------------------
1 |
2 | # Login credentials for your ESA DHuS account
3 | # Required if downloading from ESA's DHuS platform is enabled
4 | # Register a new account at https://scihub.copernicus.eu/dhus/#/self-registration
5 |
6 | ESA_username="_your_username_"
7 | ESA_password="_your_password_"
8 |
9 |
10 | # Login credentials for your ASF/EarthData account
11 | # Required if downloading via ASF is enabled
12 | # Register a new account at https://urs.earthdata.nasa.gov/users/new
13 |
14 | ASF_username="_your_username_"
15 | ASF_password="_your_password_"
16 |
--------------------------------------------------------------------------------
/lib/s1-orbit-download.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | echo; echo "Updating S1 Orbits"; echo
4 |
5 | # wget -nH -l1 --no-parent --no-check-certificate -nc --reject-regex '\?' -r -nd -R *.txt,*.html* -P $1 https://s1qc.asf.alaska.edu/aux_poeorb/
6 |
7 | if [ "$2" -ge 1 ]; then
8 | last_page=$2
9 | else
10 | last_page=1
11 | fi
12 |
13 | for page in `seq 1 $last_page`; do
14 | wget -nH -l1 --no-parent --no-check-certificate -nc --reject-regex '\?' -r -nd -R *.txt,*.html* -P $1 https://qc.sentinel1.eo.esa.int/aux_poeorb/?page=$page
15 | done
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/templates/module-config/__module_template__.config.template:
--------------------------------------------------------------------------------
1 | ##################################################################
2 | #
3 | # Template configuration for the OSARIS module template.
4 | #
5 | # Only of interest when you are developing a new module.
6 | #
7 | # Add all variables that should be user-defined here.
8 | #
9 | #################################################################
10 |
11 | example_var="Foo bar"
12 | # Put a brief description of the variable here ...
13 |
14 | example_array=( piff paff bam )
15 | # Put a brief description of the array here ...
--------------------------------------------------------------------------------
/templates/module-config/unstable_coh_metric.config_template:
--------------------------------------------------------------------------------
1 | ##################################################################
2 | #
3 | # Template configuration for the Unstable Coherence Metric module
4 | #
5 | # Copy to 'config' folder, rename to 'unstable_coh_metric.config'
6 | # and fit to your setup and needs.
7 | #
8 | #################################################################
9 |
10 | high_corr_threshold=0.4
11 | # Threshold value for high coherence
12 | # A value > 0.8 may be adequate when focusing on buildings
13 | # (e.g. earthquake damages), 0.4 is reasonable to detect
14 | # general land surface changes.
15 |
16 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | # Compiled source #
7 | # Logs and databases #
8 | # OS generated files #
9 | # Packages #
10 | # git has its own built in compression methods
11 | # it's better to unpack these files and commit the raw source
12 | ############
13 | ###################
14 | ######################
15 | ######################
16 | *.7z
17 | *.class
18 | *.com
19 | *.dll
20 | *.dmg
21 | *.exe
22 | *.gz
23 | *.iso
24 | *.jar
25 | *.log
26 | *.o
27 | *.rar
28 | *.so
29 | *.sql
30 | *.sqlite
31 | *.tar
32 | *.zip
33 | *~
34 | .DS_Store
35 | .DS_Store?
36 | .Spotlight-V100
37 | .Trashes
38 | ._*
39 | Thumbs.db
40 | config.txt
41 | ehthumbs.db
42 | filelist.txt
43 |
44 | **/config/
--------------------------------------------------------------------------------
/lib/palettes/con_comp_01.cpt:
--------------------------------------------------------------------------------
1 | # GMT palette Set3_11.cpt
2 | #
3 | # This product includes color specifications and designs
4 | # developed by Cynthia Brewer (http://colorbrewer.org/).
5 | #
6 | # Converted to the cpt format by J.J.Green
7 | # Qualitative palette with 11 colours
8 | #
9 | # COLOR_MODEL = RGB
10 | 0.00 141 211 199 1.00 141 211 199
11 | 1.00 255 255 179 2.00 255 255 179
12 | 2.00 190 186 218 3.00 190 186 218
13 | 3.00 251 128 114 4.00 251 128 114
14 | 4.00 128 177 211 5.00 128 177 211
15 | 5.00 253 180 098 6.00 253 180 098
16 | 6.00 179 222 105 7.00 179 222 105
17 | 7.00 252 205 229 8.00 252 205 229
18 | 8.00 217 217 217 9.00 217 217 217
19 | 9.00 188 128 189 10.00 188 128 189
20 | 10.00 204 235 197 11.00 204 235 197
21 |
--------------------------------------------------------------------------------
/templates/module-config/timeseries_xy.config.template:
--------------------------------------------------------------------------------
1 | ##################################################################
2 | #
3 | # Template configuration for the 'Timeseries xy' module
4 | #
5 | # Copy to 'config' folder, rename to 'ping.config' and fit to
6 | # your machine's configuration.
7 | #
8 | #################################################################
9 |
10 | TS_coordinates=( 11.11,22.22 )
11 | # Provide sampling locations as a series of lat,lon pairs
12 | # in decimal degrees seqparated by spaces, e.g.
13 | # 73.98989,42.1707 74.48420,42.85183
14 |
15 | TS_gridfiles=( corr_ll.grd )
16 | # Name of grid files to sample
17 |
18 | TS_input_PATH="$output_PATH/Pairs-forward/F3"
19 | # Path to directory which contains the directories in which the
20 | # grid files are located. Typically, this will be sth. like
21 | # "$output_PATH/Pairs-forward/F3"
22 |
--------------------------------------------------------------------------------
/templates/module-config/harmonize_grids.config.template:
--------------------------------------------------------------------------------
1 | ######################################################################
2 | #
3 | # Template configuration for the 'Harmonize grids' module
4 | #
5 | # Copy to 'config' folder, rename to 'harmonize_grids.config'
6 | # and fit to your machine's configuration.
7 | #
8 | # Activate the module in the main config file using the postprocessing
9 | # hook.
10 | #
11 | ######################################################################
12 |
13 | grid_input_PATH=( "$output_PATH/Displacement" ) #"$output_PATH/GACOS-corrected" "$output_PATH/Displacement"
14 | # Path(s) to grid files
15 | # Multiple paths can be provided, seperated by spaces.
16 |
17 | # ref_point_xy_coords=""
18 | # Optional: XY coordinates of reference point in decimal degrees.
19 | # Format: longitude/latidue
20 | # Will override the default usage of 'SGP Identification' module result.
21 |
--------------------------------------------------------------------------------
/templates/module-config/statistics.config.template:
--------------------------------------------------------------------------------
1 | ##################################################################
2 | #
3 | # Template configuration for the statistics module
4 | #
5 | # Copy to 'config' folder, rename to 'grid_difference.config'
6 | # and fit to your setup and needs.
7 | #
8 | #################################################################
9 |
10 | stats_input_filenames=( "*.grd" )
11 | # Filename(s) of files to crop.
12 | # You may provide multiple file names, seperated by spaces.
13 | # Wildcards are allowed, e.g. *.grd or corr*
14 | # Input files shall reside in sub-directories of input directory (s. below)
15 |
16 | stats_input_PATH="$output_PATH/Coherences"
17 | # Path to where the input files are located
18 |
19 | stats_subdirs=0
20 | # 0 -> Files are located directly in the dir specified in crop_input_PATH
21 | # 1 -> Scan through direct subdirs of crop_input_PATH for files
22 |
--------------------------------------------------------------------------------
/templates/module-config/ping.config_template:
--------------------------------------------------------------------------------
1 | ##################################################################
2 | #
3 | # Template configuration for the ping module
4 | #
5 | # Copy to 'config' folder, rename to 'ping.config' and fit to
6 | # your machine's configuration.
7 | #
8 | #################################################################
9 |
10 |
11 | ping_count=10
12 | # Number of ping jobs to send to the queue.
13 | # Number of jobs times ntasks should amount ~ to the number of cores
14 | # required in subsequent processing steps.
15 |
16 | slurm_ntasks=30
17 | # Number of cores used for parallel processing.
18 | # Make this large enough to avoid uneccessarily many ping jobs.
19 |
20 | slurm_account=my_account
21 | # SLURM account name
22 |
23 | slurm_qos=my_jobtype
24 | # Job type
25 |
26 | slurm_partition=partition_name
27 | # Partition used for computing.
28 | # Optional in most cases, comment out when not needed
29 |
30 |
--------------------------------------------------------------------------------
/templates/grid_difference.config.template:
--------------------------------------------------------------------------------
1 | ##################################################################
2 | #
3 | # Template configuration for the grid_difference module
4 | #
5 | # Copy to 'config' folder, rename to 'grid_difference.config'
6 | # and fit to your setup and needs.
7 | #
8 | #################################################################
9 |
10 | grddiff_input_filenames=( display_amp_ll.grd )
11 | # Files to process, e.g. 'display_amp_ll.grd' for amplitudes.
12 | # You may provide multiple file names, seperated by spaces.
13 | # Input files shall reside in sub-directories of input directory (s. below)
14 |
15 | grddiff_input_PATH="$output_PATH/Pairs-forward"
16 | # Path where the input data resides.
17 | # You may provide a full path or use the $output_PATH variable, e.g.
18 | # Default: $output_PATH/Pairs-forward
19 |
20 | grddiff_palette="$OSARIS_PATH/lib/palettes/corr_diff_brown_green.cpt"
21 | # Define a CPT palette to use for for styling the results.
22 |
23 |
--------------------------------------------------------------------------------
/templates/module-config/detrend.config.template:
--------------------------------------------------------------------------------
1 | ##################################################################
2 | #
3 | # Template configuration for the 'Detrend' module
4 | #
5 | # Copy to 'config' folder, rename to 'detrend.config'
6 | # and fit to your machine's configuration.
7 | #
8 | #################################################################
9 |
10 | RT_grid_input_PATH="$output_PATH/Interf-unwrpd"
11 | # Path to directory where the input grid files are located, e.g.
12 | # $output_PATH/Interf-unwrpd
13 | # $output_PATH/GACOS-corrected
14 | # $output_PATH/Displacement
15 |
16 | RT_model="10+r"
17 | # The model used for trend removal. Default: 10+r
18 | # Options:
19 | # 3 -> bilinear
20 | # 6 -> quadratic
21 | # 10 -> bicubic
22 | # +r may be added to each of the models to perform a iterative robust fitting.
23 | # More info: http://gmt.soest.hawaii.edu/doc/5.4.4/grdtrend.html
24 |
25 | RT_safe_trend_files=1
26 | # Save calculated trend surface to a subdirectory.
--------------------------------------------------------------------------------
/templates/module-config/sgp_identification.config.template:
--------------------------------------------------------------------------------
1 | ##################################################################
2 | #
3 | # Template configuration for the 'Stable Ground Point Identification' module
4 | #
5 | # Copy to 'config' folder, rename to 'sgp_identification.config',
6 | # and fit to your setup and needs.
7 | #
8 | #################################################################
9 |
10 | sgpi_threshold="0.2"
11 | # Minimum coherence value.
12 | # If unwrapping is acitve, psi_theshold should be >= the unwrapping
13 | # threshold as provided in the GMTSAR config file.
14 |
15 | sgpi_input_PATH="$output_PATH/Coherences"
16 | # Path where the input data resides.
17 | # You may provide a full path or use the $output_PATH variable
18 | # Default: $output_PATH/Coherences
19 |
20 | sgpi_region="11.1/22.2/33.3/44.4"
21 | # Limit the analysis to a subregion instead of whole scene extents (optional).
22 | # Format: lon_min/lon_max/lat_min/lat_max (each in decimal degrees).
23 |
24 |
--------------------------------------------------------------------------------
/lib/meta4-to-filelist.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 |
3 | # Convert .meta4 XML-files to file list compatible with dhusget.sh
4 |
5 | import sys
6 | import xml.etree.ElementTree as ET
7 | # import math as math
8 | # from scipy.io.numpyio import fwrite, fread
9 | # import os
10 | # import numpy as np
11 | # import pylab as py
12 |
13 | if (len(sys.argv) > 1):
14 |
15 | input_file = open(sys.argv[1],'rb')
16 | output_file = sys.argv[2]
17 |
18 | tree = ET.parse(input_file) # '/data/scratch/loibldav/GSP/Input/Meta4/Bishkek-Golubin-2017-03-01.meta4'
19 | root = tree.getroot()
20 |
21 | # print root.tag
22 | # print root.attrib
23 |
24 | with open(output_file, "w") as text_file:
25 | for child in root:
26 | # print(child.attrib['name'][:-4])
27 | # print(child[1].text[53:-9])
28 | text_file.write(" x {0}".format(child[1].text[53:-9]))
29 | text_file.write(" x {0}".format(child.attrib['name'][:-4]))
30 | text_file.write("\n")
31 |
32 | else:
33 | print "Usage: meta4-to-filelist.py [input file (.meta4)] [output file]"
34 |
35 |
36 |
--------------------------------------------------------------------------------
/templates/module-config/prep_arctic_dem.config_template:
--------------------------------------------------------------------------------
1 | ######################################################################
2 | #
3 | # Configuration of the prep_arctic_dem module for OSARIS
4 | #
5 | # Activate the module in the main config file using the preprocessing
6 | # hook. Alternatively, run in standalone mode from the module folder.
7 | #
8 | # Further information on ArcticDEM and a shapefile with tile numbers
9 | # are available at https://www.pgc.umn.edu/data/arcticdem/
10 | #
11 | ######################################################################
12 |
13 | # Arctic DEM tiles to process.
14 | # Make sure to define a rectangle without missing tiles!
15 | row_min=1
16 | row_max=2
17 |
18 | col_min=1
19 | col_max=2
20 |
21 | # Optional: additional single cols to be added to the DEM
22 | single_col=3_1 # Referring to the second and third character of name string
23 |
24 |
25 |
26 | # Output grid resolution in meters (original ArcticDEM is 5 m)
27 | scale_factor=50
28 |
29 | # Path to folder where ArcticDEM tiles are located
30 | input_mosaic_PATH=/path/to/ArcticDEM/mosaic/v2.0
31 |
32 | # Output folder. Will be created if not exists.
33 | dem_output_PATH=/your/output_folder
--------------------------------------------------------------------------------
/templates/module-config/crop.config.template:
--------------------------------------------------------------------------------
1 | ##################################################################
2 | #
3 | # Template configuration for the 'Crop' module
4 | #
5 | # Copy to 'config' folder, rename to 'crop.config'
6 | # and fit to your demands.
7 | #
8 | #################################################################
9 |
10 | crop_input_PATH="$output_PATH/Coherences"
11 | # Path to where the input files are located
12 |
13 | crop_subdirs=0
14 | # 0 -> Files are located directly in the dir specified in crop_input_PATH
15 | # 1 -> Scan through direct subdirs of crop_input_PATH for files
16 |
17 | crop_input_filenames=( "*.grd" )
18 | # Filename(s) of files to crop.
19 | # Wildcards are allowed but must be escaped, e.g. "*.grd"
20 |
21 | crop_regions=( 12.34/34.56/56.78/78.90 )
22 | # Extent(s) to crop the image to in decimal degrees
23 | # Format: lon_min/lon_max/lat_min/lat_max
24 | # You may enter multiple regions separated by spaces.
25 |
26 | crop_region_labels=( Crop_region_label )
27 | # Labels for regions.
28 | # Will also be used for directory names, so avoid special chars.
29 | # When using multiple regions, make sure to provide the same number
30 | # of labels, separated by spaces.
31 |
--------------------------------------------------------------------------------
/templates/module-config/mask_unwrapping_errors.config.template:
--------------------------------------------------------------------------------
1 | ##################################################################
2 | #
3 | # Template configuration for the 'Mask unwrapping errors' module
4 | #
5 | # Copy to 'config' folder, rename to 'mask_unwrapping_errors.config'
6 | # and fit to your machine's configuration.
7 | #
8 | #################################################################
9 |
10 | MUE_input_PATH="$output_PATH/GACOS-corrected"
11 | # Path to directory where the (forward) unwrapped interferograms are located
12 | # Default "$output_PATH/Interf_unwrpd"
13 | # Alternatively you may use:
14 | # "$output_PATH/Harmonized-grids/some_directory" if you applied time series harmonization (highly recommended), or
15 | # "$output_PATH/GACOS-correction" if the gacos correction was applied previously
16 |
17 | MUE_fwdrev_sums_PATH="$output_PATH/Unwrapping-sums"
18 | # Path to reverse unwrapping sum results.
19 | # Make sure to activate reverse interferogram processing in the main config file!
20 | # Default: $output_PATH/Unwrapping-sums
21 |
22 | MUE_threshold="0.1"
23 | # The threshold of allowed difference between fwd and rev unwr. intfs.
24 | # All pixels with values greater +threshold and less than -threshold will be masked.
25 | # Default: 0.1
26 |
--------------------------------------------------------------------------------
/lib/palettes/diverging_blue_white_red.cpt:
--------------------------------------------------------------------------------
1 | -2 28/50/107 -1.9 28/50/107
2 | -1.9 30/61/124 -1.8 30/61/124
3 | -1.8 33/72/141 -1.7 33/72/141
4 | -1.7 35/85/161 -1.6 35/85/161
5 | -1.6 47/105/177 -1.5 47/105/177
6 | -1.5 59/123/189 -1.4 59/123/189
7 | -1.4 74/145/204 -1.3 74/145/204
8 | -1.3 90/166/217 -1.2 90/166/217
9 | -1.2 107/180/225 -1.1 107/180/225
10 | -1.1 128/196/234 -1 128/196/234
11 | -1 145/209/242 -0.9 145/209/242
12 | -0.9 167/222/247 -0.8 167/222/247
13 | -0.8 181/227/248 -0.7 181/227/248
14 | -0.7 196/232/248 -0.6 196/232/248
15 | -0.6 215/239/249 -0.5 215/239/249
16 | -0.5 225/243/251 -0.4 225/243/251
17 | -0.4 235/247/252 -0.3 235/247/252
18 | -0.3 247/252/254 -0.2 247/252/254
19 | -0.2 white -0.1 white
20 | -0.1 white 0 white
21 | 0 white 0.1 white
22 | 0.1 white 0.2 white
23 | 0.2 255/252/238 0.3 255/252/238
24 | 0.3 254/246/209 0.4 254/246/209
25 | 0.4 253/241/184 0.5 253/241/184
26 | 0.5 252/235/155 0.6 252/235/155
27 | 0.6 253/218/124 0.7 253/218/124
28 | 0.7 253/203/98 0.8 253/203/98
29 | 0.8 254/188/72 0.9 254/188/72
30 | 0.9 253/167/49 1 253/167/49
31 | 1 251/150/47 1.1 251/150/47
32 | 1.1 248/129/44 1.2 248/129/44
33 | 1.2 246/112/42 1.3 246/112/42
34 | 1.3 238/90/41 1.4 238/90/41
35 | 1.4 228/69/41 1.5 228/69/41
36 | 1.5 220/50/40 1.6 220/50/40
37 | 1.6 208/31/39 1.7 208/31/39
38 | 1.7 189/28/35 1.8 189/28/35
39 | 1.8 173/25/31 1.9 173/25/31
40 | 1.9 157/23/28 2 157/23/28
41 | B black
42 | F white
43 | N red
44 |
--------------------------------------------------------------------------------
/lib/palettes/diverging_blue_yellow_red.cpt:
--------------------------------------------------------------------------------
1 | -2 5/40/89 -1.9 5/40/89
2 | -1.9 6/51/106 -1.8 6/51/106
3 | -1.8 7/62/124 -1.7 7/62/124
4 | -1.7 8/75/144 -1.6 8/75/144
5 | -1.6 15/89/161 -1.5 15/89/161
6 | -1.5 28/104/171 -1.4 28/104/171
7 | -1.4 44/121/182 -1.3 44/121/182
8 | -1.3 57/136/192 -1.2 57/136/192
9 | -1.2 71/150/201 -1.1 71/150/201
10 | -1.1 82/160/205 -1 82/160/205
11 | -1 92/169/208 -0.9 92/169/208
12 | -0.9 103/179/212 -0.8 103/179/212
13 | -0.8 115/187/216 -0.7 115/187/216
14 | -0.7 129/196/220 -0.6 129/196/220
15 | -0.6 146/206/224 -0.5 146/206/224
16 | -0.5 160/214/228 -0.4 160/214/228
17 | -0.4 176/223/233 -0.3 176/223/233
18 | -0.3 189/230/240 -0.2 189/230/240
19 | -0.2 200/235/245 -0.1 200/235/245
20 | -0.1 211/241/251 0 211/241/251
21 | 0 255/252/190 0.1 255/252/190
22 | 0.1 255/246/171 0.2 255/246/171
23 | 0.2 255/241/151 0.3 255/241/151
24 | 0.3 255/234/128 0.4 255/234/128
25 | 0.4 254/226/109 0.5 254/226/109
26 | 0.5 251/219/98 0.6 251/219/98
27 | 0.6 247/210/85 0.7 247/210/85
28 | 0.7 244/202/74 0.8 244/202/74
29 | 0.8 241/188/62 0.9 241/188/62
30 | 0.9 237/167/49 1 237/167/49
31 | 1 235/150/38 1.1 235/150/38
32 | 1.1 231/129/25 1.2 231/129/25
33 | 1.2 227/114/18 1.3 227/114/18
34 | 1.3 220/103/13 1.4 220/103/13
35 | 1.4 212/89/8 1.5 212/89/8
36 | 1.5 205/78/3 1.6 205/78/3
37 | 1.6 193/67/3 1.7 193/67/3
38 | 1.7 175/58/9 1.8 175/58/9
39 | 1.8 160/52/14 1.9 160/52/14
40 | 1.9 145/45/19 2 145/45/19
41 | B black
42 | F white
43 | N red
44 |
--------------------------------------------------------------------------------
/modules/gdal_merge/gdal_merge.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ######################################################################
4 | #
5 | # OSARIS module to merge grids using GDAL.
6 | #
7 | # Primarily intended for overlapping grids, e.g. to merge interferograms
8 | # from neighboring S1 slices.
9 | #
10 | # David Loibl, 2018
11 | #
12 | #####################################################################
13 |
14 | start=`date +%s`
15 |
16 | if [ ! -f "$OSARIS_PATH/config/gdal_merge.config" ]; then
17 | echo
18 | echo "Cannot open $OSARIS_PATH/config/gdal_merge.config. Please provide a valid config file in the OSARIS config folder."
19 | echo
20 | exit 2
21 | else
22 |
23 | echo; echo "Merging files with GDAL"
24 |
25 | source $OSARIS_PATH/config/gdal_merge.config
26 |
27 | gdal_translate -a_srs EPSG:4326 -co interleave=pixel -a_ullr -180.0 90.0 180.0 -90.0 0.jpg ONE.tif
28 | gdal_translate -a_srs EPSG:4326 -co interleave=pixel -a_ullr -90.0 90.0 90.0 -90.0 0.jpg TWO.tif
29 |
30 | gdalbuildvrt -input_file_list my_list.txt doq_index.vrt
31 |
32 | gdal_translate ONETWO.vrt ONETWO.tif
33 |
34 |
35 | echo; echo
36 | echo "Cleaning up"
37 | rm -r temp
38 | rm merged_dem.grd
39 | echo; echo
40 |
41 | end=`date +%s`
42 |
43 | runtime=$((end-start))
44 |
45 | printf 'Processing finished in %02dd %02dh:%02dm:%02ds\n' $(($runtime/86400)) $(($runtime%86400/3600)) $(($runtime%3600/60)) $(($runtime%60))
46 | echo
47 |
48 |
49 | fi
50 |
51 |
52 |
--------------------------------------------------------------------------------
/templates/module-config/gacos_correction.config.template:
--------------------------------------------------------------------------------
1 | ##################################################################
2 | #
3 | # Template configuration for the 'GACOS correction' module
4 | #
5 | # Copy to 'config' folder, rename to 'gacos_correction.config'
6 | # and fit to your machine's configuration.
7 | #
8 | #################################################################
9 |
10 | gacos_PATH="/path/to/GACOS-data"
11 | # Path to directory where the GACOS files are located
12 | # GACOS files can be obtained via http://ceg-research.ncl.ac.uk/v2/gacos/
13 |
14 | unwrp_intf_PATH="$output_PATH/Interf-unwrpd"
15 | # Path to unwrapped interferograms
16 | # Default: $output_PATH/Interf-unwrpd
17 |
18 | referene_point="SGPI"
19 | # The 'stable ground' reference point to which data will be harmonized.
20 | # Options:
21 | # Coordinates -> Manually define reference point (dec. degrees, format longitude/latitude)
22 | # SGPI -> Write 'SGPI' to obtain coordinates from 'SGP Identification' result file.
23 |
24 | harmonize_input_grids=1
25 | # Harmonize input unwrapped interferograms relative to 'stable ground point' before
26 | # applying the GACOS correction. Required if the dataset was not harmonized in a prior step.
27 | # 0 -> Deactivate, no harmonization
28 | # 1 -> Activate harmonization, will use the reference defined in the 'reference_point' variable (default)
29 |
30 | gacos_extent="11.11/22.22/33.33/44.44"
31 | # The extent of the map window in decimal degrees
32 | # Format: lon_min/lon_max/lat_min/lat_max
33 |
34 |
35 |
--------------------------------------------------------------------------------
/lib/PP-extract.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | echo
4 | echo "- - - - - - - - - - - - - - - - - -"
5 | echo "SLURM job EXTRACT started"
6 | echo "- - - - - - - - - - - - - - - - - -"
7 | echo
8 |
9 |
10 | if [ ! $# -eq 5 ]; then
11 | echo
12 | echo "Wrong parameter count, exiting."
13 | echo "Usage: PP-extract file target_path output_path polarization"
14 | echo
15 | exit 1
16 | elif [ ! -f "$1/$2" ]; then
17 | echo
18 | echo "Cannot open $1. Please provide a valid zipped Sentinel1 file. Exiting."
19 | echo
20 | exit 2
21 | else
22 | extract_start=`date +%s`
23 |
24 | # $OSARIS_PATH/lib/PP-extract.sh $input_PATH $S1_archive $work_PATH/orig $output_PATH $polarization
25 | input_PATH=$1
26 | S1_archive=$2
27 | S1_output_PATH=$3
28 | output_PATH=$4
29 | polarization=$5
30 |
31 | echo "Extracting file $S1_archive from directory $input_PATH to $S1_output_PATH ..."
32 | if [ "$polarization" = "vv" ]; then
33 | pol_exclude="-x *-vh-*"
34 | elif [ "$polarization" = "vh" ]; then
35 | pol_exclude="-x *-vv-*"
36 | elif [ "$polarization" = "both" ]; then
37 | pol_exclude=""
38 | else
39 | pol_exclude="-x *-vh-*"
40 | fi
41 |
42 | unzip $input_PATH/$S1_archive $pol_exclude -d $S1_output_PATH
43 |
44 | extract_end=`date +%s`
45 |
46 | extract_runtime=$((extract_end-extract_start))
47 | echo "$2 $SLURM_JOB_ID $extract_runtime" >> $output_PATH/Reports/PP-extract-stats.tmp
48 | printf 'Processing finished in %02dd %02dh:%02dm:%02ds\n' $(($extract_runtime/86400)) $(($extract_runtime%86400/3600)) $(($extract_runtime%3600/60)) $(($extract_runtime%60))
49 |
50 | fi
51 |
52 |
--------------------------------------------------------------------------------
/lib/palettes/diverging_blue_red_dark.cpt:
--------------------------------------------------------------------------------
1 | -2 10.75/0/61.5 -1.9 10.75/0/61.5
2 | -1.9 18/0/82.5 -1.8 18/0/82.5
3 | -1.8 24/0/103.5 -1.7 24/0/103.5
4 | -1.7 26.875/0/124.5 -1.6 26.875/0/124.5
5 | -1.6 26.875/0/145.5 -1.5 26.875/0/145.5
6 | -1.5 24.625/0/166.5 -1.4 24.625/0/166.5
7 | -1.4 22.375/0/187.5 -1.3 22.375/0/187.5
8 | -1.3 17.625/0/208.5 -1.2 17.625/0/208.5
9 | -1.2 10.125/0/229.5 -1.1 10.125/0/229.5
10 | -1.1 4.25/4.125/248 -1 4.25/4.125/248
11 | -1 17.75/28.875/254 -0.9 17.75/28.875/254
12 | -0.9 42.5/59.875/255 -0.8 42.5/59.875/255
13 | -0.8 68.375/91.375/255 -0.7 68.375/91.375/255
14 | -0.7 93.125/121.5/255 -0.6 93.125/121.5/255
15 | -0.6 117.88/148.5/255 -0.5 117.88/148.5/255
16 | -0.5 142.62/173.62/255 -0.4 142.62/173.62/255
17 | -0.4 168.5/195.37/255 -0.3 168.5/195.37/255
18 | -0.3 195.12/214.25/255 -0.2 195.12/214.25/255
19 | -0.2 219.88/233.75/255 -0.1 219.88/233.75/255
20 | -0.1 243.38/248.25/255 0 243.38/248.25/255
21 | 0 255/248.25/243.38 0.1 255/248.25/243.38
22 | 0.1 255/233.75/219.87 0.2 255/233.75/219.87
23 | 0.2 255/214.25/195.12 0.3 255/214.25/195.12
24 | 0.3 255/195.37/168.5 0.4 255/195.37/168.5
25 | 0.4 255/173.62/142.62 0.5 255/173.62/142.62
26 | 0.5 255/148.5/117.88 0.6 255/148.5/117.88
27 | 0.6 255/121.5/93.125 0.7 255/121.5/93.125
28 | 0.7 255/91.375/68.375 0.8 255/91.375/68.375
29 | 0.8 255/59.875/42.5 0.9 255/59.875/42.5
30 | 0.9 254/28.875/17.75 1 254/28.875/17.75
31 | 1 248/4.125/4.25 1.1 248/4.125/4.25
32 | 1.1 229.5/0/10.125 1.2 229.5/0/10.125
33 | 1.2 208.5/0/17.625 1.3 208.5/0/17.625
34 | 1.3 187.5/0/22.375 1.4 187.5/0/22.375
35 | 1.4 166.5/0/24.625 1.5 166.5/0/24.625
36 | 1.5 145.5/0/26.875 1.6 145.5/0/26.875
37 | 1.6 124.5/0/26.875 1.7 124.5/0/26.875
38 | 1.7 103.5/0/24 1.8 103.5/0/24
39 | 1.8 82.5/0/18 1.9 82.5/0/18
40 | 1.9 62.75/0/10.75 2 62.75/0/10.75
41 | B black
42 | F white
43 | N red
44 |
--------------------------------------------------------------------------------
/modules/ping/ping.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ######################################################################
4 | #
5 | # Send minimal jobs to Slurm queue to wake up sleeping nodes
6 | #
7 | # Requires a file 'ping.config' in the OSARIS config folder containing
8 | # the Slurm configuration. Get startet by copying the config_template
9 | # file from the templates folder and fit it to your setup.
10 | #
11 | # David Loibl, 2017
12 | #
13 | #####################################################################
14 |
15 | module_name="ping"
16 |
17 |
18 | if [ -z $module_config_PATH ]; then
19 | echo "Parameter module_config_PATH not set in main config file. Setting to default:"
20 | echo " $OSARIS_PATH/config"
21 | module_config_PATH="$OSARIS_PATH/config"
22 | elif [[ "$module_config_PATH" != /* ]] && [[ "$module_config_PATH" != "$OSARIS_PATH"* ]]; then
23 | module_config_PATH="${OSARIS_PATH}/config/${module_config_PATH}"
24 | fi
25 |
26 | if [ ! -d "$module_config_PATH" ]; then
27 | echo "ERROR: $module_config_PATH is not a valid directory. Check parameter module_config_PATH in main config file. Exiting ..."
28 | exit 2
29 | fi
30 |
31 | if [ ! -f "${module_config_PATH}/${module_name}.config" ]; then
32 | echo
33 | echo "Cannot open ${module_name}.config in ${module_config_PATH}. Please provide a valid config file."
34 | echo
35 | else
36 |
37 | # Include the config file
38 | source ${module_config_PATH}/${module_name}.config
39 |
40 | i=0
41 | while [ $i -lt $ping_count ]; do
42 | sbatch \
43 | --output=/dev/null \
44 | --error=/dev/null \
45 | --workdir=$input_PATH \
46 | --job-name=ping \
47 | --qos=$slurm_qos \
48 | --account=$slurm_account \
49 | --partition=$slurm_partition \
50 | --mail-type=NONE \
51 | $OSARIS_PATH/modules/ping/ping_batch.sh
52 | ((i++))
53 | done
54 | fi
55 |
--------------------------------------------------------------------------------
/lib/palettes/diverging_brown_green.cpt:
--------------------------------------------------------------------------------
1 | -2 84/48/5 -1.9 84/48/5
2 | -1.9 84/48/5 -1.8 84/48/5
3 | -1.8 94.5/54/6.125 -1.7 94.5/54/6.125
4 | -1.7 109.9/62.8/7.775 -1.6 109.9/62.8/7.775
5 | -1.6 125.3/72.075/8.95 -1.5 125.3/72.075/8.95
6 | -1.5 140.65/81.6/10.45 -1.4 140.65/81.6/10.45
7 | -1.4 154.95/94.8/20.35 -1.3 154.95/94.8/20.35
8 | -1.3 169.13/108/30.125 -1.2 169.13/108/30.125
9 | -1.2 182.88/121.2/39.475 -1.1 182.88/121.2/39.475
10 | -1.1 194.6/136.42/54 -1 194.6/136.42/54
11 | -1 203.4/154.58/76 -0.9 203.4/154.58/76
12 | -0.9 212.2/172.4/98 -0.8 212.2/172.4/98
13 | -0.8 221/190/120 -0.7 221/190/120
14 | -0.7 228.1/202.08/139.88 -0.6 228.1/202.08/139.88
15 | -0.6 234.7/212.53/159.13 -0.5 234.7/212.53/159.13
16 | -0.5 240.78/222.98/178.38 -0.4 240.78/222.98/178.38
17 | -0.4 246/232.45/196.88 -0.3 246/232.45/196.88
18 | -0.3 246/235.75/210.63 -0.2 246/235.75/210.63
19 | -0.2 245.82/239.23/224.38 -0.1 245.82/239.23/224.38
20 | -0.1 245.28/243.07/238.13 0 245.28/243.07/238.13
21 | 0 238.68/243.62/242.8 0.1 238.68/243.62/242.8
22 | 0.1 226.02/240.88/238.4 0.2 226.02/240.88/238.4
23 | 0.2 213.38/237.75/234 0.3 213.38/237.75/234
24 | 0.3 200.72/234.45/229.6 0.4 200.72/234.45/229.6
25 | 0.4 181.9/227.35/220.45 0.5 181.9/227.35/220.45
26 | 0.5 162.13/219.62/210.55 0.6 162.13/219.62/210.55
27 | 0.6 142.87/211.37/200.65 0.7 142.87/211.37/200.65
28 | 0.7 123.25/201.63/189.88 0.8 123.25/201.63/189.88
29 | 0.8 102.35/186.77/176.12 0.9 102.35/186.77/176.12
30 | 0.9 81.675/171.92/162.38 1 81.675/171.92/162.38
31 | 1 61.325/157.08/148.62 1.1 61.325/157.08/148.62
32 | 1.1 44.55/142.87/134.87 1.2 44.55/142.87/134.87
33 | 1.2 30.25/129.12/121.12 1.3 30.25/129.12/121.12
34 | 1.3 15.95/115.8/107.8 1.4 15.95/115.8/107.8
35 | 1.4 1.65/102.6/94.6 1.5 1.65/102.6/94.6
36 | 1.5 0.475/90.975/81.925 1.6 0.475/90.975/81.925
37 | 1.6 0/79.425/69.275 1.7 0/79.425/69.275
38 | 1.7 0/67.875/56.625 1.8 0/67.875/56.625
39 | 1.8 0/60/48 1.9 0/60/48
40 | 1.9 0/60/48 2 0/60/48
41 | B black
42 | F black
43 | N black
44 |
--------------------------------------------------------------------------------
/lib/palettes/diverging_red_yellow_green.cpt:
--------------------------------------------------------------------------------
1 | -2 165/0/38 -1.9 165/0/38
2 | -1.9 165/0/38 -1.8 165/0/38
3 | -1.8 174.38/9/38.375 -1.7 174.38/9/38.375
4 | -1.7 188.12/22.2/38.925 -1.6 188.12/22.2/38.925
5 | -1.6 201.88/35.4/39 -1.5 201.88/35.4/39
6 | -1.5 215.38/48.75/39.35 -1.4 215.38/48.75/39.35
7 | -1.4 223.63/65.25/47.05 -1.3 223.63/65.25/47.05
8 | -1.3 231.75/81.875/54.75 -1.2 231.75/81.875/54.75
9 | -1.2 239.45/98.925/62.45 -1.1 239.45/98.925/62.45
10 | -1.1 245.12/116.42/70.375 -1 245.12/116.42/70.375
11 | -1 247.88/134.58/78.625 -0.9 247.88/134.58/78.625
12 | -0.9 250.3/152.4/86.875 -0.8 250.3/152.4/86.875
13 | -0.8 252.5/170/95.125 -0.7 252.5/170/95.125
14 | -0.7 253.43/184.63/105.92 -0.6 253.43/184.63/105.92
15 | -0.6 253.97/198.38/117.48 -0.5 253.97/198.38/117.48
16 | -0.5 254/212.12/129.03 -0.4 254/212.12/129.03
17 | -0.4 254/225.2/140.95 -0.3 254/225.2/140.95
18 | -0.3 254/234/155.25 -0.2 254/234/155.25
19 | -0.2 254.18/242.63/169.55 -0.1 254.18/242.63/169.55
20 | -0.1 254.72/250.88/183.85 0 254.72/250.88/183.85
21 | 0 249.78/252.8/183.85 0.1 249.78/252.8/183.85
22 | 0.1 239.32/248.4/169.55 0.2 239.32/248.4/169.55
23 | 0.2 228.88/244/155.25 0.3 228.88/244/155.25
24 | 0.3 218.42/239.6/140.95 0.4 218.42/239.6/140.95
25 | 0.4 205.12/233.78/130.92 0.5 205.12/233.78/130.92
26 | 0.5 191.35/227.72/121.6 0.6 191.35/227.72/121.6
27 | 0.6 177.05/221.67/112.8 0.7 177.05/221.67/112.8
28 | 0.7 162/215.25/105.5 0.8 162/215.25/105.5
29 | 0.8 144.4/207.55/103.3 0.9 144.4/207.55/103.3
30 | 0.9 126.8/199.85/101.33 1 126.8/199.85/101.33
31 | 1 109.2/192.15/99.675 1.1 109.2/192.15/99.675
32 | 1.1 89.65/183.15/96.075 1.2 89.65/183.15/96.075
33 | 1.2 68.75/173.25/91.125 1.3 68.75/173.25/91.125
34 | 1.3 47.85/162.92/85.75 1.4 47.85/162.92/85.75
35 | 1.4 26.95/152.47/80.25 1.5 26.95/152.47/80.25
36 | 1.5 19.175/139.4/73.7 1.6 19.175/139.4/73.7
37 | 1.6 12.025/126.2/67.025 1.7 12.025/126.2/67.025
38 | 1.7 4.875/113/59.875 1.8 4.875/113/59.875
39 | 1.8 0/104/55 1.9 0/104/55
40 | 1.9 0/104/55 2 0/104/55
41 | B black
42 | F black
43 | N black
44 |
--------------------------------------------------------------------------------
/tools/dem-from-tifs.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -u # Disable usage of unset variables.
4 | set -e # Exit when scripts return a non-true value.
5 |
6 | if [ ! $# -eq 2 ]; then
7 | echo
8 | echo "Usage: dem-from-tifs.sh