Reading Sentinel 1 SLC band data in SM mode

Hello all,
I am trying to read real and imaginary bands of SLC data using .readPixels().
But I am getting this RuntimeError: no matching Java method overloads found. This was working fine for GRD data and I am not sure if this is the right way to read real and imaginary bands of SLC data.

snippet from my code:
realBand = p.getBand(‘i_VH’)
real_chip = np.zeros(32 * 32, np.int16)
realBand.readPixels(0, 0, 32, 32, real_chip)
real_chip.shape = 32, 32

Please guide me through this.

Thank you

I also see no issue with the code snippet.
You can try to enable the debug mode. How to do it I’ve explained here:

Thanks for the reply. I will try to do debug

I tried editing the snappy.ini file and init.py file. I could not find the log file, is there a root folder where it saves?

If I remember correctly, the log is only written to the console and not to a file

Hello marpet,

following is being printed in the console when i am making debug true. But i still cannot figure out the issue. please let me know what other API’s that can be used to read the band pixel data ?

JPy_GetJNIEnv: jenv=000001B155D2D9F8
JOverloadedMethod_FindMethod: argCount=6, visitSuperClass=1
Py_TYPE(pyArgs[0])->tp_name = org.esa.snap.core.datamodel.Band
Py_TYPE(pyArgs[1])->tp_name = int
Py_TYPE(pyArgs[2])->tp_name = int
Py_TYPE(pyArgs[3])->tp_name = int
Py_TYPE(pyArgs[4])->tp_name = int
Py_TYPE(pyArgs[5])->tp_name = numpy.ndarray
JOverloadedMethod_FindMethod0: method ‘org.esa.snap.core.datamodel.Band#readPixels’: overloadCount=6
JMethod_MatchPyArgs: argument count mismatch (matchValue=0)
JOverloadedMethod_FindMethod0: methodList[0]: paramCount=6, matchValue=0
JMethod_MatchPyArgs: argument count mismatch (matchValue=0)
JOverloadedMethod_FindMethod0: methodList[1]: paramCount=6, matchValue=0
JMethod_MatchPyArgs: argument count mismatch (matchValue=0)
JOverloadedMethod_FindMethod0: methodList[2]: paramCount=6, matchValue=0
JMethod_MatchPyArgs: pyArgs[1]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[2]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[3]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[4]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[5]: paramDescriptor->type->javaName=’[D’, matchValue=0
JOverloadedMethod_FindMethod0: methodList[3]: paramCount=5, matchValue=0
JMethod_MatchPyArgs: pyArgs[1]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[2]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[3]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[4]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[5]: paramDescriptor->type->javaName=’[F’, matchValue=0
JOverloadedMethod_FindMethod0: methodList[4]: paramCount=5, matchValue=0
JMethod_MatchPyArgs: pyArgs[1]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[2]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[3]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[4]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[5]: paramDescriptor->type->javaName=’[I’, matchValue=0 JOverloadedMethod_FindMethod0: methodList[5]: paramCount=5, matchValue=0
JOverloadedMethod_FindMethod0: method ‘org.esa.snap.core.datamodel.AbstractBand#readPixels’: overloadCount=6
JMethod_MatchPyArgs: argument count mismatch (matchValue=0)
JOverloadedMethod_FindMethod0: methodList[0]: paramCount=6, matchValue=0
JMethod_MatchPyArgs: argument count mismatch (matchValue=0)
JOverloadedMethod_FindMethod0: methodList[1]: paramCount=6, matchValue=0
JMethod_MatchPyArgs: argument count mismatch (matchValue=0)
JOverloadedMethod_FindMethod0: methodList[2]: paramCount=6, matchValue=0
JMethod_MatchPyArgs: pyArgs[1]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[2]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[3]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[4]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[5]: paramDescriptor->type->javaName=’[D’, matchValue=0
JOverloadedMethod_FindMethod0: methodList[3]: paramCount=5, matchValue=0
JMethod_MatchPyArgs: pyArgs[1]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[2]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[3]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[4]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[5]: paramDescriptor->type->javaName=’[F’, matchValue=0
JOverloadedMethod_FindMethod0: methodList[4]: paramCount=5, matchValue=0
JMethod_MatchPyArgs: pyArgs[1]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[2]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[3]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[4]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[5]: paramDescriptor->type->javaName=’[I’, matchValue=0 JOverloadedMethod_FindMethod0: methodList[5]: paramCount=5, matchValue=0
JOverloadedMethod_FindMethod0: method ‘org.esa.snap.core.datamodel.RasterDataNode#readPixels’: overloadCount=6
JMethod_MatchPyArgs: pyArgs[1]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[2]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[3]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[4]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[5]: paramDescriptor->type->javaName=’[D’, matchValue=0
JOverloadedMethod_FindMethod0: methodList[0]: paramCount=5, matchValue=0
JMethod_MatchPyArgs: argument count mismatch (matchValue=0)
JOverloadedMethod_FindMethod0: methodList[1]: paramCount=6, matchValue=0
JMethod_MatchPyArgs: pyArgs[1]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[2]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[3]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[4]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[5]: paramDescriptor->type->javaName=’[F’, matchValue=0
JOverloadedMethod_FindMethod0: methodList[2]: paramCount=5, matchValue=0
JMethod_MatchPyArgs: pyArgs[1]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[2]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[3]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[4]: paramDescriptor->type->javaName=‘int’, matchValue=100
JMethod_MatchPyArgs: pyArgs[5]: paramDescriptor->type->javaName=’[I’, matchValue=0 JOverloadedMethod_FindMethod0: methodList[3]: paramCount=5, matchValue=0
JMethod_MatchPyArgs: argument count mismatch (matchValue=0)
JOverloadedMethod_FindMethod0: methodList[4]: paramCount=6, matchValue=0
JMethod_MatchPyArgs: argument count mismatch (matchValue=0)
JOverloadedMethod_FindMethod0: methodList[5]: paramCount=6, matchValue=0
Traceback (most recent call last):
File “I:/Desktop/DLR/Practice/Work_dlr/slcdata_test.py”, line 66, in
main()
File “I:/Desktop/DLR/Practice/Work_dlr/slcdata_test.py”, line 33, in main
realBand.readPixels(0, 0, chip_width, chip_height, real_chip)
RuntimeError: no matching Java method overloads found