def waveforms(self, samples, deltat, inittime): noise = self.synthesize(samples, deltat, inittime) [hp, hc] = numpy.transpose( synthlisa.getobs(samples, deltat, [noise.hp, noise.hc], inittime)) return (hp, hc)
sys.exit(1) elif len(sourceobjects) == 1: tdi = synthlisa.TDIsignal(lisa, sourceobjects[0]) else: # print "(proceeding with %s sources)" % len(sourceobjects) tdi = synthlisa.TDIsignal(lisa, synthlisa.WaveArray(sourceobjects)) if options.rawMeasurements: [ t, X, Y, Z, y123, y231, y312, y321, y132, y213, z123, z231, z312, z321, z132, z213 ] = numpy.transpose( synthlisa.getobs(samples, options.timestep, [ tdi.t, tdi.Xm, tdi.Ym, tdi.Zm, tdi.y123, tdi.y231, tdi.y312, tdi.y321, tdi.y132, tdi.y213, tdi.z123, tdi.z231, tdi.z312, tdi.z321, tdi.z132, tdi.z213 ], options.inittime, display=options.verbose)) obsstr = 't,Xf,Yf,Zf' else: # note that choices of options.observables other than 1.5 are not compatible with debugSNR and/or RequestSN if options.observables == '1.5': obsset = [tdi.t, tdi.Xm, tdi.Ym, tdi.Zm] obsstr = 't,Xf,Yf,Zf' elif options.observables == '2.0': obsset = [tdi.t, tdi.X1, tdi.X2, tdi.X3] obsstr = 't,X1f,X2f,X3f' elif options.observables == 'Sagnac': obsset = [tdi.alpham, tdi.betam, tdi.gammam, tdi.zetam]
if len(sourceobjects) == 0: print "!!! Could not find any suitable sources..." sys.exit(1) elif len(sourceobjects) == 1: tdi = synthlisa.TDIsignal(lisa,sourceobjects[0]) else: # print "(proceeding with %s sources)" % len(sourceobjects) tdi = synthlisa.TDIsignal(lisa,synthlisa.WaveArray(sourceobjects)) if options.rawMeasurements: [t,X,Y,Z, y123,y231,y312,y321,y132,y213, z123,z231,z312,z321,z132,z213] = numpy.transpose(synthlisa.getobs(samples,options.timestep, [tdi.t,tdi.Xm,tdi.Ym,tdi.Zm, tdi.y123,tdi.y231,tdi.y312,tdi.y321,tdi.y132,tdi.y213, tdi.z123,tdi.z231,tdi.z312,tdi.z321,tdi.z132,tdi.z213], options.inittime,display=options.verbose)) obsstr = 't,Xf,Yf,Zf' else: # note that choices of options.observables other than 1.5 are not compatible with debugSNR and/or RequestSN if options.observables == '1.5': obsset = [tdi.t,tdi.Xm,tdi.Ym,tdi.Zm] obsstr = 't,Xf,Yf,Zf' elif options.observables == '2.0': obsset = [tdi.t,tdi.X1,tdi.X2,tdi.X3] obsstr = 't,X1f,X2f,X3f' elif options.observables == 'Sagnac': obsset = [tdi.alpham,tdi.betam,tdi.gammam,tdi.zetam] obsstr = 'alphaf,betaf,gammaf,zetaf'
2, # norm = 1.0, no filtering, Lagrange-2 interpolation waveforms.EclipticLatitude, waveforms.EclipticLongitude, 0) # polarization already encoded in hp,hc # this hardcodes the standard LISA object for the MLDC... # lisa = synthlisa.CacheLISA(synthlisa.CircularRotating(0.0,1.5*pi,-1)) lisa = synthlisa.CacheLISA(synthlisa.EccentricInclined(0.0, 1.5 * pi, -1)) tdi = synthlisa.TDIsignal(lisa, source) samples = int(options.duration / options.timestep + 0.1) [t, X, Y, Z] = numpy.transpose( synthlisa.getobs(samples, options.timestep, [tdi.t, tdi.Xm, tdi.Ym, tdi.Zm], options.inittime, display=options.verbose)) # Computing SNR.... # this is |\tilde{h}|^2 * dt/N sampling = ts.Cadence hX = synthlisa.spect(X, sampling, 0) hY = synthlisa.spect(Y, sampling, 0) hZ = synthlisa.spect(Z, sampling, 0) # get frequencies, skip DC fr = hX[1:, 0] om = 2.0 * pi * fr
source = synthlisa.SampledWave(hp,hc, ts.Length,ts.Cadence,-ts.TimeOffset, # synthlisa prebuffer is -TimeOffset 1.0,synthlisa.NoFilter(),2, # norm = 1.0, no filtering, Lagrange-2 interpolation waveforms.EclipticLatitude, waveforms.EclipticLongitude,0) # polarization already encoded in hp,hc # this hardcodes the standard LISA object for the MLDC... # lisa = synthlisa.CacheLISA(synthlisa.CircularRotating(0.0,1.5*pi,-1)) lisa = synthlisa.CacheLISA(synthlisa.EccentricInclined(0.0,1.5*pi,-1)) tdi = synthlisa.TDIsignal(lisa,source) samples = int( options.duration / options.timestep + 0.1 ) [t,X,Y,Z] = numpy.transpose(synthlisa.getobs(samples,options.timestep, [tdi.t,tdi.Xm,tdi.Ym,tdi.Zm], options.inittime,display=options.verbose)) # Computing SNR.... # this is |\tilde{h}|^2 * dt/N sampling = ts.Cadence hX = synthlisa.spect(X,sampling,0) hY = synthlisa.spect(Y,sampling,0) hZ = synthlisa.spect(Z,sampling,0) # get frequencies, skip DC fr = hX[1:,0] om = 2.0 * pi * fr
elif options.observables == 'Sagnac': obsset = [tdi.alpham,tdi.betam,tdi.gammam,tdi.zetam] obsstr = 'alphaf,betaf,gammaf,zetaf' else: parser.error("I don't recognize the set of TDI observables!") # add phase measurements if requested if options.raw: obsset += [tdi.t,tdi.y123,tdi.y231,tdi.y312,tdi.y321,tdi.y132,tdi.y213, tdi.z123,tdi.z231,tdi.z312,tdi.z321,tdi.z132,tdi.z213] rawstr = 't,y123f,y231f,y312f,y321f,y132f,y213f,z123f,z231f,z312f,z321f,z132f,z213f' # run synthlisa samples = int( options.duration / options.timestep + 0.1 ) obsarray = synthlisa.getobs(samples,options.timestep,obsset,options.inittime,display=options.verbose) # save to XML if options.raw: tdiobs = lisaxml.Observable(obsstr,datatype='FractionalFrequency') tdiobs.TimeSeries = lisaxml.TimeSeries(obsarray[:,0:4],obsstr,Cadence=options.timestep,TimeOffset=options.inittime) outputXML.TDIData(tdiobs) tdiraw = lisaxml.Observable(obsstr,datatype='FractionalFrequency') tdiraw.TimeSeries = lisaxml.TimeSeries(obsarray[:,4: ],rawstr,Cadence=options.timestep,TimeOffset=options.inittime) outputXML.TDIData(tdiraw) else: tdiobs = lisaxml.Observable(obsstr,datatype='FractionalFrequency') tdiobs.TimeSeries = lisaxml.TimeSeries(obsarray,obsstr,Cadence=options.timestep,TimeOffset=options.inittime) outputXML.TDIData(tdiobs)
lisa = synthlisa.EccentricInclined(0.0,1.5*math.pi,-1) proofnoise = [synthlisa.SumSignal(synthlisa.stdproofnoise(lisa,100,2.5e-48,2), synthlisa.stdproofnoisepink(lisa,1000,2.5e-48,1.0e-4,2)) for i in range(6)] shotnoise = [synthlisa.stdopticalnoise(lisa,15,1.8e-37,4) for i in range(6)] lasernoise = [synthlisa.NoSignal() for i in range(6)] tdi = synthlisa.TDInoise(lisa,proofnoise,shotnoise,lasernoise) samples = int( options.duration / options.timestep + 0.1 ) [t,X,Y,Z] = numpy.transpose(synthlisa.getobs(samples,options.timestep, [tdi.t,tdi.Xm,tdi.Ym,tdi.Zm], options.inittime,display=options.verbose)) tdiobs = lisaxml.Observable('t,Xf,Yf,Zf') tdiobs.DataType = 'FractionalFrequency' tdiobs.TimeSeries = lisaxml.TimeSeries([t,X,Y,Z],'t,Xf,Yf,Zf') tdiobs.TimeSeries.Cadence = options.timestep tdiobs.TimeSeries.TimeOffset = options.inittime outputXML = lisaxml.lisaXML(outputfile) # save the standard LISA... lisa = lisaxml.LISA('Standard MLDC PseudoLISA') lisa.TimeOffset = 0; lisa.TimeOffset_Unit = 'Second'
def waveforms(self,samples,deltat,inittime): noise = self.synthesize(samples,deltat,inittime) [hp,hc] = numpy.transpose(synthlisa.getobs(samples,deltat,[noise.hp,noise.hc],inittime)) return (hp,hc)