Setting use of no-data in snappy


I am trying to run a postprocessing job on a custom S1 dataset.

For this, I need to specify the unit and no-data values (and use) of each band.
With SNAP, everything is working fine.

I am trying to loop in python /snappy, and while I manage to set the unit per band with:
p = ProductIO.readProduct(fn)

I can’t find the correct syntax to set the No-Data Value Used to ‘True’, as well as the No-Data Value

Thank you in advance for your answers

The way to do is is like:

You have two options to set the no data value one is by setting the raw (unscaled) value.

Or you use geophysical value.

The values which are shown in SNAP are the geophysical ones. So maybe you want to use this method.

You also need to switch one the usage of this value.

Thank you very much, this is the solution I was looking for