TimeDomain Data has No record header.
Normal spectral data has an 8 byte record header
with each dump of the spectrometer. Time domain data does not contain
these 8 bytes. All of the bytes output with timedomain sampling are
Data and processing.
Data was taken on 11jun08 in timedomain mode. The
Idl was used to read in and plot the data.
- 172.032 MHz clock
- Decimate by 172 giving bandwidth of 1MHz.
- 16 bit sampling polA and polB in lower band. This gave 8
- inject sine wave at .1 MHz from Center of band. This should give
about 10 samples per period of the sine wave.
- Data block was 0x100008 bytes long (2^20 bytes of data + 8 bytes
of supposed rechdr).
- In 1 data block there would be 2^20/8 = 131072 samples (if we
ignore the 8 byte rec header).
The plots show the sine wave as it crossed
the record boundaries (.ps) (.pdf):
- The idl routines assumed the 8 byte recheader.
- 4 records were written with 131072 samples each. The 8 bytes at
the end of each block were skipped.
- Each plot shows the last 20 samples of RecN and the first 20
samples of RecN+1
- Each page has 4 plots for record 1,2,3,4
- Page 1-4 shows polA real, polAImg, polA real,polB img.
- the * are the data samples
- The dashed red line is the boundary between record N and record
N+1. It is placed 1/2 way between the two samples.
- Each boundary shows a missing data sample.
- Idl skipped the last 8 bytes of each block thinking it was the
record header. This is the missing data sample.
- psrv.c, part of the online data taking program was byteswapping
the last 8 bytes of each block (depending on the recorded datatype (8,
4 bits no swapping, 16 bits was swapped). So the the 8 bytes can not
just be read in and used...
- 15jun08.. The data taking program psrv.c was updated to not mess
with the last 8 bytes of a blk when i timedomain.. idl will also be
- Looking at the fpga code
- TimeDomain: pdev/gx/sp/src/sp.v
- line 592.. it always loads data into pack_lpf_dat
- line 886.. pack_dat always gets pack_lpf_dat .. which is then
- Spectral data.:pdev/gx/sp/src/sp.v
- line 838: calls pack in pack.v to pack the data into pack_data
- pack.v line 647. pack_data gets pack_status or the packed
data depending on acc_frame.
- So spectral data get the spectra + the 8 byte status
- Time domain data only gets the data..