blimpy/filterbank.py
def write_to_filterbank(self, filename_out):
        """ Write data to blimpy file.

        Args:
            filename_out (str): Name of output file
        """

        print("[Filterbank] Warning: Non-standard function to write in filterbank (.fil) format. Please use Waterfall.")

        n_bytes  = int(self.header[b'nbits'] / 8)
        with open(filename_out, "wb") as fileh:
            fileh.write(generate_sigproc_header(self))
            j = self.data
            if n_bytes == 4:
                np.float32(j.ravel()).tofile(fileh)
            elif n_bytes == 2:
                np.int16(j.ravel()).tofile(fileh)
            elif n_bytes == 1:
                np.int8(j.ravel()).tofile(fileh)
def write_to_filterbank(self, filename_out):
        print("[Filterbank] Warning: Non-standard function to write in filterbank (.fil) format. Please use Waterfall.")

        n_bytes  = int(self.header[b'nbits'] / 8)
        with open(filename_out, "wb") as fileh:
            fileh.write(generate_sigproc_header(self))
            j = self.data
            if n_bytes == 4:
                np.float32(j.ravel()).tofile(fileh)
            elif n_bytes == 2:
                np.int16(j.ravel()).tofile(fileh)
            elif n_bytes == 1:
                np.int8(j.ravel()).tofile(fileh)
def write_to_filterbank ( self , filename_out ) : print ( "[Filterbank] Warning: Non-standard function to write in filterbank (.fil) format. Please use Waterfall." ) n_bytes = int ( self . header [ b'nbits' ] / 8 ) with open ( filename_out , "wb" ) as fileh : fileh . write ( generate_sigproc_header ( self ) ) j = self . data if n_bytes == 4 : np . float32 ( j . ravel ( ) ) . tofile ( fileh ) elif n_bytes == 2 : np . int16 ( j . ravel ( ) ) . tofile ( fileh ) elif n_bytes == 1 : np . int8 ( j . ravel ( ) ) . tofile ( fileh )
Write data to blimpy file.

        Args:
            filename_out (str): Name of output file
Write data to blimpy file .