isce-framework / isce2

InSAR Scientific Computing Environment version 2
Other
497 stars 246 forks source link

Processing UAVSAR_Polsar with stripmapApp.py #301

Closed scottstanie closed 3 years ago

scottstanie commented 3 years ago

I'm running into a few issues trying to form an interferogram with two (zero Doppler processed) UAVSAR PolSAR slcs.

My first question is- is stripmapApp.py the right application to process this? Or is there another that people more regularly use?

The data I'm using comes from here, where I downloaded the "VV".slc files, and the annotation files.

https://uavsar.jpl.nasa.gov/cgi-bin/product.pl?jobName=SanAnd_23511_14068_001_140529_L090_CX_02#data https://uavsar.jpl.nasa.gov/cgi-bin/product.pl?jobName=SanAnd_23511_14128_002_140829_L090_CX_02#data (For this, i've selected the "UAVSAR product with simulated NISAR looks and ground spacing", which has the .slc binary images and not the HDF5 files)

FIrst I came across this:

Traceback (most recent call last):
  File "/home/scott/repos/isce2/install/packages/isce/applications/stripmapApp.py", line 1002, in <module>
    status = insar.run()
  File "/home/scott/repos/isce2/install/packages/isce/components/iscesys/Component/Application.py", line 144, in run
    exitStatus = self.main()
  File "/home/scott/repos/isce2/install/packages/isce/applications/stripmapApp.py", line 956, in main
    super().main()
  File "/home/scott/repos/isce2/install/packages/isce/applications/stripmapApp.py", line 836, in main
    self.runPreprocessor()
  File "/home/scott/repos/isce2/install/packages/isce/components/isceobj/StripmapProc/Factories.py", line 46, in __call__
    return self.method(self.other, *args, **kwargs)
  File "/home/scott/repos/isce2/install/packages/isce/components/isceobj/StripmapProc/runPreprocessor.py", line 69, in runPreprocessor
    reference = make_raw(sensor, referencedop)
  File "/home/scott/repos/isce2/install/packages/isce/components/isceobj/StripmapProc/runPreprocessor.py", line 206, in make_raw
    objMakeRaw(sensor=sensor, doppler=doppler)
  File "/home/scott/repos/isce2/install/packages/isce/components/iscesys/Component/Component.py", line 179, in __call__
    return getattr(self, self.__class__.__name__.lower())(*args)
  File "/home/scott/repos/isce2/install/packages/isce2/applications/make_raw.py", line 235, in make_raw
    self.sensor.extractImage()
  File "/home/scott/repos/isce2/install/packages/isce/components/isceobj/Sensor/UAVSAR_Polsar.py", line 236, in extractImage
    self.metadata["slc" + self.polarization.upper()],
AttributeError: 'UAVSAR_Polsar' object has no attribute 'polarization'

I saw that a POLARIZATION component was in the UAVSAR_HDF5_SLC file that was not here, so I added

POLARIZATION = Component.Parameter(
    "polarization",
    public_name="POLARIZATION",
    default="VV",
    type=str,
    mandatory=True,
    intent="input",
    doc="polarization channel of the UAVSAR slc file to be processed",
)

That led to the following error, which I'm having more trouble tracking down:

