Operator¶
In [1]:
from snapista import Operator
Instantiate a SNAP operator by providing its name:
In [2]:
calibration = Operator('Calibration')
calibration
Out[2]:
Operator('Calibration', sourceBandNames='None', auxFile='Latest Auxiliary File', externalAuxFile='None', outputImageInComplex='false', outputImageScaleInDb='false', createGammaBand='false', createBetaBand='false', selectedPolarisations='None', outputSigmaBand='true', outputGammaBand='false', outputBetaBand='false')
Get the SNAP Operator description:
In [3]:
calibration.describe()
Operator name: Calibration Description: Calibration of products Authors: Jun Lu, Luis Veci org.esa.s1tbx.calibration.gpf.CalibrationOp Version: 1.0 Parameters: sourceBandNames: The list of source bands. Default Value: None Possible values: [] auxFile: The auxiliary file Default Value: Latest Auxiliary File Possible values: ['Latest Auxiliary File', 'Product Auxiliary File', 'External Auxiliary File'] externalAuxFile: The antenna elevation pattern gain auxiliary data file. Default Value: None Possible values: [] outputImageInComplex: Output image in complex Default Value: false Possible values: [] outputImageScaleInDb: Output image scale Default Value: false Possible values: [] createGammaBand: Create gamma0 virtual band Default Value: false Possible values: [] createBetaBand: Create beta0 virtual band Default Value: false Possible values: [] selectedPolarisations: The list of polarisations Default Value: None Possible values: [] outputSigmaBand: Output sigma0 band Default Value: true Possible values: [] outputGammaBand: Output gamma0 band Default Value: false Possible values: [] outputBetaBand: Output beta0 band Default Value: false Possible values: []
Instantiate a SNAP operator by providing its name and update a parameter value
In [4]:
calibration = Operator('Calibration')
List the Operator instance members:
In [5]:
dir(calibration)
Out[5]:
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_get_formats', '_params', 'auxFile', 'createBetaBand', 'createGammaBand', 'describe', 'externalAuxFile', 'operator', 'outputBetaBand', 'outputGammaBand', 'outputImageInComplex', 'outputImageScaleInDb', 'outputSigmaBand', 'selectedPolarisations', 'sourceBandNames', 'to_dict']
Update a parameter value:
In [6]:
calibration.createBetaBand = 'true'
calibration
Out[6]:
Operator('Calibration', sourceBandNames='None', auxFile='Latest Auxiliary File', externalAuxFile='None', outputImageInComplex='false', outputImageScaleInDb='false', createGammaBand='false', createBetaBand='true', selectedPolarisations='None', outputSigmaBand='true', outputGammaBand='false', outputBetaBand='false')
Note: boolean are set as string with 'true'
or 'false
'
Instantiate a SNAP operator by providing its name and setting the values in the constructor
In [7]:
calibration = Operator('Calibration',
createBetaBand='true',
createGammaBand='true')
calibration
Out[7]:
Operator('Calibration', sourceBandNames='None', auxFile='Latest Auxiliary File', externalAuxFile='None', outputImageInComplex='false', outputImageScaleInDb='false', createGammaBand='true', createBetaBand='true', selectedPolarisations='None', outputSigmaBand='true', outputGammaBand='false', outputBetaBand='false')
Print an Operator object
In [8]:
print(calibration)
Calibration: sourceBandNames='None' auxFile='Latest Auxiliary File' externalAuxFile='None' outputImageInComplex='false' outputImageScaleInDb='false' createGammaBand='true' createBetaBand='true' selectedPolarisations='None' outputSigmaBand='true' outputGammaBand='false' outputBetaBand='false'