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 ¶
- func GetDetectorConfig(name string, db *mongo.Database) (*protos.DetectorConfig, error)
- func GetPIQUANTConfig(svcs *services.APIServices, configName string, version string) (*protos.PiquantConfig, error)
- func GetPiquantConfigVersions(svcs *services.APIServices, configName string) []string
- func GetPiquantVersion(svcs *services.APIServices) (*protos.PiquantVersion, error)
- func ReadFieldFromPIQUANTConfigMSA(msaContents string, fieldName string) (float32, error)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDetectorConfig ¶
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)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.