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 os
13
14 import pyfstat
15
16 outdir = os.path.join("PyFstat_example_data", "PyFstat_example_long_transient_search")
17 logger = pyfstat.set_up_logger(outdir=outdir, label="short_transient_search")
18
19 F0 = 30.0
20 F1 = -1e-10
21 F2 = 0
22 Alpha = 0.5
23 Delta = 1
24
25 tstart = 1000000000
26 duration = 200 * 86400
27
28 transient_tstart = tstart + 0.25 * duration
29 transient_duration = 0.5 * duration
30 transientWindowType = "rect"
31 tref = tstart
32
33 h0 = 1e-23
34 cosi = 0
35 psi = 0
36 phi = 0
37 sqrtSX = 1e-22
38 detectors = "H1,L1"
39
40 if __name__ == "__main__":
41
42 transient = pyfstat.Writer(
43 label="simulated_transient_signal",
44 outdir=outdir,
45 tref=tref,
46 tstart=tstart,
47 duration=duration,
48 F0=F0,
49 F1=F1,
50 F2=F2,
51 Alpha=Alpha,
52 Delta=Delta,
53 h0=h0,
54 cosi=cosi,
55 detectors=detectors,
56 sqrtSX=sqrtSX,
57 transientStartTime=transient_tstart,
58 transientTau=transient_duration,
59 transientWindowType=transientWindowType,
60 )
61 transient.make_data()
62 logger.info("Predicted 2F from injection Writer:", transient.predict_fstat())
Total running time of the script: ( 0 minutes 0.000 seconds)