soapypower/writer.py
def write(self, psd_data_or_future, time_start, time_stop, samples):
        """Write PSD of one frequency hop"""
        try:
            # Wait for result of future
            f_array, pwr_array = psd_data_or_future.result()
        except AttributeError:
            f_array, pwr_array = psd_data_or_future

        try:
            step = f_array[1] - f_array[0]
            self.formatter.write(
                self.output,
                time_start.timestamp(),
                time_stop.timestamp(),
                f_array[0],
                f_array[-1] + step,
                step,
                samples,
                pwr_array
            )
        except Exception as e:
            logging.exception('Error writing to output file: {}'.format(e))
def write(self, psd_data_or_future, time_start, time_stop, samples):
        """Write PSD of one frequency hop"""
        try:
            # Wait for result of future
            f_array, pwr_array = psd_data_or_future.result()
        except AttributeError:
            f_array, pwr_array = psd_data_or_future

        try:
            step = f_array[1] - f_array[0]
            self.formatter.write(
                self.output,
                time_start.timestamp(),
                time_stop.timestamp(),
                f_array[0],
                f_array[-1] + step,
                step,
                samples,
                pwr_array
            )
        except Exception as e:
            logging.exception('Error writing to output file: {}'.format(e))
def write ( self , psd_data_or_future , time_start , time_stop , samples ) : try : # Wait for result of future f_array , pwr_array = psd_data_or_future . result ( ) except AttributeError : f_array , pwr_array = psd_data_or_future try : step = f_array [ 1 ] - f_array [ 0 ] self . formatter . write ( self . output , time_start . timestamp ( ) , time_stop . timestamp ( ) , f_array [ 0 ] , f_array [ - 1 ] + step , step , samples , pwr_array ) except Exception as e : logging . exception ( 'Error writing to output file: {}' . format ( e ) )
Write PSD of one frequency hop
Write PSD of one frequency hop