biosigio

package module
v0.0.0-...-2ca5ee2 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2016 License: GPL-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Overview

Simple Marshal/Unmarshal operations for data in EDF and BDF data formats. See docs for details using the library.

Documentation

Index

Constants

View Source
const (
	FixedHeaderBytes    = 256
	VariableHeaderBytes = 256
	EDFDataByteSize     = 2
	BDFDataByteSize     = 3
)

Variables

View Source
var BDFVersion = [8]byte{'\xFF', '\x42', '\x49', '\x4F', '\x53', '\x45', '\x4D', '\x49'}
View Source
var EDFVersion = [8]byte{'\x48', '\x32', '\x32', '\x32', '\x32', '\x32', '\x32', '\x32'}

Functions

func DigitalMaxs

func DigitalMaxs(digmaxs []string) func(*Header) error

DigitalMaxs setter

func DigitalMins

func DigitalMins(digmins []string) func(*Header) error

DigitalMins setter

func Duration

func Duration(dur string) func(*Header) error

Duration setter

func Labels

func Labels(labels []string) func(*Header) error

Labels setter

func LocalPatientID

func LocalPatientID(LPID string) func(*Header) error

LocalPatientID setter

func LocalRecordID

func LocalRecordID(LRID string) func(*Header) error

LocalRecordID setter

func MarshalBDF

func MarshalBDF(edf *BDF) (buf []byte, err error)

Marshal edf into byte slice

func MarshalEDF

func MarshalEDF(edf *EDF) (buf []byte, err error)

Marshal edf into byte slice

func NSReserved

func NSReserved(nsreserved []string) func(*Header) error

NSReserved setter

func NumBytes

func NumBytes(numbytes string) func(*Header) error

NumBytes setter

func NumDataRecord

func NumDataRecord(nr string) func(*Header) error

NumDataR setter

func NumSamples

func NumSamples(numsamples []string) func(*Header) error

NumSamples setter

func NumSignal

func NumSignal(ns string) func(*Header) error

NumSig setter

func PhysicalDimensions

func PhysicalDimensions(phydims []string) func(*Header) error

PhysicalDimensions setter

func PhysicalMaxs

func PhysicalMaxs(phymaxs []string) func(*Header) error

PhysicalMaxs setter

func PhysicalMins

func PhysicalMins(phymins []string) func(*Header) error

PhysicalMins setter

func Prefilters

func Prefilters(prefilters []string) func(*Header) error

Prefilters setter

func Reserved

func Reserved(res string) func(*Header) error

Reserved setter

func Startdate

func Startdate(startdate string) func(*Header) error

Startdate setter

func Starttime

func Starttime(starttime string) func(*Header) error

Starttime setter

func TransducerTypes

func TransducerTypes(transducerTypes []string) func(*Header) error

TransducerTypes setter

func Version

func Version(number string) func(*Header) error

Version setter

Types

type BDF

type BDF struct {
	Header      *Header
	DataRecords []*BDFData
}

func NewBDF

func NewBDF(h *Header, d []*BDFData) *BDF

func UnmarshalBDF

func UnmarshalBDF(buf []byte) (bdf *BDF, err error)

type BDFData

type BDFData struct {
	Signals [][]int32
	// contains filtered or unexported fields
}

BDFData holds one bdf data record

type EDF

type EDF struct {
	Header      *Header
	DataRecords []*EDFData
}

func NewEDF

func NewEDF(h *Header, d []*EDFData) *EDF

func UnmarshalEDF

func UnmarshalEDF(buf []byte) (edf *EDF, err error)

type EDFData

type EDFData struct {
	Signals [][]int16
	// contains filtered or unexported fields
}

EDFData holds one edf data record

type Header struct {
	LPID [80]byte
	LRID [80]byte
	// contains filtered or unexported fields
}

Header holds edf header data by type

func NewHeader

func NewHeader(options ...func(*Header) error) (*Header, error)

NewHeader instantiates a edf header Optional funcational parameters to set values in header If optional parameters are left blank, default is ASCII NUL

Jump to

Keyboard shortcuts

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