LALPulsar  6.1.0.1-b72065a
testWriteSFTsfromSFDBs Namespace Reference

Functions

def validate_and_load_SFTs (globstr, fmin, fmax)
 
def plot_SFTs_comparison (sfts1, sfts2, plotnamebase="plot", label1="SFTs1", label2="SFTs2", title="")
 

Variables

string testdir = "."
 
string ref_gwf = "V-V1_mfdv5-1257741529-2048.gwf"
 
string ref_sft = "V-3_V1_1024SFT_mfdv5-1257741529-2048.sft"
 
string ref_sfdb = "V1-mfdv5_20191114_043831.SFDB09"
 
list IFOs = ["V1"]
 
float fmin = 49.0
 
float fmax = 51.0
 
int startTime = 1257741529
 
int frameDuration = 2048
 
 Tsft = int(ref_sft.split("SFT")[0].split("_")[-1])
 
 Toverlap = int(0.5 * Tsft)
 
string cl_SFDB
 
 shell
 
 sfts_from_sfdb
 
 sfts_ref
 
int atol_freq = 1e-6
 
 mean_sfts = np.zeros(sfts_ref.length)
 
 f0_sfdb = sft1.f0
 
 deltaF_sfdb = sft1.deltaF
 
 nBins_sfdb = sft1.data.length
 
 abs_sfdb = np.abs(sft1.data.data)
 
 max_sfdb = np.max(abs_sfdb)
 
 maxbin_sfdb = np.argmax(abs_sfdb)
 
 maxfreq_sfdb = f0_sfdb + deltaF_sfdb * maxbin_sfdb
 
 without_maxbin = maxbin_sfdb
 
 abs_without = abs_sfdb[without_maxbin]
 
 mean_sfdb = np.mean(abs_without)
 
 stdev_sfdb = mean_sfdb * np.std(abs_without / mean_sfdb)
 
 f0_sfts = sft2.f0
 
 deltaF_sfts = sft2.deltaF
 
 nBins_sfts = sft2.data.length
 
 abs_sfts = np.abs(sft2.data.data)
 
 max_sfts = np.max(abs_sfts)
 
 maxbin_sfts = np.argmax(abs_sfts)
 
 maxfreq_sfts = f0_sfts + deltaF_sfts * maxbin_sfts
 
 stdev_sfts = mean_sfts[k] * np.std(abs_without / mean_sfts[k])
 
 plotnamebase
 
 label1
 
 label2
 
 title
 
float atol = 0.02 * mean_sfts[k]
 
 maxdiff = max(np.abs(sft1.data.data - sft2.data.data))
 
 data
 
 rtol
 
 verbose
 

Function Documentation

◆ validate_and_load_SFTs()

def testWriteSFTsfromSFDBs.validate_and_load_SFTs (   globstr,
  fmin,
  fmax 
)

Definition at line 29 of file testWriteSFTsfromSFDBs.py.

◆ plot_SFTs_comparison()

def testWriteSFTsfromSFDBs.plot_SFTs_comparison (   sfts1,
  sfts2,
  plotnamebase = "plot",
  label1 = "SFTs1",
  label2 = "SFTs2",
  title = "" 
)

Definition at line 45 of file testWriteSFTsfromSFDBs.py.

Variable Documentation

◆ testdir

string testWriteSFTsfromSFDBs.testdir = "."

Definition at line 26 of file testWriteSFTsfromSFDBs.py.

◆ ref_gwf

string testWriteSFTsfromSFDBs.ref_gwf = "V-V1_mfdv5-1257741529-2048.gwf"

Definition at line 126 of file testWriteSFTsfromSFDBs.py.

◆ ref_sft

string testWriteSFTsfromSFDBs.ref_sft = "V-3_V1_1024SFT_mfdv5-1257741529-2048.sft"

Definition at line 127 of file testWriteSFTsfromSFDBs.py.

◆ ref_sfdb

