nenupy.instru.instrument_tools.freq2sb

nenupy.instru.instrument_tools.freq2sb(frequency)[source]

Conversion between the frequency \(\nu\) and the NenuFAR sub-band index \(n_{\rm SB}\). Each NenuFAR sub-band has a bandwidth of \(\Delta \nu = 195.3125\, \rm{kHz}\):

\[n_{\rm SB} = \lfloor*{ \frac{\nu}{\Delta \nu} + \frac{1}{2} \rfloor\]
Parameters:

frequency (Quantity) – Frequency to convert in sub-band index.

Returns:

Sub-band index, same shape as frequency.

Return type:

int or ndarray

Example:
from nenupy.instru import freq2sb
import astropy.units as u

freq2sb(frequency=50.5*u.MHz)
freq2sb(frequency=[50.5, 51]*u.MHz)