extraction

package
v0.0.0-...-90d3743 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrawGrid

func DrawGrid(source *image.RGBA, lowFreq, highFreq int64, startTime, endTime time.Time) *image.RGBA

func GetColor

func GetColor(lvl uint16) color.RGBA

GetColor determines the color of a pixel based on a color gradient and a pixel "level". http://www.andrewnoske.com/wiki/Code_-_heatmaps_and_color_gradients This is mostly a copy of https://github.com/finfinack/netmap/blob/master/netmap.go.

func GetMaxImageHeight

func GetMaxImageHeight(db *sql.DB, source, identifier string, startFreq, endFreq int64, startTime, endTime time.Time) (int, error)

func GetMaxImageWidth

func GetMaxImageWidth(db *sql.DB, source, identifier string, startFreq, endFreq int64, startTime, endTime time.Time) (int, error)

func GetReadableFreq

func GetReadableFreq(freq int64) string

func GetSampleCount

func GetSampleCount(db *sql.DB, source, identifier string, startFreq, endFreq int64, startTime, endTime time.Time) (int, error)

Types

type FilterOptions

type FilterOptions struct {
	SDR        string
	Identifier string
	StartFreq  int64
	EndFreq    int64
	StartTime  time.Time
	EndTime    time.Time
}

type ImageOptions

type ImageOptions struct {
	Height int
	Width  int

	AddGrid bool
}

type RenderMetadata

type RenderMetadata struct {
	ImageHeight  int
	ImageWidth   int
	FreqPerPixel float64
	SecPerPixel  float64
}

type RenderRequest

type RenderRequest struct {
	Filter *FilterOptions
	Image  *ImageOptions
}

type RenderResult

type RenderResult struct {
	Image image.Image

	SourceMeta *SourceMetadata
	ImageMeta  *RenderMetadata
}

func Render

func Render(db *sql.DB, req *RenderRequest) (*RenderResult, error)

type SourceMetadata

type SourceMetadata struct {
	LowFreq   int64
	HighFreq  int64
	StartTime time.Time
	EndTime   time.Time
}

Jump to

Keyboard shortcuts

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