Skip to main content

vrt.create_decibel_vrt()

Create a VRT applying a decibel conversion.

Usage

Source

vrt.create_decibel_vrt(
    src_path,
    output_vrt,
    *,
    from_intensity=True,
)

Deprecated: use derive(src_path, PixelFunction.db(), description="dB", band=1).to_vrt(output_vrt), with PixelFunction.db(20) for amplitude.

Parameters

src_path: str | Path | UPath

Linear-scale source raster.

output_vrt: str | Path | UPath

Output VRT.

from_intensity: bool = True
Use 10*log10 for intensity; otherwise use 20*log10.

Raises

ValueError
If the source is complex or has a scale or offset.