def create_test_files(idi=True, uvfits=True): """ Run corr2uvfits and LedaFits on the same data This produces a test.fitsidi, and a test.uvfits file """ dada_filename = '/workdata/leda/data-ovro/ledaovro5_12/2014-02-26-21:44:32_0000000000000000.000000.dada' t1 = time.time() if idi: # Create fitsidi test file l = LedaFits(dada_filename) l.exportFitsidi('data/test_ovro.fitsidi') t2 = time.time() if uvfits: # Create UVFITS file callSubprocess(['../lconverter/dada2uvfits.py', dada_filename, '-l']) # Remove intermediate files callSubprocess(['mv', 'Zenith_b1_d20140226_utc214432/Zenith_b1_d20140226_utc214432.uvfits', 'data/test_ovro.uvfits']) callSubprocess(['rm', '-rf', 'Zenith_b1_d20140226_utc214432']) t3 = time.time() print "INTERFITS: %2.3fs"%(t2-t1) print "CORR2UVFS: %2.3fs"%(t3-t2)
def create_test_files(idi=True, uvfits=True): """ Run corr2uvfits and LedaFits on the same data This produces a test.fitsidi, and a test.uvfits file """ dada_filename = '2014-02-22-23h00m11_0000455393280000.000000.dada' t1 = time.time() if idi: # Create fitsidi test file l = LedaFits(dada_filename) l.exportFitsidi('data/test.fitsidi') t2 = time.time() if uvfits: # Create UVFITS file callSubprocess(['./dada2uvfits.py', dada_filename, '-l']) # Remove intermediate files callSubprocess(['mv', 'Zenith_b1_d20140223_utc110651/Zenith_b1_d20140223_utc110651.uvfits', 'data/test.uvfits']) callSubprocess(['rm', '-rf', 'Zenith_b1_d20140223_utc110651']) t3 = time.time() print "INTERFITS: %2.3fs"%(t2-t1) print "CORR2UVFS: %2.3fs"%(t3-t2)