pysteps icon indicating copy to clipboard operation
pysteps copied to clipboard

`dB_transform` ignores existing metadata

Open dnerini opened this issue 5 years ago • 0 comments

Original report

(by Valentina Gregori)

I also noticed another small issue (already in the previous version of pysteps). When I do a conversion to reflectivity using the function conversion.to_reflectivity(R, metadata) the output value of metadata['zerovalue'] is not as expected. I think this happens because in the transformation.dB_transform function, which is called by conversion.to_reflectivity, the code that checks if "zerovalue" is a key of metadata is missing:

if zerovalue is None:
    zerovalue = metadata.get("zerovalue", threshold-5)

for now, it seems that the "zerovalue" is only replaced by "threshold-5". Do you think it makes sense? Thanks in advance!

dnerini avatar Dec 30 '20 16:12 dnerini