string testWriteSFTsfromSFDBs.ref_sfdb = "V1-mfdv5_20191114_043831.SFDB09"

Definition at line 128 of file testWriteSFTsfromSFDBs.py.

◆ IFOs

list testWriteSFTsfromSFDBs.IFOs = ["V1"]

Definition at line 131 of file testWriteSFTsfromSFDBs.py.

◆ fmin

float testWriteSFTsfromSFDBs.fmin = 49.0

Definition at line 132 of file testWriteSFTsfromSFDBs.py.

◆ fmax

float testWriteSFTsfromSFDBs.fmax = 51.0

Definition at line 133 of file testWriteSFTsfromSFDBs.py.

◆ startTime

int testWriteSFTsfromSFDBs.startTime = 1257741529

Definition at line 134 of file testWriteSFTsfromSFDBs.py.

◆ frameDuration

int testWriteSFTsfromSFDBs.frameDuration = 2048

Definition at line 135 of file testWriteSFTsfromSFDBs.py.

◆ Tsft

testWriteSFTsfromSFDBs.Tsft = int(ref_sft.split("SFT")[0].split("_")[-1])

Definition at line 138 of file testWriteSFTsfromSFDBs.py.

◆ Toverlap

testWriteSFTsfromSFDBs.Toverlap = int(0.5 * Tsft)

Definition at line 139 of file testWriteSFTsfromSFDBs.py.

◆ cl_SFDB

testWriteSFTsfromSFDBs.cl_SFDB
Initial value:
1 = " ".join(
2  [
3  "lalpulsar_WriteSFTsfromSFDBs",
4  "--file-pattern",
5  ref_sfdb,
6  "--fmin",
7  str(fmin),
8  "--fmax",
9  str(fmax),
10  "--outSFTdir",
11  testdir,
12  ]
13 )

Definition at line 143 of file testWriteSFTsfromSFDBs.py.

◆ shell

testWriteSFTsfromSFDBs.shell

Definition at line 157 of file testWriteSFTsfromSFDBs.py.

◆ sfts_from_sfdb

testWriteSFTsfromSFDBs.sfts_from_sfdb

Definition at line 158 of file testWriteSFTsfromSFDBs.py.

◆ sfts_ref

testWriteSFTsfromSFDBs.sfts_ref

Definition at line 163 of file testWriteSFTsfromSFDBs.py.

◆ atol_freq

int testWriteSFTsfromSFDBs.atol_freq = 1e-6

Definition at line 170 of file testWriteSFTsfromSFDBs.py.

◆ mean_sfts

testWriteSFTsfromSFDBs.mean_sfts = np.zeros(sfts_ref.length)

Definition at line 188 of file testWriteSFTsfromSFDBs.py.

◆ f0_sfdb

testWriteSFTsfromSFDBs.f0_sfdb = sft1.f0

Definition at line 191 of file testWriteSFTsfromSFDBs.py.

◆ deltaF_sfdb

testWriteSFTsfromSFDBs.deltaF_sfdb = sft1.deltaF

Definition at line 192 of file testWriteSFTsfromSFDBs.py.

◆ nBins_sfdb

testWriteSFTsfromSFDBs.nBins_sfdb = sft1.data.length

Definition at line 193 of file testWriteSFTsfromSFDBs.py.

◆ abs_sfdb

testWriteSFTsfromSFDBs.abs_sfdb = np.abs(sft1.data.data)

Definition at line 194 of file testWriteSFTsfromSFDBs.py.

◆ max_sfdb

testWriteSFTsfromSFDBs.max_sfdb = np.max(abs_sfdb)

Definition at line 195 of file testWriteSFTsfromSFDBs.py.

◆ maxbin_sfdb

testWriteSFTsfromSFDBs.maxbin_sfdb = np.argmax(abs_sfdb)

Definition at line 196 of file testWriteSFTsfromSFDBs.py.

◆ maxfreq_sfdb

