Note
Click here to download the full example code
Short transient search examples: Make dataΒΆ
An example to generate data with a short 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_short_transient_grid_search.py and PyFstat_example_short_transient_MCMC_search.py
14 import os
15
16 import pyfstat
17
18 outdir = os.path.join("PyFstat_example_data", "PyFstat_example_short_transient_search")
19 logger = pyfstat.set_up_logger(outdir=outdir, label="short_transient_search")
20
21
22 F0 = 30.0
23 F1 = -1e-10
24 F2 = 0
25 Alpha = 0.5
26 Delta = 1
27
28 tstart = 1000000000
29 duration = 2 * 86400
30
31 transient_tstart = tstart + 0.25 * duration
32 transient_duration = 0.5 * duration
33 transientWindowType = "rect"
34 tref = tstart
35
36 h0 = 1e-23
37 cosi = 0
38 psi = 0
39 phi = 0
40 sqrtSX = 1e-22
41 detectors = "H1,L1"
42
43 Tsft = 1800
44
45 if __name__ == "__main__":
46
47 transient = pyfstat.Writer(
48 label="simulated_transient_signal",
49 outdir=outdir,
50 tref=tref,
51 tstart=tstart,
52 duration=duration,
53 F0=F0,
54 F1=F1,
55 F2=F2,
56 Alpha=Alpha,
57 Delta=Delta,
58 h0=h0,
59 cosi=cosi,
60 detectors=detectors,
61 sqrtSX=sqrtSX,
62 transientStartTime=transient_tstart,
63 transientTau=transient_duration,
64 transientWindowType=transientWindowType,
65 Tsft=Tsft,
66 Band=0.1,
67 )
68 transient.make_data()
69 logger.info("Predicted 2F from injection Writer:", transient.predict_fstat())
Total running time of the script: ( 0 minutes 0.000 seconds)