Tuesday, 16 April 2013

Converting between subband and frequency

UPDATED : 28-Oct-2013

As KAIRA uses LOFAR hardware, it makes use of the LOFAR signal processing and nomenclature. When dealing with the signal from each polarisation of each antenna, the radio spectrum is split into 512 channels called "subbands".
Typically, the sampler clock runs at 200 MHz, this gives a Nyquist zone of 100 MHz bandwidth. This is what is split into the 512 channels.

So, to convert from subband number to frequency, you need to multiply by the sampler clock, and divide by 2 and the number of subbands. This gives the center of the subband. To get the top end of the subband, you need to use (subband + 0.5) and, for the lower frequency of the subband, you need to use (subband - 0.5). It is this middle frequency that is usually required. Thus:

     Freqmid = subband * 200.0 MHz  /  2  /  512

The following is a python programme that prints the lower, centre and upper frequencies of each subband.



#!/usr/bin/python
# Make a table of subband number and equivalent 
# low / centre / high frequency for the RCU mode 3.

num_subbands = 512   # Number of subbands (fixed at 512)
clock_freq = 200.0   # Sample clock freq. MHz (typically 200)

print "Units = MHz"
print "Clock frequency =",clock_freq
print "Subband  LowFreq    MidFreq   HighFreq"
for subband in xrange(0,num_subbands,1):
    freq_low = (subband-0.5) * clock_freq / 2.0 / num_subbands
    freq_mid = subband * clock_freq / 2.0 / num_subbands
    freq_high = (subband+0.5) * clock_freq / 2.0 / num_subbands
    print "  %3d   %8.4f   %8.4f   %8.4f" % \
          (subband, freq_low, freq_mid, freq_high)
print "Done"
# End of file


So, for example, for RCU-mode 3, the centre of subband 256 is exactly 50 MHz

For subbands 0 and 511, this doesn't quite hold due to the way the sampling is done. However, these two subbands are completely outside the  filter ranges, so they would never be used for operational observing anyway.

No comments:

Post a Comment