Convert band to dB

The Convert band to dB fails when working with AirSAR data that were previously decompressed using ENVI.
Here is the java error message:
at org.esa.snap.raster.gpf.LinearTodBOp.computeTile(
Caused: org.esa.snap.core.gpf.OperatorException
at org.esa.snap.engine_utilities.gpf.OperatorUtils.catchOperatorException(
at org.esa.snap.raster.gpf.LinearTodBOp.computeTile(
at org.esa.snap.core.gpf.internal.OperatorImage.computeRect(
at Source)
Caused: org.esa.snap.core.gpf.OperatorException: java.lang.NullPointerException
at org.esa.snap.core.gpf.internal.OperatorExecutor$GPFImagingListener.errorOccurred(
at Source)
at Source)
at Source)
at Source)
at com.bc.ceres.glevel.MultiLevelImage.getData(
at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(
at org.esa.snap.core.gpf.internal.OperatorContext.getSourceTile(
at org.esa.snap.core.gpf.internal.OperatorImage.computeRect(
at Source)
at Source)
at Source)
at Source)
[catch] at Source)

Does it work in the SNAP GUI?

Maybe the metadata is no longer understood after processing in ENVI.

The meta data are standard ENVI without geolocation for this particular data set. I used the Raster -> Data Conversion -> Data conversion to from dB tool from the pull down menu, and it failed.
The “Linear to/from dB” option was not highlighted when I used ctrl-click on a single band in the list.
The ENVI header used to import the data in SNAP is bellow.

description = {
AIRSAR Synthesize Result
P:/Volumes/GP1T/Courses/EPSS150/Labs/lab8/AIRSAR/FCreek_p.dat ] [Fri Sep 18
06:05:13 2020]}
samples = 2560
lines = 2500
bands = 12
header offset = 0
file type = ENVI Standard
data type = 4
interleave = bsq
sensor type = Unknown
byte order = 0
wavelength units = Unknown
band names = {

I just tested this:

  1. Open a Sentinel-1 image as BEAM DIMAP
  2. Export it as ENVI raster (img + hdr)
  3. Close SNAP
  4. Open the ENVI raster in SNAP
  5. Raster > Conversion > Linear to/from dB

I get an operator exception here as well. I opened the metadata of both hdr files - they are identical. I think SNAP needs the metadata from the dim file as well to treat the raster as a SAR product. Have you considered working in the BEAM DIMAP format for the previous steps and only convert to ENVI (if needed) as the very last step?

The previous step was the decompression of the .dat files and SNAP does not have the module to decompress NASA/AirSAR data.
I tried to save the data in the BEAM-DIMAP format but it failed the same way.
I am not sure what SNAP needs in the metadata to perform the conversion to dB which is a simple conversion. The operation can be done using Band Math but it has to be applied to the 12 individual bands one at a time.

right - I forgot about the decompression, sorry.
I haven’t found out which metadata exactly is required but obviously SNAP doesn’t like the input.

If you have to perform it for 12 products, have you considered applying the Band Maps via the graph processing tool?

Yes, the graph tool is a good option for now.