def test_null_accumulate(self): """Check that accumulating no spans leaves header intact""" self.shape_settings = [-1, 1, 2] with bfp.Pipeline() as pipeline: c_data = blocks.sigproc.read_sigproc([self.fil_file], self.gulp_nframe) g_data = blocks.copy(c_data, space='cuda') call_data = CallbackBlock( g_data, self.check_sequence_before, self.check_data_before) accumulated = blocks.accumulate(g_data, 1) call_data = CallbackBlock( accumulated, self.check_sequence_after, self.check_data_after) pipeline.run()
b_midres = views.reverse_scale(b_midres, 'fine_time') b_midres = views.merge_axes(b_midres, 'time', 'fine_time') b_midres = blocks.copy(b_midres, space='system', gulp_nframe=n_gulp_midres) #blocks.print_header(b_midres) # Do midres FFT + Detect on GPU with bf.block_scope(fuse=True, core=4): b_midres = blocks.copy(b_midres, space='cuda') b_midres = blocks.FftBlock(b_midres, axes='fft_window', axis_labels='freq') b_midres = blocks.fftshift(b_midres, axes='freq') b_midres = blocks.detect(b_midres, mode='stokes') b_midres = blocks.accumulate(b_midres, n_int_midres) b_midres = blocks.copy(b_midres, space='system') blocks.print_header(b_midres) b_midres = views.merge_axes(b_midres, 'channel', 'freq') b_midres = byip.hdf_writer(b_midres, shape=[n_t_midres, n_chan_midres, n_pol], file_ext='midres.h5', dtype='float32', core=4) ############## ## LOWRES ## ############## # Reshape array for lowres FFT