goastrodata

package module
v0.0.0-...-d300692 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: GPL-2.0 Imports: 5 Imported by: 0

README

goastrodata

Getting started

Testing

go test -v
go test -cover -v

// checking coverage of test
go test -coverprofile c.out 
go tool cover -html="c.out"
-> /tmp/cover*

Documentation

Index

Constants

View Source
const (
	COMP_uncompressed int = 0
	COMP_bzip2        int = 1
	COMP_gzip         int = 2
	COMP_compress     int = 3
	COMP_xz           int = 4
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Astrodata

type Astrodata struct {
	Adf  AstrodataFile
	Adds AstrodataDataset
	Add  parsedata.AstrodataData // we want to have access to the data really parsed here
}

func (*Astrodata) Close

func (a *Astrodata) Close() error

func (*Astrodata) CurrentLine

func (a *Astrodata) CurrentLine() int64

func (*Astrodata) Data

func (a *Astrodata) Data() (AstrodataData, error)

func (*Astrodata) Epoch

func (a *Astrodata) Epoch() float64

func (*Astrodata) Init

func (a *Astrodata) Init()

func (*Astrodata) Len

func (a *Astrodata) Len() int64

func (*Astrodata) Next

func (a *Astrodata) Next() error

func (*Astrodata) Open

func (a *Astrodata) Open(datafile string) error

func (*Astrodata) Open1950

func (a *Astrodata) Open1950(datafile string) error

func (*Astrodata) Open2000

func (a *Astrodata) Open2000(datafile string) error

func (*Astrodata) OpenAtEpoch

func (a *Astrodata) OpenAtEpoch(datafile string, epoch float64) error

type AstrodataData

type AstrodataData struct {
	Index int
	Ra    float64
	Dec   float64
	M     float64
}

we want to have this struct as external interface to astrodata

type AstrodataDataset

type AstrodataDataset struct {
	Type        int
	FirstLine   string
	SecondLine  string
	DataLine    string
	Epoch       float64 // epoch of this dataset
	Header      int     // lenght of header in lines
	CurrentLine int64   // current line from dataset, header lines are NOT counted
	PeekData    []byte  // peek into file to get the type
}

type AstrodataFile

type AstrodataFile struct {
	Datafile    string
	Fd          *os.File
	Rd          *bufio.Reader
	Compression int // value from COMP_*
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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