Skip to content

Commit 53cf14f

Browse files
Matt GarthwaiteMatt Garthwaite
Matt Garthwaite
authored and
Matt Garthwaite
committed
doco updates
1 parent 070ae62 commit 53cf14f

File tree

6 files changed

+75
-78
lines changed

6 files changed

+75
-78
lines changed

docs/installation.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Installation
22
===============
33

44
This is a quick guide to getting the PyRate software up and running in various platforms.
5-
Step by step guide to install Pyrate and run toy example.
5+
Step by step guide to install Pyrate and run a toy example.
66

77
.. include:: ubuntu.rst
88
.. include:: docker.rst

docs/usage.rst

+46-46
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,22 @@ format interferograms are contained in the example configuration file *input_par
1212
File Discovery
1313
~~~~~~~~~~~~~~
1414

15-
To allow flexibility in the file types the can be processed, PyRate requires
16-
file lists to be provided. This allow PyRate to identify what files are of
17-
which type without relying on file extensions. The path to
18-
these lists are provided under the following keywords in the configuration
19-
file:
15+
To allow flexibility in the file types that can be processed, PyRate requires
16+
file lists to be provided. This allows PyRate to identify files of each
17+
type without relying on file extensions. The path to these lists are
18+
provided under the following keywords in the configuration file:
2019

2120
.. note::
2221

23-
Filenames should be provided without the preceding path, wtih each
22+
Filenames should be provided without the preceding path, with each
2423
name on a separate line.
2524

2625
``ifgfilelist``: this is the list of interferograms to be processed.
2726

2827
.. note::
2928

30-
Interferogram filenames must contain an epoch pair. Any naming convention
31-
is appropriate so long as an epoch pair of format ``XXXXXXXX-YYYYYYYY``
29+
Interferogram filenames must contain a pair of epochs. Any naming convention
30+
is appropriate so long as an epoch pair of format ``YYYYMMDD-YYYYMMDD``
3231
exists in the filename.
3332

3433
Example of an interferogram file list:
@@ -39,14 +38,14 @@ file:
3938
20160202-20160415_interferogram
4039

4140
``slcfilelist``: this is the list which contains the pool of available
42-
GAMMA headers.
41+
GAMMA SLC header files.
4342

4443
.. note::
4544

4645
Header filenames must contain an epoch. The epoch must be
47-
in the format ``XXXXXXXXX``.
46+
in the format ``YYYYMMDD``.
4847

49-
Example of a GAMMA header file list:
48+
Example of a GAMMA SLC header file list:
5049
::
5150

5251
20150702_header
@@ -57,12 +56,12 @@ GAMMA headers.
5756
20160415_header
5857

5958
``cohfilelist``: this is the list which contains the pool of available
60-
coherence files (used in optional coherence masking).
59+
coherence files (used during optional coherence masking).
6160

6261
.. note::
6362

64-
Coherence filenames must contain an epoch pair. The epoch pair must be
65-
in the format ``XXXXXXX-YYYYYYYY``.
63+
Coherence filenames must contain a pair of epochs. The epoch pair must be
64+
in the format ``YYYYMMDD-YYYYMMDD``.
6665

6766
Example of a coherence file list:
6867
::
@@ -74,8 +73,8 @@ coherence files (used in optional coherence masking).
7473
The epochs in filenames are used to match the corresponding header or coherence
7574
files to each interferogram. It is recommended to provide all available headers/coherence
7675
files in their respective lists, as only the necessary files will be
77-
used. This allows you to process a subset of interferograms by reducing
78-
the names in ``ifgfilelist`` without needing to modify anything else.
76+
used. This allows you to process a subset of interferograms by removing
77+
entries in ``ifgfilelist`` without needing to modify anything else.
7978

8079

8180
Workflow
@@ -110,8 +109,8 @@ Use ``--help`` for the different command line options:
110109
--help Show this message and exit.
111110

112111
Commands:
113-
conv2tif Convert interferograms to geotiff.
114-
merge Reassemble computed tiles and save as geotiffs.
112+
conv2tif Convert interferograms to geotiff.
113+
merge Reassemble computed tiles and save as geotiffs.
115114
prepifg Perform multilooking and cropping on geotiffs.
116115
process Time series and linear rate computation.
117116

