Good morning @mortcanty,
First of all thanks for making your code available. I am having a little trouble with the sar_seq_s1.sh script and was hoping for some insight, any help would be greatly appreciated.
I am working with a stack of Sentinel-1 of orbit slices (in this case: relative orbit 68, slice 5). Prep was done in SNAP. Each image has a duel pol C2 matrix (4 bands: C11, C12-real, C12 imag, C22).
Processing chain went: Orbit Cal-> Calibration->Topsar-Deburst -> Polarimetric matrices -> Multilook -> Terrain-Correction (UTM automatic).
Your script to estimate the number of looks worked great, and indicated a clear Gaussian peak at ~4.7 which I rounded to 5.
My errors are with the sar_seq_s1.sh. This was my call to the docker script:
!/home/sar_seq_s1.sh SLC_20161005T091117__prep_r68_s5 SLC_20161017T091117__prep_r68_s5 SLC_20161029T091118__prep_r68_s5 SLC_20161110T091117__prep_r68_s5 [0,0,500,500] 5 0.01
Errors:
I am getting an ERROR 5: Access window RasterIO out of range error
and unsupported operand type(s) for +=: 'NoneType' and 'NoneType'
I tried several subsets, the printout below was the result for [0,0,500,500] on a ~17000 x 21000 raster. I do not get the above (access and type) errors if I subset away from the edge e.g. [500,500,1000,1000]. However I really need to run the change detection on the whole image...
The next math error i get regardless :
invalid value encountered in divide ir = abs(ifft2((f0 * f1.conjugate()) / (abs(f0) * abs(f1))))
I suspected because the noData from the Sentinel-1 chain has defaulted to 0.0 it might be a Div/0 error, so i tried changing it to 0.00001 as a test but got the same result.
Not fatal, but i also always get a fail to find the controller file, I am told this might be a timeout triggered by the above errors:
Connection file '~/.ipython/profile_default/security/ipcontroller-client.json' not found.
You have attempted to connect to an IPython Cluster but no Controller could be found.
This is the process printout:
***** Multitemporal PolSAR Change Detection **********
***** Sentenel-1 dualpol imagery *********************
******************************************************
number of images 4
ENL 5
spatial subset [0,0,500,500]
===========================
Spatial/spectral subsetting
===========================
Mon Sep 18 09:28:33 2017
Input /home/imagery/SLC_20161005T091117__prep_r68_s5.tif
elapsed time: 1.0587720871
attempting parallel execution of co-registration ...
Waiting for connection file: ~/.ipython/profile_default/security/ipcontroller-client.json
Connection file '~/.ipython/profile_default/security/ipcontroller-client.json' not found.
You have attempted to connect to an IPython Cluster but no Controller could be found.
Please double-check your configuration and ensure that a cluster is running.
Failed, so running sequential co-registration ...
=========================
Register SAR
=========================
Mon Sep 18 09:29:04 2017
Reference SAR image:
/home/imagery/SLC_20161005T091117__prep_r68_s5.tif
Target SAR image:
/home/imagery/SLC_20161017T091117__prep_r68_s5.tif
ERROR 5: /home/imagery/SLC_20161017T091117__prep_r68_s5.tif, band 1: Access window out of range in RasterIO(). Requested
(-3,-3) of size 500x500 on raster of 21276x17424.
warping 4 bands (dual pol)...
ERROR 5: /home/imagery/SLC_20161017T091117__prep_r68_s5.tif, band 4: Access window out of range in RasterIO(). Requested
(-3,-3) of size 500x500 on raster of 21276x17424.
registersar failed: unsupported operand type(s) for +=: 'NoneType' and 'NoneType'
=========================
Register SAR
=========================
Mon Sep 18 09:29:04 2017
Reference SAR image:
/home/imagery/SLC_20161005T091117__prep_r68_s5.tif
Target SAR image:
/home/imagery/SLC_20161029T091118__prep_r68_s5.tif
ERROR 5: /home/imagery/SLC_20161029T091118__prep_r68_s5.tif, band 1: Access window out of range in RasterIO(). Requested
(2,-3) of size 500x500 on raster of 21276x17424.
warping 4 bands (dual pol)...
ERROR 5: /home/imagery/SLC_20161029T091118__prep_r68_s5.tif, band 4: Access window out of range in RasterIO(). Requested
(2,-3) of size 500x500 on raster of 21276x17424.
registersar failed: unsupported operand type(s) for +=: 'NoneType' and 'NoneType'
=========================
Register SAR
=========================
Mon Sep 18 09:29:05 2017
Reference SAR image:
/home/imagery/SLC_20161005T091117__prep_r68_s5.tif
Target SAR image:
/home/imagery/SLC_20161110T091117__prep_r68_s5.tif
warping 4 bands (dual pol)...
/usr/local/lib/python2.7/dist-packages/auxil/auxil.py:735: RuntimeWarning: invalid value encountered in divide
ir = abs(ifft2((f0 * f1.conjugate()) / (abs(f0) * abs(f1))))
registersar failed:
elapsed time for co-registration: 32.9703288078
===============================================
Multi-temporal SAR Change Detection
===============================================
Mon Sep 18 09:29:06 2017
First (reference) filename: /home/imagery/SLC_20161005T091117__prep_r68_s5_sub.tif
number of images: 4
equivalent number of looks: 5.000000
significance level: 0.010000
pre-calculating Rj and p-values ...
attempting parallel calculation ...
Waiting for connection file: ~/.ipython/profile_default/security/ipcontroller-client.json
Connection file '~/.ipython/profile_default/security/ipcontroller-client.json' not found.
You have attempted to connect to an IPython Cluster but no Controller could be found.
Please double-check your configuration and ensure that a cluster is running.
failed, so running sequential calculation ...
ell= 1 Error: not a string -- Could not read file