piquant

package
v4.64.2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Storage/versioning and retrieval of PIQUANT configuration files and the currently selected PIQUANT pod version to be run

Example (Piquant_ReadFieldFromPIQUANTConfigMSA)
piquantMSA := `##INCSR      : 0.0152   Solid angle from source in steradians (can include normalization for optic file - use this for tuning 0.00355)
##INCANGLE   : 90.00   Incident angle of primary X-ray beam in degrees (90 is normal incidence)
#ELEVANGLE   : 48.03   Elevation angle of detector, in degrees (90 is normal to surface)
#AZIMANGLE   : 180.0   Azimuth angle between incident beam plane and detected beam plane
##GEOMETRY   : 1.0     Geometric correction factor
#SOLIDANGLE  : 0.224 Solid angle collected by the detector in steradians`

a, err := ReadFieldFromPIQUANTConfigMSA(piquantMSA, "ELEVANGLE")
fmt.Printf("%v|%v\n", a, err)

a, err = ReadFieldFromPIQUANTConfigMSA(piquantMSA, "ELEEEVANGLE")
fmt.Printf("%v|%v", a, err)
Output:
48.03|<nil>
0|Failed to find field ELEEEVANGLE

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDetectorConfig

func GetDetectorConfig(name string, db *mongo.Database) (*protos.DetectorConfig, error)

func GetPIQUANTConfig

func GetPIQUANTConfig(svcs *services.APIServices, configName string, version string) (*protos.PiquantConfig, error)

func GetPiquantConfigVersions

func GetPiquantConfigVersions(svcs *services.APIServices, configName string) []string

GetPiquantConfigVersions - retrieves all available versions of a given named PIQUANT config eg. Returns all versions for config called PIXL or Breadboard...

func GetPiquantVersion

func GetPiquantVersion(svcs *services.APIServices) (*protos.PiquantVersion, error)

func ReadFieldFromPIQUANTConfigMSA added in v4.36.1

func ReadFieldFromPIQUANTConfigMSA(msaContents string, fieldName string) (float32, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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