@@ -125,11 +124,11 @@ different parts of the PyRate workflow:
125124

126125
Below we discuss these options.
127126

128-
conv2tif: Converting input intergerograms
129-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
127+
conv2tif: Converting input interferograms to Geotiff format
128+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
130129

131-
Before PyRate can process GAMMA or ROI\_PAC intergerograms, they need to be
132-
converted into geotiff format by the ``conv2tif`` command.
130+
Before PyRate can process GAMMA or ROI\_PAC interferograms, they need to be
131+
converted into geotiff format using the ``conv2tif`` command.
133132

134133
::
135134

@@ -148,13 +147,13 @@ specified at the *processor:* keyword in the config file (0: ROI\_PAC;
148147
Each GAMMA geocoded unwrapped interferogram requires three header files
149148
to extract metadata required for data formatting: a geocoded DEM header
150149
file (``demHeaderFile`` in config) and the master and slave epoch SLC
151-
parameter files (supplied by ``slcfilelist`` in config).
150+
header files (supplied by ``slcfilelist`` in config).
152151

153-
The SLC parameter files should be in the directory specified in the
152+
The SLC header files should be in the directory specified in the
154153
config file under ``slcFileDir``. SLC files for a
155154
particular interferogram are found automatically by date-string pattern
156155
matching based on epochs. If ``slcFileDir`` is not provided, PyRate will
157-
fallback to looking in the observations direcotry (``obsdir`` in config).
156+
look in the observations directory by default (``obsdir`` in config).
158157

159158
Each ROI\_PAC geocoded unwrapped interferogram requires its own
160159
header/resource file. These header files need to be
@@ -174,8 +173,8 @@ prepifg: Preparing input interferograms
174173
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
175174

176175
The second step of PyRate is applying multi-looking and cropping
177-
operations to the converted interferograms.
178-
These procedures are all performed by the ``pyrate prepifg`` command:
176+
operations to the geotiff interferograms.
177+
These procedures are all performed by the ``prepifg`` command:
179178

180179
::
181180

@@ -194,19 +193,20 @@ The ``prepifg`` command is used as follows:
194193
Coherence masking
195194
^^^^^^^^^^^^^^^^^
196195

197-
If specified, ``prepifg`` will perform coherence masking of the unwrapped
196+
If specified, ``prepifg`` will perform coherence masking on the
198197
interferograms before multilooking and cropping is performed. This requires
199-
corresponding coherence images for each unwrapped interferogram. The purpose
200-
of this is to filter the phase observations to a set of high-quality pixels.
201-
Pixels with coherence values below a certain threshold will be set to the
202-
NoDataValue. Note that the number of valid pixels in each interferogram will
203-
be different after coherence masking.
198+
corresponding coherence images for each interferogram. The purpose
199+
of this is to remove the poor quality phase observations to leave a set of
200+
high-quality pixels. Pixels with coherence values below a certain threshold
201+
will be set to the NoDataValue. Note that the number of valid pixels (i.e.
202+
pixels not equal to NoDataValue) in each interferogram will be different
203+
after coherence masking.
204204

205205
Coherence masking is enabled by setting the ``cohmask`` argument to ``1`` in
206206
the configuration file. A threshold, ``cohthresh`` needs to be provided. If
207207
``cohfiledir`` is provided, this is where PyRate will look for coherence
208-
images. If not provided it will look in observations directory where the
209-
unwrapped interferograms exist (``obsdir`` in config). The available coherence
208+
images. If not provided it will look in the observations directory where the
209+
interferograms exist (``obsdir`` in config). The available coherence
210210
filenames need to be specified in a file list and provided as the
211211
``cohfilelist`` parameter.
212212

@@ -217,12 +217,12 @@ The ``prepifg`` command will perform multi-looking (image
217217
sub-sampling) and cropping of the input interferograms in geotiff format.
218218
The purpose of this is to reduce the resolution of the interferograms to
219219
reduce the computational complexity of performing the time series and
220-
linear rate analysis.
220+
stacking analysis.
221221

222222
An example configuration file is provided in the root source directory
223223
as ``input_parameters.conf``.
224224

225-
process: Main workflow and linear rate and time series analysis
225+
process: Main workflow, including stacking and time series analysis
226226
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
227227

228228
::
@@ -243,20 +243,20 @@ This is the core of the PyRate processing workflow, handled by the
243243

244244
pyrate process -f path/to/config_file -c 3 -r 4
245245

246-
This command will perform the time series and linear rate analysis and
246+
This command will perform the time series and stacking analysis and
247247
has the option to break the interferograms into a number of tiles in
248248
``r`` rows and ``c`` columns. For example, the above command will break
249-
the interferograms into 12 tiles and will produce 12 linear rate and
249+
the interferograms into 12 tiles and will produce 12 stacking and
250250
time series products corresponding to each tile.
251251

252-
The optional rows and columns arguments can be used to create smaller
253-
tiles of the full size interferograms. This enables large interferograms
254-
to be more easily be accommodated in memory. The number of tiles chosen
255-
should be as small as possible that fits in the system memory.
252+
The optional rows and columns arguments can be used to split the full-size
253+
interferograms into smaller tiles. This enables large interferograms
254+
to be more easily accommodated in memory. The number of tiles chosen
255+
should be as small as possible that fits within the available system memory.
256256

257257
Optionally, an orbital error correction and a spatio-temporal filter
258-
operation to estimate and remove atmospheric phase screen signals is
259-
applied to the interferograms prior to time series and linear rate
258+
operation to estimate and remove atmospheric phase screen (APS) signals is
259+
applied to the interferograms prior to time series and stacking
260260
analysis. The corrected interferograms are updated on disk and the
261261
corrections are not re-applied upon subsequent runs. This functionality
262262
is controlled by the ``orbfit`` and ``apsest`` options in the
@@ -271,7 +271,7 @@ merge: Putting the tiles back together
271271
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
272272

273273
The last step of the PyRate workflow is to re-assemble the tiles and
274-
save geotiff files of the final time series and linear rate products.
274+
save geotiff files of the final time series and stacking products.
275275

276276
::
277277

input_parameters.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ ifgylast: -34.22
7474

7575
#------------------------------------
7676
# Reference pixel search options
77-
# refx/y: coordinate of reference pixel. If left blank then search for best pixel will be performed
77+
# refx/y: Lon/Lat coordinate of reference pixel. If left blank then search for best pixel will be performed
7878
# refnx/y: number of search grid points in x/y direction
7979
# refchipsize: chip size of the data window at each search grid point
8080
# refminfrac: minimum fraction of valid (non-NaN) pixels in the data window

pyrate/core/aps.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def spatio_temporal_filter(tsincr, ifg, params, preread_ifgs):
6565
"""
6666
Applies a spatio-temporal filter to remove the atmospheric phase screen
6767
(APS) and saves the corrected interferograms. Before performing this step,
68-
the time series must be computed using the SVD method. This function then
68+
the time series iscomputed using the SVD method. This function then
6969
performs temporal and spatial filtering.
7070
7171
:param ndarray tsincr: incremental time series array of size

pyrate/core/config.py

+24-27
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,22 @@
5757
OUT_DIR = 'outdir'
5858
#: STR; Name of Digital Elevation Model file
5959
DEM_FILE = 'demfile'
60-
#: STR; Name of the header for the DEM
60+
#: STR; Name of the DEM header file
6161
DEM_HEADER_FILE = 'demHeaderFile'
62-
#: STR; Name of directory containing GAMMA SLC parameter files
62+
#: STR; Name of directory containing GAMMA SLC header files
6363
SLC_DIR = 'slcFileDir'
64-
# STR; Name of the file list containing the pool of available SLC headers
64+
#: STR; Name of the file list containing the pool of available SLC headers
6565
SLC_FILE_LIST = 'slcfilelist'
6666

6767

68-
#: STR; The projection of the input interferograms.
68+
# STR; The projection of the input interferograms.
69+
# TODO: only used in tests; deprecate?
6970
INPUT_IFG_PROJECTION = 'projection'
7071
#: FLOAT; The no data value in the interferogram files.
7172
NO_DATA_VALUE = 'noDataValue'
7273
#: FLOAT; No data averaging threshold for prepifg
7374
NO_DATA_AVERAGING_THRESHOLD = 'noDataAveragingThreshold'
74-
#: BOOL (1/2/3); Re-project data from Line of sight, 1 = vertical,
75-
# 2 = horizontal, 3 = no conversion
75+
# BOOL (1/2/3); Re-project data from Line of sight, 1 = vertical, 2 = horizontal, 3 = no conversion
7676
#REPROJECTION = 'prjflag' # NOT CURRENTLY USED
7777
#: BOOL (0/1): Convert no data values to Nan
7878
NAN_CONVERSION = 'nan_conversion'
@@ -94,33 +94,31 @@
9494
IFG_YLAST = 'ifgylast'
9595

9696
# reference pixel parameters
97-
#: INT; Coordinate in x of reference pixel OR -1 = perform search
97+
#: INT; Longitude (decimal degrees) of reference pixel, or if left blank a search will be performed
9898
REFX = 'refx'
99-
#: INT; Coordinate in y of reference pixel OR -1 = perform search
99+
#: INT; Latitude (decimal degrees) of reference pixel, or if left blank a search will be performed
100100
REFY = 'refy'
101101
#: INT; Number of reference pixel grid search nodes in x dimension
102102
REFNX = "refnx"
103103
#: INT; Number of reference pixel grid search nodes in y dimension
104104
REFNY = "refny"
105-
#: INT; Dimension of reference pixel search window
105+
#: INT; Dimension of reference pixel search window (in number of pixels)
106106
REF_CHIP_SIZE = 'refchipsize'
107107
#: FLOAT; Minimum fraction of observations required in search window for pixel to be a viable reference pixel
108108
REF_MIN_FRAC = 'refminfrac'
109-
#: BOOL (1/2); Reference phase estimation method
109+
#: BOOL (1/2); Reference phase estimation method (1: median of the whole interferogram, 2: median within the window surrounding the reference pixel)
110110
REF_EST_METHOD = 'refest'
111111

112-
# coherence masking parameters
113112
# coherence masking parameters
114113
#: BOOL (0/1); Perform coherence masking (1: yes, 0: no)
115114
COH_MASK = 'cohmask'
116-
#: FLOAT; Threshold for coherence values
115+
#: FLOAT; Coherence threshold for masking
117116
COH_THRESH = 'cohthresh'
118-
#: STR; Directory containing coherence .cc files; defaults to OBS_DIR if not provided
117+
#: STR; Directory containing coherence files; defaults to OBS_DIR if not provided
119118
COH_FILE_DIR = 'cohfiledir'
120119
#: STR; Name of the file list containing the pool of available coherence files
121120
COH_FILE_LIST = 'cohfilelist'
122121

123-
124122
#atmospheric error correction parameters NOT CURRENTLY USED
125123
APS_CORRECTION = 'apscorrect'
126124
APS_METHOD = 'apsmethod'
@@ -130,41 +128,40 @@
130128
APS_ELEVATION_EXT = 'APS_ELEVATION_EXT'
131129

132130
# orbital error correction/parameters
133-
#: BOOL (1/0); Flag controlling whether to apply orbital error correction
131+
#: BOOL (1/0); Perform orbital error correction (1: yes, 0: no)
134132
ORBITAL_FIT = 'orbfit'
135-
#: BOOL (1/2); Method for orbital error correction, 1: independent, 2: network
133+
#: BOOL (1/2); Method for orbital error correction (1: independent, 2: network)
136134
ORBITAL_FIT_METHOD = 'orbfitmethod'
137-
#: BOOL (1/2/3) Order of orbital error model, 1 = planar in x and y (2 parameter model, 2 = quadratic in x and y (5 parameter model), 3 = quadratic in x and cubic in y (part-cubic 6 parameter model)
135+
#: BOOL (1/2/3) Polynomial order of orbital error model (1: planar in x and y - 2 parameter model, 2: quadratic in x and y - 5 parameter model, 3: quadratic in x and cubic in y - part-cubic 6 parameter model)
138136
ORBITAL_FIT_DEGREE = 'orbfitdegrees'
139137
#: INT; Multi look factor for orbital error calculation in x dimension
140138
ORBITAL_FIT_LOOKS_X = 'orbfitlksx'
141139
#: INT; Multi look factor for orbital error calculation in y dimension
142140
ORBITAL_FIT_LOOKS_Y = 'orbfitlksy'
143141

144-
# Linear rate/stacking parameters
145-
#: FLOAT; Threshold ratio between 'model minus observation' residuals and a-priori observation standard deviations for linear rate estimate acceptance (otherwise remove furthest outlier and re-iterate)
142+
# Stacking parameters
143+
#: FLOAT; Threshold ratio between 'model minus observation' residuals and a-priori observation standard deviations for stacking estimate acceptance (otherwise remove furthest outlier and re-iterate)
146144
LR_NSIG = 'nsig'
147-
#: INT; Number of required observations per pixel for the linear rate inversion
145+
#: INT; Number of required observations per pixel for stacking to occur
148146
LR_PTHRESH = 'pthr'
149-
#: FLOAT; Maximum allowable standard error for pixels in linear rate inversion.
147+
#: FLOAT; Maximum allowable standard error for pixels in stacking
150148
LR_MAXSIG = 'maxsig'
151149

152150
# atmospheric delay errors fitting parameters NOT CURRENTLY USED
153151
# atmfitmethod = 1: interferogram by interferogram; atmfitmethod = 2, epoch by epoch
154152
#ATM_FIT = 'atmfit'
155153
#ATM_FIT_METHOD = 'atmfitmethod'
156154

157-
#: BOOL (0/1) Do spatio-temporal filter
155+
# APS correction parameters
156+
#: BOOL (0/1) Perform APS correction (1: yes, 0: no)
158157
APSEST = 'apsest'
159-
160158
# temporal low-pass filter parameters
161159
#: INT (1/2/3); Method for temporal filtering (1: Gaussian, 2: Triangular, 3: Mean filter)
162160
TLPF_METHOD = 'tlpfmethod'
163161
#: FLOAT; Cutoff time for gaussian filter in years;
164162
TLPF_CUTOFF = 'tlpfcutoff'
165163
#: INT; Number of required input observations per pixel for temporal filtering
166164
TLPF_PTHR = 'tlpfpthr'
167-
168165
# spatially correlated noise low-pass filter parameters
169166
#: INT (1/2); Method for spatial filtering(1: butterworth; 2: gaussian)
170167
SLPF_METHOD = 'slpfmethod'
@@ -178,20 +175,20 @@
178175
SLPF_NANFILL_METHOD = 'slpnanfill_method'
179176

180177
# Time series parameters
181-
#: BOOL (1/0); Do Time series calculation
178+
#: BOOL (1/0); Perform time series calculation (1: yes, 0: no)
182179
TIME_SERIES_CAL = 'tscal'
183180
#: INT (1/2); Method for time series inversion (1: Laplacian Smoothing; 2: SVD)
184181
TIME_SERIES_METHOD = 'tsmethod'
185182
#: INT; Number of required input observations per pixel for time series inversion
186183
TIME_SERIES_PTHRESH = 'ts_pthr'
187-
#: INT (1/2); Order of Laplacian smoothing operator, first or # second order
184+
#: INT (1/2); Order of Laplacian smoothing operator, first or second order
188185
TIME_SERIES_SM_ORDER = 'smorder'
189186
#: FLOAT; Laplacian smoothing factor (values used is 10**smfactor)
190187
TIME_SERIES_SM_FACTOR = 'smfactor'
191188
# tsinterp is automatically assigned in the code; not needed in conf file
192189
#TIME_SERIES_INTERP = 'tsinterp'
193190

194-
#: BOOL (0/1/2); Use parallelisation/Multi-threading
191+
#: BOOL (0/1/2); Use parallelisation/Multi-threading (0: in serial, 1: in parallel by rows, 2: in parallel by pixel)
195192
PARALLEL = 'parallel'
196193
#: INT; Number of processes for multi-threading
197194
PROCESSES = 'processes'

0 commit comments

Comments
 (0)