dinosar.isce package

Functions for ISCE software.

This module has functions that facilitate running ISCE software (v2.1.0). Currently extensively uses external calls to GDAL command line scripts. Some functions borrow from example applications distributed with ISCE.

dinosar.isce.dict2xml(dictionary, root='topsApp', topcomp='topsinsar')

Convert simple dictionary to XML for ISCE.

dinosar.isce.load_defaultDict(template)
dinosar.isce.make_amplitude_cmap(mapname='gray', vmin=1, vmax=100000.0, ncolors=64, outname='amplitude-cog.cpt')

Write default colormap (amplitude-cog.cpt) for isce amplitude images.

Uses a LogNorm colormap by default since amplitude return values typically span several orders of magnitude.

Parameters
  • mapname (str) – matplotlib colormap name

  • vmin (float) – data value mapped to lower end of colormap

  • vmax (float) – data value mapped to upper end of colormap

  • ncolors (int) – number of discrete mapped values between vmin and vmax

dinosar.isce.make_cmap(infile)

Call correct cmap function depending on file.

dinosar.isce.make_coherence_cmap(mapname='inferno', vmin=1e-05, vmax=1, ncolors=64, outname='coherence-cog.cpt')

Write default colormap (coherence-cog.cpt) for isce coherence images.

Parameters
  • mapname (str) – matplotlib colormap name

  • vmin (float) – data value mapped to lower end of colormap

  • vmax (float) – data value mapped to upper end of colormap

  • ncolors (int) – number of discrete mapped values between vmin and vmax

dinosar.isce.make_wrapped_phase_cmap(mapname='plasma', vmin=- 50, vmax=50, ncolors=64, wrapRate=6.28, outname='unwrapped-phase-cog.cpt')

Re-wrap unwrapped phase values and write ‘unwrapped-phase-cog.cpt’.

Each color cycle represents wavelength/2 line-of-sight change for wrapRate=6.28.

Parameters
  • mapname (str) – matplotlib colormap name

  • vmin (float) – data value mapped to lower end of colormap

  • vmax (float) – data value mapped to upper end of colormap

  • ncolors (int) – number of discrete mapped values between vmin and vmax

  • wrapRate (float) – number of radians per phase cycle

dinosar.isce.read_yaml_template(template=None)

Read yaml file.

dinosar.isce.write_cmap(outname, vals, scalarMap)

Write external cpt colormap file based on matplotlib colormap.

Parameters
  • outname (str) – name of output file (e.g. amplitude-cog.cpt)

  • vals (float) – values to be mapped to ncolors

  • scalarMap (ScalarMappable) – mapping between array value and colormap value between 0 and 1

dinosar.isce.write_xml(xml, outname='topsApp.xml')

Write xml string to a file.