licelformat

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2025 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LICEL_MAX_HEADER_LEN = 80
)
View Source
const (
	LICEL_MAX_RESERVED = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LicelFile

type LicelFile struct {
	MeasurementSite       string            `json:"location"`       // Место измерения
	MeasurementStartTime  time.Time         `json:"start_time"`     // Время начала измерения
	MeasurementStopTime   time.Time         `json:"stop_time"`      // Время окончания измерения
	AltitudeAboveSeaLevel float64           `json:"lidar_altitude"` // Высота над уровнем моря
	Longitude             float64           `json:"longitude"`      // Долгота
	Latitude              float64           `json:"latitude"`       // Широта
	Zenith                float64           `json:"zenith"`         // Зенит
	Laser1NShots          int               `json:"laser1_nshots"`  // Количество импульсов лазера 1
	Laser1Freq            int               `json:"laser1_freq"`    // Частота лазера 1
	Laser2NShots          int               `json:"laser2_nshots"`  // Количество импульсов лазера 2
	Laser2Freq            int               `json:"laser2_freq"`    // Частота лазера 2
	NDatasets             int               `json:"dataset_count"`  // Количество наборов данных
	Laser3NShots          int               `json:"laser3_nshots"`  // Количество импульсов лазера 3
	Laser3Freq            int               `json:"laser3_freq"`    // Частота лазера 3
	FileLoaded            bool              `json:"-"`              // Файл загружен
	Profiles              LicelProfilesList `json:"datasets"`       // Список профилей
}

LicelFile — структура, представляющая единичное измерение

func LoadLicelFile

func LoadLicelFile(fname string) LicelFile

LoadLicelFile — loads LicelFile the specified file name

func LoadLicelFileFromReader added in v1.0.5

func LoadLicelFileFromReader(f io.Reader, size int64) LicelFile

LoadLicelFileFromReader — loads licel file from reader

func (*LicelFile) FormatFirstLine added in v1.0.5

func (lf *LicelFile) FormatFirstLine(fname string) string

FormatFirstLine - returns string with first line of LICEL file

func (*LicelFile) FormatSecondLine added in v1.0.5

func (lf *LicelFile) FormatSecondLine() string

FormatSecondLine - returns string with second line of LICEL file

func (*LicelFile) FormatThirdLine added in v1.0.5

func (lf *LicelFile) FormatThirdLine() string

FormatThirdLine - returns string with third line of LICEL file

func (*LicelFile) Save added in v1.0.5

func (lf *LicelFile) Save(fname string) error

Save - saves licel file to disk

func (*LicelFile) SelectCertainWavelength added in v1.0.5

func (lf *LicelFile) SelectCertainWavelength(isPhoton bool, wavelength float64) LicelProfile

SelectCertainWavelength1 — selects certain profile by its wavelength and type from a single file

type LicelPack

type LicelPack struct {
	StartTime time.Time            `bson:"start_time"`
	Data      map[string]LicelFile `bson:"data"`
}

func NewLicelPack

func NewLicelPack(mask string) *LicelPack

NewLicelPack — loads files according to mask

func NewLicelPackFromZip added in v1.0.5

func NewLicelPackFromZip(zipPath string) *LicelPack

NewLicelPackFromZip — loads files from zip archive

func (*LicelPack) Save added in v1.0.5

func (lp *LicelPack) Save() error

Save - saves LicelPack to files

func (*LicelPack) SelectCertainWavelength added in v1.0.5

func (lp *LicelPack) SelectCertainWavelength(isPhoton bool, wavelength float64) LicelProfilesList

SelectCertainWavelength2 — selects certain profile by its wavelength and type from a LicelPack

type LicelProfile

type LicelProfile struct {
	Active       bool                    `json:"is_active"`
	Photon       bool                    `json:"is_photon"`     // Активность канала и тип измерения (фотоны или нет)
	LaserType    int                     `json:"laser_type"`    // Тип лазера
	NDataPoints  int                     `json:"data_points"`   // Количество данных
	Reserved     [LICEL_MAX_RESERVED]int `json:"reserved"`      // Резервные значения
	HighVoltage  int                     `json:"high_voltage"`  // Напряжение
	BinWidth     float64                 `json:"bin_width"`     // Ширина бина
	Wavelength   float64                 `json:"wavelength"`    // Длина волны
	Polarization string                  `json:"polarization"`  // Поляризация
	BinShift     int                     `json:"bin_shift"`     // Сдвиг бина
	DecBinShift  int                     `json:"dec_bin_shift"` // Децибельный сдвиг
	AdcBits      int                     `json:"adc_bits"`      // Биты АЦП
	NShots       int                     `json:"n_shots"`       // Количество импульсов
	DiscrLevel   float64                 `json:"discr_level"`   // Уровень дискриминации
	DeviceID     string                  `json:"device_id"`     // Идентификатор устройства
	NCrate       int                     `json:"n_crate"`       // Номер устройства в крэйте
	Data         []float64               `json:"data"`          // Данные
}

LicelProfile — структура, представляющая измерительный канал

func NewLicelProfile

func NewLicelProfile(line string) LicelProfile

NewLicelProfile — parse string line into LicelProfile

func (*LicelProfile) Metadata added in v1.0.5

func (lp *LicelProfile) Metadata() string

Metadata — возвращает метаданные канала

func (*LicelProfile) Profile added in v1.0.5

func (lp *LicelProfile) Profile() string

Profile — преобразование данных канала в строку

type LicelProfilesList

type LicelProfilesList []LicelProfile

Jump to

Keyboard shortcuts

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