.dim files in python / snappy cause errors

Hi everyone,

I´ve been following this forum for quite a while but now it´s time for my first question:

I try to set up a processing chain within python / snappy and the first step (calibration) - which is calculated from the .SAFE files - is no problem.

(…)
scene_calib = GPF.createProduct(“Calibration”, parameters, scene)
ProductIO.writeProduct(scene_calib, path_out + “\” + filename[:-5] + “_cal”, ‘BEAM-DIMAP’)

In the second step I try to use the output of the calibration - which is a .dim file - and apply TOPS-Deburst

parameters = HashMap()
parameters.put("selectedPolarisations", "VV")

scene_name = path_out + "\\" + filename[:-5] + "_cal" + ".dim"

scene = ProductIO.readProduct(scene_name)
scene_deb = GPF.createProduct("TOPSAR-Deburst", parameters, scene)
ProductIO.writeProduct(scene_deb, scene_name[:-4] + "_deb", "BEAM-DIMAP")

If I run the TOPS-Deburst also with a .SAFE file (instead of calibration) it works. But if I use the .dim, I get the following error:

Traceback (most recent call last):
  File "C:\Python34\lib\site-packages\IPython\core\interactiveshell.py", line 2847, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-10-f92f2d6b5c81>", line 1, in <module>
    scene_deb = GPF.createProduct("TOPSAR-Deburst", parameters, scene)
RuntimeError: org.esa.snap.core.gpf.OperatorException: java.lang.NullPointerException
java.lang.NullPointerException

I´m really new to Python and also new to SAR processing, so it might just be some rookie mistake, but I´m quite puzzled at the moment.

Cheers,
Fabio

Solved it myself: it was not about the .dim but I was processing only one subswath without using the Split Operator… That actually works and creates an image but must have somehow messed up the metadata I guess?

Sorry for that