Documentation
¶
Overview ¶
frequency data
Peak model file Text formatted file, describes how peakmodels are created
Index ¶
Constants ¶
View Source
const ( REDWEIGHT float64 = 0.299 GREENWEIGHT float64 = 0.587 BLUEWEIGHT float64 = 0.114 )
View Source
const ( PEAKMODEL_GAUSS = 0 PEAKMODEL_LORENTZ = 1 PEAKMODEL_HYPSEC = 2 )
View Source
const COMMENTSYMBOL = "#"
View Source
const NUMBEROFDECIMALS = 6
Variables ¶
This section is empty.
Functions ¶
func ColorToIntensity ¶
Types ¶
type FrequencyData ¶
func (*FrequencyData) AddPeak ¶
func (p *FrequencyData) AddPeak(peak PeakModel) error
func (*FrequencyData) CreateImage ¶
func (*FrequencyData) ToCsv ¶
func (p *FrequencyData) ToCsv() string
type FrequencyDataArr ¶
type FrequencyDataArr []FrequencyData
func CalcFrequencyDataArr ¶
func CalcFrequencyDataArr(model PeakModelFile, steps int, startNm float64, endNm float64, points int) (FrequencyDataArr, error)
func CalcTestTriangle ¶
func (*FrequencyDataArr) ToGrid ¶
func (p *FrequencyDataArr) ToGrid() (string, error)
Grid, for plotting. (assume same dimension and nm axis)
type PeakModel ¶
type PeakModel struct { Type PeakModelType Peak float64 Position float64 Fwhm float64 //Full width half maximum, puoliarvonleveys in finnish }
type PeakModelArr ¶
type PeakModelArr []PeakModel
func (PeakModelArr) String ¶
func (a PeakModelArr) String() string
type PeakModelFile ¶
type PeakModelFile []PeakModelFileRow
func LoadPeakModelFile ¶
func LoadPeakModelFile(filename string) (PeakModelFile, error)
Helper function
func ParsePeakModelFile ¶
func ParsePeakModelFile(content []byte) (PeakModelFile, error)
func (*PeakModelFile) GetPeakModels ¶
func (p *PeakModelFile) GetPeakModels(progressRatio float64) []PeakModel
func (PeakModelFile) ToOutputFormat ¶
func (a PeakModelFile) ToOutputFormat() (string, error)
type PeakModelFileRow ¶
type PeakModelFileRow struct { Positions []float64 Type PeakModelType Parameters []float64 //Usually 1, depends on type. can be more at future Intencities []float64 }
func ParsePeakModelRow ¶
func ParsePeakModelRow(row string) (PeakModelFileRow, error)
func (*PeakModelFileRow) GetPeakModel ¶
func (p *PeakModelFileRow) GetPeakModel(progressRatio float64) PeakModel
func (*PeakModelFileRow) ToOutputFormat ¶
func (p *PeakModelFileRow) ToOutputFormat() (string, error)
type PeakModelType ¶
type PeakModelType int
func (PeakModelType) String ¶
func (a PeakModelType) String() string
Click to show internal directories.
Click to hide internal directories.