PyFstat
v1.11.5

Contents:

  • PyFstat
  • PyFstat module documentation
  • Examples
    • Grid searches for isolated CW
    • MCMC searches for isolated CW signals
    • Comparison between MCMC and Grid searches
    • Multi-stage MCMC follow up
    • Binary-modulated CW searches
    • Glitch robust CW searches
    • Transient CW searches
      • Long transient search examples: Make data
      • Short transient search examples: Make data
      • Long transient MCMC search
      • Short transient grid search
      • Short transient MCMC search
    • Other examples
PyFstat
  • »
  • Examples »
  • Transient CW searches »
  • Short transient grid search
  • Edit on GitHub

Note

Click here to download the full example code

Short transient grid searchΒΆ

An example grid-based search for a short transient signal.

 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
 import pyfstat
 import os
 import numpy as np
 import PyFstat_example_make_data_for_short_transient_search as data

 if __name__ == "__main__":

     if not os.path.isdir(data.outdir) or not np.any(
         [f.endswith(".sft") for f in os.listdir(data.outdir)]
     ):
         raise RuntimeError(
             "Please first run PyFstat_example_make_data_for_short_transient_search.py !"
         )

     maxStartTime = data.tstart + data.duration

     m = 0.001
     dF0 = np.sqrt(12 * m) / (np.pi * data.duration)
     DeltaF0 = 100 * dF0
     F0s = [data.F0 - DeltaF0 / 2.0, data.F0 + DeltaF0 / 2.0, dF0]
     F1s = [data.F1]
     F2s = [data.F2]
     Alphas = [data.Alpha]
     Deltas = [data.Delta]

     BSGL = False

     print("Standard CW search:")
     search1 = pyfstat.GridSearch(
         label="CW" + ("_BSGL" if BSGL else ""),
         outdir=data.outdir,
         sftfilepattern=os.path.join(data.outdir, "*simulated_transient_signal*sft"),
         F0s=F0s,
         F1s=F1s,
         F2s=F2s,
         Alphas=Alphas,
         Deltas=Deltas,
         tref=data.tref,
         BSGL=BSGL,
     )
     search1.run()
     search1.print_max_twoF()
     search1.plot_1D(xkey="F0", xlabel="freq [Hz]", ylabel="$2\\mathcal{F}$")

     print("with t0,tau bands:")
     search2 = pyfstat.TransientGridSearch(
         label="tCW" + ("_BSGL" if BSGL else ""),
         outdir=data.outdir,
         sftfilepattern=os.path.join(data.outdir, "*simulated_transient_signal*sft"),
         F0s=F0s,
         F1s=F1s,
         F2s=F2s,
         Alphas=Alphas,
         Deltas=Deltas,
         tref=data.tref,
         transientWindowType="rect",
         t0Band=data.duration - 2 * data.Tsft,
         tauBand=data.duration,
         outputTransientFstatMap=True,
         tCWFstatMapVersion="lal",
         BSGL=BSGL,
     )
     search2.run()
     search2.print_max_twoF()
     search2.plot_1D(xkey="F0", xlabel="freq [Hz]", ylabel="$2\\mathcal{F}$")

Total running time of the script: ( 0 minutes 0.000 seconds)

Download Python source code: PyFstat_example_short_transient_grid_search.py

Download Jupyter notebook: PyFstat_example_short_transient_grid_search.ipynb

Gallery generated by Sphinx-Gallery

Next Previous

© Copyright 2020, Gregory Ashton, David Keitel, Reinhard Prix, Rodrigo Tenorio. Revision 0dbba7e8.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: v1.11.5
Versions
latest
stable
v1.11.5
v1.11.4
v1.11.3
v1.11.2
v1.11.1
v1.11.0
v1.10.1
v1.10.0
Downloads
On Read the Docs
Project Home
Builds