elif options.whichtdi == 'optimal':
    IIs = ['AE', 'AT', 'ET']

if csddir not in glob.glob(csddir):
    os.system('mkdir %s' % csddir)

for day in options.days:

    print "~~~~~~~ Day %d ~~~~~~~" % day
    orfids = [(options.tditype, options.tdigen, II[0], options.tditype,
               options.tdigen, II[1], options.f0, options.df, options.Nf, day)
              for II in IIs]
    orfpaths = [(
        orfdir +
        'tdiI_%s_%s_%s_tdiJ_%s_%s_%s_lmax_20_f0_%f_df_%f_Nf_%d/data_nlon_120_nlat_61/orf_d%03d.pkl'
        % orfid) for orfid in orfids]
    orfs = [AS.OrfMultipleMoments(orfpath) for orfpath in orfpaths]

    PIJs = [AS.Convolve(orf, skymap, options.GWslope) for orf in orfs]

    P12, P13, P23 = PIJs

    fdata = P12.Offset1 + P12.Cadence1 * np.arange(P12.data.shape[0])
    f = AS.Coarsable(fdata, Offset1=P12.Offset1, Cadence1=P12.Cadence1)

    csddict = {'f': f, 'AE': P12, 'AT': P13, 'ET': P23}

    file = open(csddir + 'd%03d.pkl' % day, 'wb')
    cpkl.dump(csddict, file, -1)
    file.close()
Beispiel #2
0
import numpy as np
import cPickle as cpkl
import synthlisa
import myLISAmodule as mlisar
import AnisotropySearch as AS

days = range(1, 365 + 1)
csddir = 'csd_ana'
Ppath = ''
norm_factor = ''  #If
orfdir = ''
GWSpectralSlope, H0 = 0, 1.0
IJs = ['AE', 'AT', 'ET']

file = open(Ppath, 'rb')
skymap = cpkl.load(file)
file.close()

for day in days:
    csddict = {}
    for IJ in IJs:
        orf = AS.OrfMultipleMoments(orfdir + '/' + IJ + '/d%03d.pkl' % day)
        csddict[IJ] = AS.Convolve(orf, skymap, GWSpectralslope, H0)
        csddict['f'] = orf.f

    if csddir not in glob.glob(csddir):
        os.system('mkdir %s' % csddir)
    file = open(csddir + '/d%03d.pkl' % day, 'wb')
    cpkl.dump(csddict, file, -1)
    file.close()