Note
Click here to download the full example code
Long transient search examples: Make dataΒΆ
An example to generate data with a long transient signal.
This can be run either stand-alone (will just generate SFT files and nothing else); or it is also being imported from PyFstat_example_long_transient_MCMC_search.py
12 import pyfstat
13 import os
14
15 outdir = os.path.join("PyFstat_example_data", "PyFstat_example_long_transient_search")
16
17 F0 = 30.0
18 F1 = -1e-10
19 F2 = 0
20 Alpha = 0.5
21 Delta = 1
22
23 tstart = 1000000000
24 duration = 200 * 86400
25
26 transient_tstart = tstart + 0.25 * duration
27 transient_duration = 0.5 * duration
28 transientWindowType = "rect"
29 tref = tstart
30
31 h0 = 1e-23
32 cosi = 0
33 psi = 0
34 phi = 0
35 sqrtSX = 1e-22
36 detectors = "H1,L1"
37
38 if __name__ == "__main__":
39
40 transient = pyfstat.Writer(
41 label="simulated_transient_signal",
42 outdir=outdir,
43 tref=tref,
44 tstart=tstart,
45 duration=duration,
46 F0=F0,
47 F1=F1,
48 F2=F2,
49 Alpha=Alpha,
50 Delta=Delta,
51 h0=h0,
52 cosi=cosi,
53 detectors=detectors,
54 sqrtSX=sqrtSX,
55 transientStartTime=transient_tstart,
56 transientTau=transient_duration,
57 transientWindowType=transientWindowType,
58 )
59 transient.make_data()
60 print("Predicted 2F from injection Writer:", transient.predict_fstat())
Total running time of the script: ( 0 minutes 0.000 seconds)