Traceback (most recent call last):
  File "/home/scott/repos/isce2/install/packages/isce/applications/stripmapApp.py", line 1002, in <module>
    status = insar.run()
  File "/home/scott/repos/isce2/install/packages/isce/components/iscesys/Component/Application.py", line 144, in run
    exitStatus = self.main()
  File "/home/scott/repos/isce2/install/packages/isce/applications/stripmapApp.py", line 956, in main
    super().main()
  File "/home/scott/repos/isce2/install/packages/isce/applications/stripmapApp.py", line 836, in main
    self.runPreprocessor()
  File "/home/scott/repos/isce2/install/packages/isce/components/isceobj/StripmapProc/Factories.py", line 48, in __call__
    return self.method(self.other, *args, **kwargs)
  File "/home/scott/repos/isce2/install/packages/isce/components/isceobj/StripmapProc/runPreprocessor.py", line 89, in runPreprocessor
    reference = make_raw(sensor, referencedop)
  File "/home/scott/repos/isce2/install/packages/isce/components/isceobj/StripmapProc/runPreprocessor.py", line 206, in make_raw
    objMakeRaw(sensor=sensor, doppler=doppler)
  File "/home/scott/repos/isce2/install/packages/isce/components/iscesys/Component/Component.py", line 179, in __call__
    return getattr(self, self.__class__.__name__.lower())(*args)
  File "/home/scott/repos/isce2/install/packages/isce2/applications/make_raw.py", line 289, in make_raw
    self.doppler.wireInputPort(name='sensor', object=self.sensor)
  File "/home/scott/repos/isce2/install/packages/isce/components/iscesys/Component/Component.py", line 157, in method_with_flow
    return method(self)(*args, **kwargs)
  File "/home/scott/repos/isce2/install/packages/isce/components/iscesys/Component/Component.py", line 259, in _wirePort
    raise PortError("No %s port named %s" % (port_iterator.flow, name))
iscesys.Component.Component.PortError: 'No input port named sensor'

I also noticed that uavsar_polsar is not listed in the Factories.py list of sensors which wouldn't be "RAW": https://github.com/isce-framework/isce2/blob/main/components/isceobj/StripmapProc/Factories.py#L55 This means it is saying Reference data is in RAW format. Adding _raw to output name.. It's also not listed as a possible option for the isZeroDopplerSLC, but I'm not sure if that matters. Changing the code for either of these does not fix the No input port named sensor issue.

Here are my XML files:

(mapping) [scott@lidar sanAnd_23511_80MHz]$ cat stripmapApp.xml
<?xml version="1.0" encoding="UTF-8"?>
<stripmapApp>
  <component name="insar">
    <property name="sensor name">UAVSAR_POLSAR</property>
    <component name="reference">
        <catalog>reference.xml</catalog>
    </component>
    <component name="secondary">
        <catalog>secondary.xml</catalog>
    </component>

    <property name="do rubbersheetingAzimuth">False</property>
    <property name="do rubbersheetingRange">False</property>
    <property name="unwrapper name">snaphu</property>
    <property name="do split spectrum">False</property>
    <property name="do dispersive">False</property>

    <property name="regionOfInterest">[38.08, 38.5, -122.55, -122.1]</property>

</component>
</stripmapApp>
(mapping) [scott@lidar sanAnd_23511_80MHz]$ cat reference.xml
<component name="reference">
    <property name="annotation file">
        data/SanAnd_23511_14068_001_140529_L090_CX_02.ann
    </property>
    <property name="OUTPUT">
        20140529
    </property>
</component>
(mapping) [scott@lidar sanAnd_23511_80MHz]$ cat secondary.xml
<component name="secondary">
    <property name="annotation file">
        data/SanAnd_23511_14128_002_140829_L090_CX_02.ann
    </property>
    <property name="OUTPUT">
        20140829
    </property>
</component>
EJFielding commented 3 years ago

Hi, I am not sure why you are trying to form interferograms with the UAVSAR product with simulated NISAR looks and ground spacing SLC products. The ISCE2 software is not designed to process the simulated NISAR products. The ISCE3 software is being developed to process NISAR data, including the UAVSAR products with simulated NISAR format.

There are the UAVSAR SLC stack products for this line (see https://uavsar.jpl.nasa.gov/cgi-bin/product.pl?jobName=SanAnd_23511_01 if you have a UAVSAR.jpl.nasa.gov account) that are already processed for InSAR analysis with precise coregistration between all the dates in the stack. The UAVSAR SLC stack products can be processed with the ISCE2 stripmapStack workflow.

scottstanie commented 3 years ago

Thanks @EJFielding , I'll check out the pre-made stack for comparison. I wasn't sure if ISCE3 was ready, so I've been adapting ISCE2. I can close this issue if it's something that has no plan to be added into ISCE2.