Skip to content

Latest commit

 

History

History
222 lines (169 loc) · 4.58 KB

pyroSAR.rst

File metadata and controls

222 lines (169 loc) · 4.58 KB

Drivers

pyroSAR.drivers

classes

ID CEOS_PSR CEOS_ERS ESA SAFE TSX Archive

functions

identify identify_many filter_processed findfiles getFileObj parse_date

SNAP Processing

pyroSAR.snap.util

Workflow Parsing

pyroSAR.snap.auxil

gpt parse_node parse_recipe split groupbyWorkers Workflow Node Par get_egm96_lookup

GAMMA Processing

pyroSAR.gamma

convert2gamma correctOSV geocode ISPPar multilook ovs par2hdr process S1_deburst UTM

DEM tools

pyroSAR.gamma.dem

dem_autocreate dempar fill hgt hgt_collect makeSRTM mosaic swap

GAMMA Command API

This is an attempt to make it easier to execute Gamma commands by offering automatically parsed Python functions. Thus, instead of executing the command via shell:

offset_fit offs ccp off.par coffs - 0.15 3 0 > offset_fit.log

one can wrap it in a Python script:

import os
from pyroSAR.gamma.api import isp

workdir = '/data/gamma_workdir'

parameters = {'offs': os.path.join(workdir, 'offs'),
              'ccp': os.path.join(workdir, 'ccp'),
              'OFF_par': os.path.join(workdir, 'off.par'),
              'coffs': os.path.join(workdir, 'coffs'),
              'thres': 0.15,
              'npoly': 3,
              'interact_flag': 0,
              'logpath': workdir}

isp.offset_fit(**parameters)

A file offset_fit.log containing the output of the command is written in both cases. Any parameters, which should not be written and need to be set to - in the shell can be omitted in the Python call since all optional parameters of the functions are already defined with '-' as a default. The documentation can be called like with any Python function:

from pyroSAR.gamma.api import isp
help(isp.offset_fit)

Parser Documentation

pyroSAR.gamma.parser

API Demo

This is a demonstration of an output script as generated automatically by function ~pyroSAR.gamma.parser.parse_module for the Gamma module ISP. Within each function, the command name and all parameters are passed to function ~pyroSAR.gamma.process, which converts all input to :pystr and then calls the command via the subprocess module.

pyroSAR.gamma.parser_demo

Sentinel-1 Tools

pyroSAR.S1

OSV removeGRDBorderNoise

Auxiliary Data Tools

pyroSAR.auxdata

dem_autoload dem_create

Datacube Tools

pyroSAR.datacube_util

Ancillary Functions

pyroSAR.ancillary

find_datasets getargs groupby groupbyTime hasarg multilook_factors parse_datasetname seconds