vibe-sketcherDocumentation

vibesketcher.document.measured_gsas

GSAS standard powder data files, constant-wavelength banks, read fail-closed (#279).

Written from the GSAS manual, “GSAS Standard Powder Data File” (A. C. Larson and R. B. Von Dreele, General Structure Analysis System, Los Alamos National Laboratory Report LAUR 86-748, technical manual pp. 217-220). No third-party reader is used. The evaluation and the maintainer’s approval are in docs/powder_formats.md and #273.

Only BINTYP CONS banks are read, as 2theta in centidegrees when the caller states two_theta_deg. Layouts STD, ESD, FXY and FXYE are accepted; TIME_MAP, other binnings, ALT, bank 0, and mismatched counts are refused with a coded GsasRefused. The wavelength is taken only as the caller states it (it lives in the instrument parameter file, not the data file).

Module Attributes

BINNING

constant steps.

KNOWN_BINNINGS

Every binning type the manual defines, for a precise refusal.

Functions

read_gsas(data, name[, bank])

The 2theta points, intensities, esds and header of one constant-step GSAS bank.

Exceptions

GsasRefused(message[, code])

The GSAS file cannot be read faithfully; code says why.

vibesketcher.document.measured_gsas.BINNING = 'CONS'

constant steps.

Type:

The one binning type read

vibesketcher.document.measured_gsas.KNOWN_BINNINGS = ('CONS', 'COND', 'CONQ', 'EDS', 'LOG6', 'LPSD', 'RALF', 'SLOG', 'TIME_MAP')

Every binning type the manual defines, for a precise refusal.

exception vibesketcher.document.measured_gsas.GsasRefused(message, code='diffraction.gsas_refused')[source]

Bases: ValueError

The GSAS file cannot be read faithfully; code says why.

Parameters:
Return type:

None

vibesketcher.document.measured_gsas.read_gsas(data, name, bank=None)[source]

The 2theta points, intensities, esds and header of one constant-step GSAS bank.

Returns {"x", "intensity", "esd", "header", "metadata"}; refuses with a coded GsasRefused.

Parameters:
Return type:

dict[str, Any]