vis

package
v0.0.0-...-31ed759 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// HeatmapReflectivityShort is a color gradient for cloud reflectivity
	// composites between 5dBZ and 75dBZ.
	HeatmapReflectivityShort = Heatmap(5.0, 75.0, Id)

	// HeatmapReflectivity is a color gradient for cloud reflectivity
	// composites between 5dBZ and 75dBZ.
	HeatmapReflectivity = Heatmap(1.0, 75.0, Id)

	// HeatmapReflectivityWide is a color gradient for cloud reflectivity
	// composites between -32.5dBZ and 75dBZ.
	HeatmapReflectivityWide = Heatmap(-32.5, 75.0, Id)

	// HeatmapAccumulatedHour is a color gradient for accumulated rainfall
	// composites (e.g RW) between 0.1mm/h and 100 mm/h using logarithmic
	// compression.
	HeatmapAccumulatedHour = Heatmap(0.1, 100, Log)

	// HeatmapAccumulatedDay is a color gradient for accumulated rainfall
	// composites (e.g. SF) between 0.1mm and 200mm using logarithmic
	// compression.
	HeatmapAccumulatedDay = Heatmap(0.1, 200, Log)

	HeatmapRadialVelocity = Radialmap(-31.5, 31.5, Log)

	// GraymapLinear is a linear grayscale gradient between the (raw) rvp-6
	// values 0 and 409.5.
	GraymapLinear = Graymap(0, 409.5, Id)

	// GraymapLinearWide is a linear grayscale gradient between the (raw)
	// rvp-6 values 0 and 4095.
	GraymapLinearWide = Graymap(0, 4095, Id)
)

Sample color and grayscale gradients for visualization with the image method.

Functions

func Id

func Id(x float64) float64

Id is the identity (no compression)

func Image

func Image(fn ColorFunc, c *radolan.Composite, layer int) *image.RGBA

Image creates an image by evaluating the color function fn for each data value in the given z-layer.

func Log

func Log(x float64) float64

Log is the natural logarithm (logarithmic compression)

Types

type ColorFunc

type ColorFunc func(val float64) color.RGBA

A ColorFunc can be used to assign colors to data values for image creation.

func Graymap

func Graymap(min, max float64, compression func(float64) float64) ColorFunc

Graymap returns a grayscale gradient between min and max. A compression function is used to make logarithmic scales possible.

func Heatmap

func Heatmap(min, max float64, compression func(float64) float64) ColorFunc

Heatmap returns a colour gradient between min and max. A compression function is used to make logarithmic scales possible.

func Radialmap

func Radialmap(min, max float64, compression func(float64) float64) ColorFunc

Radialmap returns a dichromatic gradient from min to 0 to max which can be used for doppler radar radial velocity products.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL