UCBerkeleySETI/turbo_seti

Class DATAH5 _make_data_header(coarse=True) uses undefined variables

Closed this issue · 0 comments

** Describe the bug
When coarse=True is present, variables self.f_start and self.f_stop are referenced in calculating base_header['FCNTR']. But those variables have not been initialized to any value.

** Fix

        if coarse:
            base_header['NAXIS1'] = int(header['nchans']/self.n_coarse_chan)
        else:
            base_header['NAXIS1'] = int(header['nchans'])
        base_header['FCNTR'] = float(header['fch1']) + header['foff'] * base_header['NAXIS1'] / 2