Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
public:documents:raw_olap_data_formats [2012-03-20 09:45] – Jan David Mol | public:documents:raw_olap_data_formats [2017-03-08 15:27] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Raw OLAP data formats ==== | + | ===== Raw OLAP data formats |
OLAP produces several data formats, which are intended to be replaced by their final format, such as HDF5. | OLAP produces several data formats, which are intended to be replaced by their final format, such as HDF5. | ||
Line 33: | Line 33: | ||
</ | </ | ||
- | The constants used can be derived from the parset | + | The constants used can be derived from the parset: |
- | |SUBBANDS|The number of subbands (beamlets) specified | + | < |
- | |CHANNELS|The number of channels per subband | + | |
+ | |||
+ | if (complex voltages | ||
+ | |||
+ | CHANNELS = parset[" | ||
+ | if (CHANNELS == 0) CHANNELS = parset[" | ||
+ | |||
+ | } elif (incoherent stokes) { | ||
+ | |||
+ | CHANNELS = parset[" | ||
+ | if (CHANNELS == 0) CHANNELS = parset[" | ||
+ | |||
+ | } | ||
+ | </ | ||
The sampling rate can be derived as follows: | The sampling rate can be derived as follows: | ||
+ | |||
< | < | ||
# clock frequency (f.e. 200 MHz) | # clock frequency (f.e. 200 MHz) | ||
Line 50: | Line 64: | ||
base_channel_hz = base_subband_hz / base_nrchannels | base_channel_hz = base_subband_hz / base_nrchannels | ||
- | if(complex voltages) { | + | if(complex voltages |
- | + | ||
- | sample_hz = base_channel_hz | + | |
- | + | ||
- | } elif(coherent stokes) { | + | |
- | + | ||
- | cs_nrchannels = parset[" | + | |
- | if (cs_nrchannels == 0) cs_nrchannels = base_nrchannels | + | |
- | + | ||
- | cs_spectralintegration = base_nrchannels / cs_nrchannels | + | |
cs_temporalintegration = parset[" | cs_temporalintegration = parset[" | ||
- | sample_hz = base_channel_hz / cs_temporalintegration | + | sample_hz = base_channel_hz / cs_temporalintegration |
} elif(incoherent stokes) { | } elif(incoherent stokes) { | ||
- | is_nrchannels = parset[" | ||
- | if (is_nrchannels == 0) is_nrchannels = base_nrchannels | ||
- | |||
- | is_spectralintegration = base_nrchannels / is_nrchannels | ||
is_temporalintegration = parset[" | is_temporalintegration = parset[" | ||
- | sample_hz = base_channel_hz / is_temporalintegration | + | sample_hz = base_channel_hz / is_temporalintegration |
} | } | ||
| | ||
</ | </ | ||
- | ===== Before 2011-20-24 ===== | + | ===== Before 2011-10-24 ===== |
Data can be recorded as either complex voltages (yielding X and Y polarisations) or one or more stokes. In either case, a sequence of blocks will be stored, each of which consists of a header and data. The header is defined as: | Data can be recorded as either complex voltages (yielding X and Y polarisations) or one or more stokes. In either case, a sequence of blocks will be stored, each of which consists of a header and data. The header is defined as: | ||
Line 213: | Line 213: | ||
A BFRaw file starts with a file header containing the configuration: | A BFRaw file starts with a file header containing the configuration: | ||
- | < | + | < |
struct file_header | struct file_header | ||
{ | { | ||
Line 243: | Line 243: | ||
After the file header, there is a series of blocks until the end of file, configured using values from the file header: | After the file header, there is a series of blocks until the end of file, configured using values from the file header: | ||
- | < | + | < |
struct block | struct block | ||
// 0x2913D852 | // 0x2913D852 | ||
Line 280: | Line 280: | ||
To convert a TimeStamp-compatible int64_t to a C-readable timestamp, use | To convert a TimeStamp-compatible int64_t to a C-readable timestamp, use | ||
- | < | + | < |
/* clockspeed is in Hz */ | /* clockspeed is in Hz */ | ||
int64 nanoseconds = (int64) (timestamp * 1024 * 1e9 / clockspeed); | int64 nanoseconds = (int64) (timestamp * 1024 * 1e9 / clockspeed); |