blimpy/filterbank.py
def generate_freqs(self, f_start, f_stop):
        """
        returns frequency array [f_start...f_stop]
        """

        fch1 = self.header[b'fch1']
        foff = self.header[b'foff']

        #convert input frequencies into what their corresponding index would be
        i_start = int((f_start - fch1) / foff)
        i_stop  = int((f_stop - fch1)  / foff)

        #calculate closest true index value
        chan_start_idx = np.int(i_start)
        chan_stop_idx  = np.int(i_stop)

        #create freq array
        i_vals = np.arange(chan_stop_idx, chan_start_idx, 1)

        freqs = foff * i_vals + fch1

        return freqs
def generate_freqs(self, f_start, f_stop):
        """
        returns frequency array [f_start...f_stop]
        """

        fch1 = self.header[b'fch1']
        foff = self.header[b'foff']

        #convert input frequencies into what their corresponding index would be
        i_start = int((f_start - fch1) / foff)
        i_stop  = int((f_stop - fch1)  / foff)

        #calculate closest true index value
        chan_start_idx = np.int(i_start)
        chan_stop_idx  = np.int(i_stop)

        #create freq array
        i_vals = np.arange(chan_stop_idx, chan_start_idx, 1)

        freqs = foff * i_vals + fch1

        return freqs
def generate_freqs ( self , f_start , f_stop ) : fch1 = self . header [ b'fch1' ] foff = self . header [ b'foff' ] #convert input frequencies into what their corresponding index would be i_start = int ( ( f_start - fch1 ) / foff ) i_stop = int ( ( f_stop - fch1 ) / foff ) #calculate closest true index value chan_start_idx = np . int ( i_start ) chan_stop_idx = np . int ( i_stop ) #create freq array i_vals = np . arange ( chan_stop_idx , chan_start_idx , 1 ) freqs = foff * i_vals + fch1 return freqs
returns frequency array [f_start...f_stop]
returns frequency array [ f_start ... f_stop ]