Page tree

FLASH1 PhotDiag stream

FLASH2 PhotDiag stream

Data Formats

The DOOCS and DAQ data formats are documented in the DOOCS Programmers manual. This paragraph extends the documentation with some details and compares data types as used by DOOCS and the DAQ.

GSPECTRUM

GSPECTRUM is a grouped spectrum type. Grouped means, the spectrums time axis can be discontinuous, i.e. allow to drop uninteresting sections of a otherwise very long spectrum. The following table lists end user relevant parameters of the GSPECTRUM types.

DOOCS Property*)DOOCS fielddaq_read (Matlab)pydoocs, pydaqIMAGE fieldComment

SAMPLE_FREQ : float

DAQ_SAMPLE_INCR : float

s_inc : floatincdata[1,0]-data[0,0] : np.float32fspare3

s_inc/µs = inc/µs = fspare3/µs =

SAMPLE_FREQ-1 * DAQ_SAMPLE_INCR/MHz

DAQ_SAMPLE_START : floats_start : floatstartdata[0,0] : np.float32fspare2

s_start, start, fspare2: t0 of first sample/µs,

DAQ_SAMPLE_START is the integer number of the first raw sample, counting from zero

DAQ_GROUPS_NUM : intgroups : intgroups--ispare2number of groups
DAQ_GROUPS_INC : floatgroup_inc : floatgroup_inc--fspare4

group_inc/µs = DAQ_GROUPS_INC * inc

DAQ_GROUPS_INC is the number of samples skipped between sample groups

DAQ_GROUP_LENGTH : floatgroup_size : intndata--ispare3number of samples per group
------data.shape[1]aoi_width

total number of samples in spectrum

aoi_width = groups * ndata

DAQ_SAMPLE_START--------index of first sample to be stored in the DAQ, the value is reflected by s_start

*) Note: For the given interpretation of the DOOCS properties to hold, the property "DAQ_PARAM_MODE" must be 0.

So, a GSPECTRUM is composed of a number of sections of a complete SPECTRUM. The sections are aequidistant (group_inc/inc, the number of skipped samples between groups) and of equal length each (group_size or ndata).

While pydoocs and pydaq for real GSPECTRUM types compute a spectrum's time axis, the spectra stored as one-line images or retrieved via the Matlab Mex functions require to reconstruct the time axis from the fields specified above.

Note, the value of property CH00.SAMPLES must be greater than DAQ_SAMPLE_START + groups*(group_size*DAQ_SAMPLE_INCR + group_inc/inc)

Given

t0,0time of first sample of the first group (=start)
dttime between samples (=inc)
t0,1time of first sample of the second group
ti,jtime of sample i of the group j (counting from zero)
nnumber of samples per group (=ndata)
mnumber of samples (at distance dt) skipped between groups (=group_inc/inc)
Nnumber of groups (=groups)

the times are computed as

t0,1 = t0,0 + (n + m)*dt

ti,j = t0,0 + i*dt + j*(n + m)*dt

with i = 0..n-1 and j = 0..N-1. Thus the last sample's time is tn-1,N-1 = t0,0 + (n - 1)*dt + (N - 1)*(n + m)*dt .

  • No labels