pufdb

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package pufdb provides tools and types to store calibration data into a database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CalibDB

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

func Create added in v0.2.0

func Create(ctx context.Context, fname string) (*CalibDB, error)

Create creates a new calibration database at fname.

func Open added in v0.2.0

func Open(fname string) (*CalibDB, error)

Open opens the fname pufcalib calibration.

func OpenCalibration

func OpenCalibration() (_ *CalibDB, err error)

OpenCalibration opens the embeded pufcalib calibration.

func (*CalibDB) Add added in v0.2.0

func (db *CalibDB) Add(ctx context.Context, calib Calibration) error

func (*CalibDB) Calibration

func (db *CalibDB) Calibration(ctx context.Context, calib Calibration) iter.Seq2[Calibration, error]

func (*CalibDB) Close

func (db *CalibDB) Close() (err error)

func (*CalibDB) Do

func (db *CalibDB) Do(ctx context.Context, f func(tx *sql.Tx) error) (err error)

type Calibration

type Calibration struct {
	RadioNucleus string
	Filter       string
	DLevel       string
	PLevel       string
	ZLevel       string
	FuncKind     string
	FitArea      float64
	FitEta       float64
	FitMu        float64
	FitS         float64
	FitTau1      float64
	FitTau2      float64
	GoF          puffit.GoF // goodness of fit
	Chi2         float64    // reduced χ-square
}

func (Calibration) D added in v0.2.0

func (c Calibration) D() int

func (Calibration) P added in v0.2.0

func (c Calibration) P() int

func (Calibration) Z

func (c Calibration) Z() int

Jump to

Keyboard shortcuts

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