-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SAOCOM L1A products are already calibrated #42
Comments
Hello ! It seems this is a SNAP issue so I will propose a workaround in the meantime: could you modify the SAR Preprocess XML and remove the calibration step? Hope this will work... I will investiguate further when I can 😉 |
But |
I've confirmation that SAOCOM L1A products are calibrated. |
Ok so that's the issue, you need to remove the calibration step from the SNAP GPT XML I will make the workaround as soon as I'm back, around the end of august 😉 |
The other issue is Why the SAOCOM product I'm using passes the tests 🤔 |
Thanks! That'll be great! Let me know if I can help you in any way. |
What products are you using? I'm working inside docker, so i'm trying to understand if SNAP is not installed correctly inside it. Snap its installed using default configs: RUN wget --no-verbose https://download.esa.int/step/snap/8.0/installers/esa-snap_all_unix_8_0.sh &&\
chmod +x ./esa-snap_all_unix_8_0.sh &&\
./esa-snap_all_unix_8_0.sh -q &&\
rm ./esa-snap_all_unix_8_0.sh
ENV PATH="/usr/local/snap/bin:$PATH" Edit: !echo $PATH
It appears to be ok. And: !gpt Returns gpt execution:
|
You can now use SNAP 9.0 😉 I also am using everything in a docker, I could help you if needed I am using the 4 polarisation product you can download on their website (among others) |
Well, I have news.
<graph id="Graph">
<version>1.0</version>
<node id="Read">
<operator>Read</operator>
<sources/>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
<file>$file</file>
</parameters>
</node>
<node id="Write">
<operator>Write</operator>
<sources>
<sourceProduct refid="Read"/>
</sources>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
<file>$out</file>
<formatName>BEAM-DIMAP</formatName>
</parameters>
</node>
</graph> Python code: saocom_vv = saocom_prod.load(bands=[VV]) Error message:
<graph id="Graph">
<version>1.0</version>
<node id="Read">
<operator>Read</operator>
<sources/>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
<file>$file</file>
</parameters>
</node>
<node id="Terrain-Correction">
<operator>Terrain-Correction</operator>
<sources>
<sourceProduct refid="Read"/>
</sources>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
<sourceBands/>
<demName>SRTM 3Sec</demName>
<externalDEMFile/>
<externalDEMNoDataValue>0.0</externalDEMNoDataValue>
<externalDEMApplyEGM>true</externalDEMApplyEGM>
<demResamplingMethod>BILINEAR_INTERPOLATION</demResamplingMethod>
<imgResamplingMethod>BILINEAR_INTERPOLATION</imgResamplingMethod>
<pixelSpacingInMeter>8.46</pixelSpacingInMeter>
<pixelSpacingInDegree>7.599747303651153E-5</pixelSpacingInDegree>
<mapProjection>GEOGCS["WGS84(DD)",
DATUM["WGS84",
SPHEROID["WGS84", 6378137.0, 298.257223563]],
PRIMEM["Greenwich", 0.0],
UNIT["degree", 0.017453292519943295],
AXIS["Geodetic longitude", EAST],
AXIS["Geodetic latitude", NORTH]]</mapProjection>
<alignToStandardGrid>false</alignToStandardGrid>
<standardGridOriginX>0.0</standardGridOriginX>
<standardGridOriginY>0.0</standardGridOriginY>
<nodataValueAtSea>true</nodataValueAtSea>
<saveDEM>false</saveDEM>
<saveLatLon>false</saveLatLon>
<saveIncidenceAngleFromEllipsoid>false</saveIncidenceAngleFromEllipsoid>
<saveLocalIncidenceAngle>false</saveLocalIncidenceAngle>
<saveProjectedLocalIncidenceAngle>false</saveProjectedLocalIncidenceAngle>
<saveSelectedSourceBand>true</saveSelectedSourceBand>
<saveLayoverShadowMask>false</saveLayoverShadowMask>
<outputComplex>false</outputComplex>
<applyRadiometricNormalization>false</applyRadiometricNormalization>
<saveSigmaNought>false</saveSigmaNought>
<saveGammaNought>false</saveGammaNought>
<saveBetaNought>false</saveBetaNought>
<incidenceAngleForSigma0>Use projected local incidence angle from DEM</incidenceAngleForSigma0>
<incidenceAngleForGamma0>Use projected local incidence angle from DEM</incidenceAngleForGamma0>
<auxFile>Latest Auxiliary File</auxFile>
<externalAuxFile/>
</parameters>
</node>
<node id="Write">
<operator>Write</operator>
<sources>
<sourceProduct refid="Terrain-Correction"/>
</sources>
<parameters class="com.bc.ceres.binding.dom.XppDomElement">
<file>$out</file>
<formatName>BEAM-DIMAP</formatName>
</parameters>
</node>
</graph> Python code: saocom_vv = saocom_prod.load(bands=[VV]) Error message:
|
For L1A you must set the Terrain Correction step as EOReader only reads orthorectified data in UTM Could you use the graph without calibration that is already existing: eoreader/data/cplx_no_calib_preprocess_default.xml Did you add the updates to your SNAP 8 ? |
Great! I'll try
I updated to SNAP 9. |
With |
OK so happy to hear that! |
Yes, it seems that using SNAP 9 solved the issue. I'll check with the SAR specialist in my team to find out if its working correctly, just in case there is something miss-configured. |
I think that the updates of SNAP made the calibration step fail safe in some sort I will add that in the documentation ! |
I've checked with the team and it seams that the default filter is working correctly. |
Thanks for the effort you put in helping me resolving this 😉 |
Hi, just jumping on to this issue, albeit closed. I've had similar problems with SNAP 8.0 and SAOCOM. I'm using docker and all signs point to the problem being SNAP 8.0. I can't find any examples of a dockerfile for SNAP 9.0. Does an open source one exist? |
Hello, Here are the lines concerning the SNAP installation on my dockerfile. # Install SNAP
# - download snap installer version 8.0 + TBX
# - change file execution rights for snap installer
# - install snap with gpt
# - link gpt so it can be used systemwide
ARG snap_version=9
ARG snap_update=snap_update.sh
ARG snap_script=esa-snap_sentinel_unix_"$snap_version"_0_0.sh
RUN wget http://step.esa.int/downloads/"$snap_version".0/installers/"$snap_script" \
&& chmod +x "$snap_script" \
&& ./"$snap_script" -q \
&& ln -s /usr/local/snap/bin/gpt /usr/bin/gpt \
# Update SNAP
&& chmod +x "$eeo_root""$snap_update" \
&& "$eeo_root""$snap_update" \
# Add to line to GPT's VMoptions -> Bug (https://forum.step.esa.int/t/xmlfactory-error-using-snap-8/26566)
&& echo "-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl" >> /usr/local/snap/bin/gpt.vmoptions \
# Remove heavy script
&& rm "$snap_script" The update script is: #!/bin/bash
snap --nosplash --nogui --modules --update-all 2>&1 | while read -r line; do
echo "$line"
[ "$line" = "updates=0" ] && sleep 2 && pkill -TERM -f "snap/jre/bin/java"
done Basically the difference between SNAP 8.0 and 9.0 is very thin, the 8.0 script is called |
Thanks @remi-braun , that's a big help! |
With SNAP 8.0 or 9.0 ? I've switched to 9.0 and I just reconstruted an image which worked just fine 😅 |
Working with SNAP 9.0. I've just found the problem. Well, almost. I'm using a Mac M1 processor and couldn't install SNAP 9.0 in docker due to architectural differences. I instead used google cloud builds instead of building locally with docker as this way it will build on a Linux machine. This worked fine for the install, but failed on the update. I ended up splitting the build in two:
I can't explain why the update didn't work on google, and the error codes gave no information. But in the end, it worked... Thanks for the help, @remi-braun ! |
Happy to here that! FYI: EOReader is currently not tested on Macs, so if you encounter any error outside your Docker I may not be able to correct them 😅 |
I'm trying to read SAOCOM data without success.
Here is a minimal example to reproduce my error:
It appears to correctly read the data/metadata, but it fails at getting some of the bands:
Here is the traceback of the error:
https://pastebin.com/SwL9D9Ju
I need help to load the data as an xarray.
Thanks!
The text was updated successfully, but these errors were encountered: