tophu.multiscale_unwrap
- tophu.multiscale_unwrap(unwrapped, conncomp, igram, coherence, nlooks, unwrap_func, downsample_factor, ntiles, min_conncomp_overlap=0.5, scratchdir=None, *, do_lowpass_filter=True, shape_factor=1.5, overhang=0.5, ripple=0.01, attenuation=40.0)
Perform 2-D phase unwrapping using a multi-resolution approach.
The input interferogram is broken up into smaller tiles, which are then unwrapped independently. In order to avoid phase discontinuities between tiles, additional phase cycles are added or subtracted within each tile in order to minimize the discrepancy with a coarse unwrapped phase estimate formed by multilooking the original interferogram.
- Parameters
- unwrappedDatasetWriter
The output unwrapped phase, in radians. An array with the same shape as the input interferogram.
- conncompDatasetWriter
The output array of connected component labels, with the same shape as the unwrapped phase.
- igramDatasetReader
The input interferogram. A two-dimensional complex-valued array. If igram has a
.chunksattribute, then the chosen tile dimensions will be a multiple of that chunk shape.- coherenceDatasetReader
The sample coherence coefficient, with the same shape as the input interferogram.
- nlooksfloat
The effective number of looks used to form the input interferogram and coherence.
- unwrap_funcUnwrapCallback
A callback function used to unwrap the low-resolution interferogram and each high-resolution interferogram tile.
- downsample_factortuple of int
The number of looks to take along each axis in order to form the low-resolution interferogram.
- ntilestuple of int
The number of tiles along each axis. A pair of integers specifying the shape of the grid of tiles to partition the input interferogram into.
- min_conncomp_overlapfloat, optional
Minimum intersection between components in order to be considered overlapping, as a fraction of the area of the high-resolution component area. Used during the relabeling step to determine overlap between connected components resulting from tiled unwrapping and those resulting from coarse unwrapping. Must be in the range (0, 1]. Defaults to 0.5.
- scratchdirpath-like or None, optional
Scratch directory where intermediate processing artifacts are written. If the specified directory does not exist, it will be created. If None, a temporary directory will be created and automatically removed from the filesystem at the end of processing. Otherwise, the directory and its contents will not be cleaned up. Defaults to None.
- do_lowpass_filterbool, optional
If True, apply a low-pass pre-filter prior to multilooking in order to reduce aliasing effects. Defaults to True.
- shape_factorfloat, optional
The shape factor of the anti-aliasing low-pass filter applied prior to multilooking (the ratio of the width of the combined pass-band and transition band to the pass-band width). A larger shape factor results in a more gradual filter roll-off. Ignored if do_lowpass_filter is False. Defaults to 1.5.
- overhangfloat, optional
The fraction of the low-pass filter transition bandwidth that extends beyond the Nyquist frequency of the resulting multilooked data. For example, if overhang=0, the transition band will be entirely within the Nyquist bandwidth. If overhang=0.5, the transition band will centered on the Nyquist frequency. The value must be within the interval [0, 1]. Ignored if do_lowpass_filter is False. Defaults to 0.5.
- ripplefloat, optional
The maximum allowed ripple amplitude below unity gain in the pass-band of the pre-filter, in decibels. Ignored if do_lowpass_filter is False. Defaults to 0.01.
- attenuationfloat, optional
The stop-band attenuation of the pre-filter (the difference in amplitude between the ideal gain in the pass-band and the highest gain in the stop-band), in decibels. Ignored if do_lowpass_filter is False. Defaults to 40.