TimeDomain Data has No record header.
11jun08
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
sampled data.T
Data and processing.
Data was taken on 11jun08 in timedomain mode. The
setup was:
- 172.032 MHz clock
- Decimate by 172 giving bandwidth of 1MHz.
- 16 bit sampling polA and polB in lower band. This gave 8
bytes/sample (2(16bits)*2(IQ)*2(polAB).
- 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).
Idl was used to read in and plot the data.
- 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.
The plots show the sine wave as it crossed
the record boundaries (.ps) (.pdf):
- 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.
Conclusions:
- 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
updated.
- 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
sent out.
- 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..
processing:
x101/080611/chktmd.pro
<-
page
up
home_~phil