sacio

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	K = struct {
		K              uint8
		Kzdate, Kztime string
	}{
		'K', "Kzdate", "Kztime",
	}

	I = struct {
		I                    uint8
		Iftype, Idep, Iztype string
	}{
		'I', "Iftype", "Idep", "Iztype",
	}
)
View Source
var (
	FDefault float32 = -12345.0
	NDefault int32   = -12345
	IDefault int32   = -12345 // 逻辑型
	LDefault int32   = 0      // FALSE
	KDefault string  = "-12345  "
)

Functions

This section is empty.

Types

type Idep

type Idep int32
const (
	IUNKN Idep = iota + 1
	IDISP
	IVEL
	IACC
	NOTE
	IVOLTS
)

func (Idep) String

func (i Idep) String() string

type Iftype

type Iftype int32
const (
	ITIME Iftype = iota + 1
	IRLIM
	IAMPH
	IXY
	IXYZ
)

func (Iftype) String

func (i Iftype) String() string

type Iztype

type Iztype int32
const (
	IUNKN_z Iztype = iota + 1
	IB
	IDAY
	IO
	IA
	ITn
)

func (Iztype) String

func (i Iztype) String() string

type Sac

type Sac struct {
	// contains filtered or unexported fields
}

func (*Sac) NewSac

func (sac *Sac) NewSac(head *SacHead, data *SacData)

func (*Sac) Read

func (sac *Sac) Read(fileName string) error

func (*Sac) Sac2asc

func (sac *Sac) Sac2asc(filename string) error

type SacData

type SacData struct {
	Data []float64
	Abs  []float64
}

func (*SacData) Fft

func (d *SacData) Fft()

func (*SacData) Read

func (d *SacData) Read(fileName string) error

type SacHead

type SacHead struct {
	Delta, Depmin, Depmax, Scale, Odelta             float32 `struc:"little"` //0
	B, E, O, A, Internal1                            float32 `struc:"little"` //20
	T0, T1, T2, T3, T4                               float32 `struc:"little"` //40
	T5, T6, T7, T8, T9                               float32 `struc:"little"` //60
	F, Resp0, Resp1, Resp2, Resp3                    float32 `struc:"little"` //80
	Resp4, Resp5, Resp6, Resp7, Resp8                float32 `struc:"little"` //100
	Resp9, Stla, Stlo, Stel, Stdp                    float32 `struc:"little"` //120
	Evla, Evlo, Evel, Evdp, Mag                      float32 `struc:"little"` //140
	User0, User1, User2, User3, User4                float32 `struc:"little"` //160
	User5, User6, User7, User8, User9                float32 `struc:"little"` //180
	Dist, Az, Baz, Gcarc, Internal2                  float32 `struc:"little"` //200
	Internal3, Depmen, Cmpaz, Cmpinc, Xminimum       float32 `struc:"little"` //220
	Xmaximum, Yminimum, Ymaximum, Unused1, Unused2   float32 `struc:"little"` //240
	Unused3, Unused4, Unused5, Unused6, Unused7      float32 `struc:"little"` //260
	Nzyear, Nzjday, Nzhour, Nzmin, Nzsec             int32   `struc:"little"` //280
	Nzmsec, Nvhdr, Norid, Nevid, Npts                int32   `struc:"little"` //300
	Internal, Nwfid, Nxsize, Nysize, Unused8         int32   `struc:"little"` //320
	Iftype, Idep, Iztype, Unused9, Iinst             int32   `struc:"little"` //340
	Istreg, Ievreg, Ievtyp, Iqual, Isynth            int32   `struc:"little"` //360
	Imagtyp, Imagsrc, Unused10, Unused11, Unused12   int32   `struc:"little"` //380
	Unused13, Unused14, Unused15, Unused16, Unused17 int32   `struc:"little"` //400
	Leven, Lpspol, Lovrok, Lcalda, Unused18          int32   `struc:"little"` //420
	Kstnm                                            string  `struc:"little,[8]byte"`
	Kevnm                                            string  `struc:"little,[16]byte"`
	Khole, Ko, Ka                                    string  `struc:"little,[8]byte"`
	Kt0, Kt1, Kt2                                    string  `struc:"little,[8]byte"`
	Kt3, Kt4, Kt5                                    string  `struc:"little,[8]byte"`
	Kt6, Kt7, Kt8                                    string  `struc:"little,[8]byte"`
	Kt9, Kf, KUser0                                  string  `struc:"little,[8]byte"`
	Kuser1, Kuser2, Kcmpnm                           string  `struc:"little,[8]byte"`
	KnetwK, Kdatrd, Kinst                            string  `struc:"little,[8]byte"`
}

func (*SacHead) Format

func (h *SacHead) Format() string

func (*SacHead) Read

func (h *SacHead) Read(fileName string) error

Jump to

Keyboard shortcuts

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