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 label = "PyFstatExampleLongTransientSearch"
17 outdir = os.path.join("PyFstat_example_data", label)
18 logger = pyfstat.set_up_logger(outdir=outdir, label=label)
19
20 F0 = 30.0
21 F1 = -1e-10
22 F2 = 0
23 Alpha = 0.5
24 Delta = 1
25
26 tstart = 1000000000
27 duration = 200 * 86400
28
29 transient_tstart = tstart + 0.25 * duration
30 transient_duration = 0.5 * duration
31 transientWindowType = "rect"
32 tref = tstart
33
34 h0 = 1e-23
35 cosi = 0
36 psi = 0
37 phi = 0
38 sqrtSX = 1e-22
39 detectors = "H1,L1"
40
41 if __name__ == "__main__":
42 transient = pyfstat.Writer(
43 label=label,
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(f"Predicted 2F from injection Writer: {transient.predict_fstat()}")
Total running time of the script: ( 0 minutes 0.000 seconds)