Commit b0d7bcf1 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Exposes SSBprec option for ComputeFstat and grid searches

parent ed1b32c1
......@@ -198,7 +198,7 @@ class ComputeFstat(object):
maxStartTime=None, binary=False, transient=True, BSGL=False,
detectors=None, minCoverFreq=None, maxCoverFreq=None,
earth_ephem=None, sun_ephem=None, injectSources=None,
injectSqrtSX=None, assumeSqrtSX=None):
injectSqrtSX=None, assumeSqrtSX=None, SSBprec=None):
"""
Parameters
----------
......@@ -235,6 +235,9 @@ class ComputeFstat(object):
Don't estimate noise-floors but assume (stationary) per-IFO
sqrt{SX} (if single value: use for all IFOs). If signal only,
set sqrtSX=1
SSBprec: int
Flag to set the SSB calculation: 0=Newtonian, 1=relativistic,
2=relativisitic optimised, 3=DMoff, 4=NO_SPIN
"""
......@@ -325,7 +328,11 @@ class ComputeFstat(object):
FstatOAs = lalpulsar.FstatOptionalArgs()
FstatOAs.randSeed = lalpulsar.FstatOptionalArgsDefaults.randSeed
FstatOAs.SSBprec = lalpulsar.FstatOptionalArgsDefaults.SSBprec
if self.SSBprec:
logging.info('Using SSBprec={}'.format(self.SSBprec))
FstatOAs.SSBprec = self.SSBprec
else:
FstatOAs.SSBprec = lalpulsar.FstatOptionalArgsDefaults.SSBprec
FstatOAs.Dterms = lalpulsar.FstatOptionalArgsDefaults.Dterms
FstatOAs.runningMedianWindow = lalpulsar.FstatOptionalArgsDefaults.runningMedianWindow
FstatOAs.FstatMethod = lalpulsar.FstatOptionalArgsDefaults.FstatMethod
......@@ -629,7 +636,7 @@ class SemiCoherentSearch(BaseSearchClass, ComputeFstat):
binary=False, BSGL=False, minStartTime=None,
maxStartTime=None, minCoverFreq=None, maxCoverFreq=None,
detectors=None, earth_ephem=None, sun_ephem=None,
injectSources=None, assumeSqrtSX=None):
injectSources=None, assumeSqrtSX=None, SSBprec=None):
"""
Parameters
----------
......@@ -756,7 +763,8 @@ class SemiCoherentGlitchSearch(BaseSearchClass, ComputeFstat):
def __init__(self, label, outdir, tref, minStartTime, maxStartTime,
nglitch=0, sftfilepath=None, theta0_idx=0, BSGL=False,
minCoverFreq=None, maxCoverFreq=None, assumeSqrtSX=None,
detectors=None, earth_ephem=None, sun_ephem=None):
detectors=None, earth_ephem=None, sun_ephem=None,
SSBprec=None):
"""
Parameters
----------
......
......@@ -21,7 +21,7 @@ class GridSearch(BaseSearchClass):
Alphas=[0], Deltas=[0], tref=None, minStartTime=None,
maxStartTime=None, nsegs=1, BSGL=False, minCoverFreq=None,
maxCoverFreq=None, earth_ephem=None, sun_ephem=None,
detectors=None):
detectors=None, SSBprec=None):
"""
Parameters
----------
......@@ -57,7 +57,7 @@ class GridSearch(BaseSearchClass):
earth_ephem=self.earth_ephem, sun_ephem=self.sun_ephem,
detectors=self.detectors, transient=False,
minStartTime=self.minStartTime, maxStartTime=self.maxStartTime,
BSGL=self.BSGL)
BSGL=self.BSGL, SSBprec=self.SSBprec)
self.search.get_det_stat = self.search.run_computefstatistic_single_point
else:
self.search = SemiCoherentSearch(
......@@ -336,7 +336,8 @@ class FrequencySlidingWindow(GridSearch):
Alpha, Delta, tref, minStartTime=None,
maxStartTime=None, window_size=10*86400, window_delta=86400,
BSGL=False, minCoverFreq=None, maxCoverFreq=None,
earth_ephem=None, sun_ephem=None, detectors=None):
earth_ephem=None, sun_ephem=None, detectors=None,
SSBprec=None):
"""
Parameters
----------
......@@ -376,7 +377,7 @@ class FrequencySlidingWindow(GridSearch):
earth_ephem=self.earth_ephem, sun_ephem=self.sun_ephem,
detectors=self.detectors, transient=True,
minStartTime=self.minStartTime, maxStartTime=self.maxStartTime,
BSGL=self.BSGL)
BSGL=self.BSGL, SSBprec=self.SSBprec)
self.search.get_det_stat = (
self.search.run_computefstatistic_single_point)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment