Documentation ¶
Overview ¶
Package pixprob associates a pixelation raster value with a probability for a pixel.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pixel ¶
type Pixel map[int]prob
Pixel is the prior probability of a pixel given a raster value.
Each pixel is assumed to be independent of all other pixels.
func New ¶
func New() Pixel
New creates a new Pixel object to store prior probabilities from pixel types.
By default, the ID 0 is defined with probability 0.
func ReadTSV ¶
ReadTSV reads a TSV file used to define the prior probability values for a given set of pixels values in a pixelation.
The pixel prior file is a tab-delimited file with the following columns:
-key the value used as identifier -prior the prior probability for a pixel with that value
Any other columns, will be ignored. Here is an example of a pixel prior file:
key prior comment 0 0.000000 deep ocean 1 0.010000 oceanic plateaus 2 0.050000 continental shelf 3 0.950000 lowlands 4 1.000000 highlands 5 0.001000 ice sheets
func (Pixel) LogPrior ¶
LogPrior returns the log prior probability of a pixel for a given raster value.