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 transient = pyfstat.Writer(
42 label="simulated_transient_signal",
43 outdir=outdir,
44 tref=tref,
45 tstart=tstart,
46 duration=duration,
47 F0=F0,
48 F1=F1,
49 F2=F2,
50 Alpha=Alpha,
51 Delta=Delta,
52 h0=h0,
53 cosi=cosi,
54 detectors=detectors,
55 sqrtSX=sqrtSX,
56 transientStartTime=transient_tstart,
57 transientTau=transient_duration,
58 transientWindowType=transientWindowType,
59 )
60 transient.make_data()
61 logger.info(f"Predicted 2F from injection Writer: {transient.predict_fstat()}")
Total running time of the script: ( 0 minutes 0.000 seconds)