testWriteSFTsfromSFDBs.maxfreq_sfdb = f0_sfdb + deltaF_sfdb * maxbin_sfdb

Definition at line 197 of file testWriteSFTsfromSFDBs.py.

◆ without_maxbin

testWriteSFTsfromSFDBs.without_maxbin = maxbin_sfdb

Definition at line 198 of file testWriteSFTsfromSFDBs.py.

◆ abs_without

testWriteSFTsfromSFDBs.abs_without = abs_sfdb[without_maxbin]

Definition at line 199 of file testWriteSFTsfromSFDBs.py.

◆ mean_sfdb

testWriteSFTsfromSFDBs.mean_sfdb = np.mean(abs_without)

Definition at line 200 of file testWriteSFTsfromSFDBs.py.

◆ stdev_sfdb

testWriteSFTsfromSFDBs.stdev_sfdb = mean_sfdb * np.std(abs_without / mean_sfdb)

Definition at line 201 of file testWriteSFTsfromSFDBs.py.

◆ f0_sfts

testWriteSFTsfromSFDBs.f0_sfts = sft2.f0

Definition at line 202 of file testWriteSFTsfromSFDBs.py.

◆ deltaF_sfts

testWriteSFTsfromSFDBs.deltaF_sfts = sft2.deltaF

Definition at line 203 of file testWriteSFTsfromSFDBs.py.

◆ nBins_sfts

testWriteSFTsfromSFDBs.nBins_sfts = sft2.data.length

Definition at line 204 of file testWriteSFTsfromSFDBs.py.

◆ abs_sfts

testWriteSFTsfromSFDBs.abs_sfts = np.abs(sft2.data.data)

Definition at line 205 of file testWriteSFTsfromSFDBs.py.

◆ max_sfts

testWriteSFTsfromSFDBs.max_sfts = np.max(abs_sfts)

Definition at line 206 of file testWriteSFTsfromSFDBs.py.

◆ maxbin_sfts

testWriteSFTsfromSFDBs.maxbin_sfts = np.argmax(abs_sfts)

Definition at line 207 of file testWriteSFTsfromSFDBs.py.

◆ maxfreq_sfts

testWriteSFTsfromSFDBs.maxfreq_sfts = f0_sfts + deltaF_sfts * maxbin_sfts

Definition at line 208 of file testWriteSFTsfromSFDBs.py.

◆ stdev_sfts

testWriteSFTsfromSFDBs.stdev_sfts = mean_sfts[k] * np.std(abs_without / mean_sfts[k])

Definition at line 211 of file testWriteSFTsfromSFDBs.py.

◆ plotnamebase

testWriteSFTsfromSFDBs.plotnamebase

Definition at line 247 of file testWriteSFTsfromSFDBs.py.

◆ label1

testWriteSFTsfromSFDBs.label1

Definition at line 248 of file testWriteSFTsfromSFDBs.py.

◆ label2

testWriteSFTsfromSFDBs.label2

Definition at line 249 of file testWriteSFTsfromSFDBs.py.

◆ title

testWriteSFTsfromSFDBs.title

Definition at line 250 of file testWriteSFTsfromSFDBs.py.

◆ atol

testWriteSFTsfromSFDBs.atol = 0.02 * mean_sfts[k]

Definition at line 270 of file testWriteSFTsfromSFDBs.py.

◆ maxdiff

testWriteSFTsfromSFDBs.maxdiff = max(np.abs(sft1.data.data - sft2.data.data))

Definition at line 271 of file testWriteSFTsfromSFDBs.py.

◆ data

testWriteSFTsfromSFDBs.data

Definition at line 277 of file testWriteSFTsfromSFDBs.py.

◆ rtol

testWriteSFTsfromSFDBs.rtol

Definition at line 277 of file testWriteSFTsfromSFDBs.py.

◆ verbose

testWriteSFTsfromSFDBs.verbose

Definition at line 277 of file testWriteSFTsfromSFDBs.py.