Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • Binary
  • add-higher-spindown-components
  • add-version-information
  • adds-header-to-grid-search
  • develop-DK
  • develop-GA
  • master
  • os-path-join
  • timeFstatmap
  • v1.0.1
  • v1.1.0
  • v1.1.2
  • v1.2
  • v1.3
14 results

Target

Select target project
  • GregAshton/PyFstat
  • Yuanhao.Zhang/PyFstat
  • dkeitel/PyFstat
3 results
Select Git revision
  • 72-improve-docs-for_optimal_setup
  • add-higher-spindown-components
  • develop-GA
  • master
  • os-path-join
  • v1.0.1
  • v1.1.0
  • v1.1.2
  • v1.2
  • v1.3
10 results
Show changes

Commits on Source 5

...@@ -577,6 +577,10 @@ class ComputeFstat(BaseSearchClass): ...@@ -577,6 +577,10 @@ class ComputeFstat(BaseSearchClass):
FstatOAs.SSBprec = self.SSBprec FstatOAs.SSBprec = self.SSBprec
else: else:
FstatOAs.SSBprec = lalpulsar.FstatOptionalArgsDefaults.SSBprec FstatOAs.SSBprec = lalpulsar.FstatOptionalArgsDefaults.SSBprec
if self.EccentricityTiming:
FstatOAs.eccTiming = self.EccentricityTiming
else:
FstatOAs.eccTiming = lalpulsar.FstatOptionalArgsDefaults.eccTiming
FstatOAs.Dterms = lalpulsar.FstatOptionalArgsDefaults.Dterms FstatOAs.Dterms = lalpulsar.FstatOptionalArgsDefaults.Dterms
FstatOAs.runningMedianWindow = ( FstatOAs.runningMedianWindow = (
lalpulsar.FstatOptionalArgsDefaults.runningMedianWindow lalpulsar.FstatOptionalArgsDefaults.runningMedianWindow
...@@ -1162,6 +1166,7 @@ class SemiCoherentSearch(ComputeFstat): ...@@ -1162,6 +1166,7 @@ class SemiCoherentSearch(ComputeFstat):
injectSources=None, injectSources=None,
assumeSqrtSX=None, assumeSqrtSX=None,
SSBprec=None, SSBprec=None,
EccentricityTiming,
): ):
""" """
Parameters Parameters
......
...@@ -46,6 +46,16 @@ class Writer(BaseSearchClass): ...@@ -46,6 +46,16 @@ class Writer(BaseSearchClass):
maxStartTime=None, maxStartTime=None,
add_noise=True, add_noise=True,
transientWindowType="none", transientWindowType="none",
asini=0,
period=0,
tp=0,
ecc=0,
argp=0,
noiseSFTs='none',
windowSFTsType='tukey',
windowSFTsBeta=0.001,
ephemEarth='none',
ephemSun='none'
): ):
""" """
Parameters Parameters
...@@ -186,6 +196,56 @@ transientTau = {:10.0f}\n""" ...@@ -186,6 +196,56 @@ transientTau = {:10.0f}\n"""
duration_days * 86400, duration_days * 86400,
) )
def get_single_config_line_binarycw(
self,
i,
Alpha,
Delta,
h0,
cosi,
psi,
phi,
F0,
F1,
F2,
tref,
asini,
period,
tp,
ecc,
argp
):
template = (
self.get_base_template(
i, Alpha, Delta, h0, cosi, psi, phi, F0, F1, F2, tref
)
+ """
orbitasini = {:2.5f}
orbitPeriod = {:5.5f}
orbitTp = {:10.5f}
orbitEcc = {:1.5f}
orbitArgp = {:2.5f}\n"""
)
return template.format(
i,
Alpha,
Delta,
h0,
cosi,
psi,
phi,
F0,
F1,
F2,
tref,
asini,
period,
tp,
ecc,
argp
)
def get_single_config_line( def get_single_config_line(
self, self,
i, i,
...@@ -202,6 +262,11 @@ transientTau = {:10.0f}\n""" ...@@ -202,6 +262,11 @@ transientTau = {:10.0f}\n"""
window, window,
tstart, tstart,
duration_days, duration_days,
asini,
period,
tp,
ecc,
argp
): ):
if window == "none": if window == "none":
return self.get_single_config_line_cw( return self.get_single_config_line_cw(
...@@ -225,6 +290,20 @@ transientTau = {:10.0f}\n""" ...@@ -225,6 +290,20 @@ transientTau = {:10.0f}\n"""
duration_days, duration_days,
) )
if window == 'none':
if asini == 0:
return self.get_single_config_line_cw(
i, Alpha, Delta, h0, cosi, psi, phi, F0, F1, F2, tref
)
else:
return self.get_single_config_line_binarycw(
i, Alpha, Delta, h0, cosi, psi, phi, F0, F1, F2, tref, asini, period, tp, ecc, argp
)
else:
return self.get_single_config_line_tcw(
i, Alpha, Delta, h0, cosi, psi, phi, F0, F1, F2, tref, window, tstart, duration_days
)
def make_cff(self): def make_cff(self):
""" """
Generates a .cff file Generates a .cff file
...@@ -246,6 +325,11 @@ transientTau = {:10.0f}\n""" ...@@ -246,6 +325,11 @@ transientTau = {:10.0f}\n"""
self.transientWindowType, self.transientWindowType,
self.tstart, self.tstart,
self.duration_days, self.duration_days,
self.asini,
self.period,
self.tp,
self.ecc,
self.argp,
) )
if self.check_if_cff_file_needs_rewritting(content): if self.check_if_cff_file_needs_rewritting(content):
...@@ -360,12 +444,20 @@ transientTau = {:10.0f}\n""" ...@@ -360,12 +444,20 @@ transientTau = {:10.0f}\n"""
cl_mfd = [] cl_mfd = []
cl_mfd.append("lalapps_Makefakedata_v5") cl_mfd.append("lalapps_Makefakedata_v5")
cl_mfd.append('--ephemEarth="{}"'.format(self.ephemEarth))
cl_mfd.append('--ephemSun="{}"'.format(self.ephemSun))
cl_mfd.append("--outSingleSFT=TRUE") cl_mfd.append("--outSingleSFT=TRUE")
cl_mfd.append('--outSFTdir="{}"'.format(self.outdir)) cl_mfd.append('--outSFTdir="{}"'.format(self.outdir))
cl_mfd.append('--outLabel="{}"'.format(self.label)) cl_mfd.append('--outLabel="{}"'.format(self.label))
cl_mfd.append("--IFOs={}".format(self.IFOs)) cl_mfd.append("--IFOs={}".format(self.IFOs))
if self.noiseSFTs=='none':
cl_mfd.append('--IFOs={}'.format(self.IFOs))
if self.add_noise: if self.add_noise:
cl_mfd.append('--sqrtSX="{}"'.format(self.sqrtSX)) cl_mfd.append('--sqrtSX="{}"'.format(self.sqrtSX))
else:
cl_mfd.append('--noiseSFTs="{}"'.format(self.noiseSFTs))
cl_mfd.append('--SFTWindowType="{}"'.format(self.windowSFTsType))
cl_mfd.append('--SFTWindowBeta={}'.format(self.windowSFTsBeta))
if self.minStartTime is None: if self.minStartTime is None:
cl_mfd.append("--startTime={:0.0f}".format(float(self.tstart))) cl_mfd.append("--startTime={:0.0f}".format(float(self.tstart)))
else: else:
...@@ -380,12 +472,6 @@ transientTau = {:10.0f}\n""" ...@@ -380,12 +472,6 @@ transientTau = {:10.0f}\n"""
cl_mfd.append("--Tsft={}".format(self.Tsft)) cl_mfd.append("--Tsft={}".format(self.Tsft))
if self.h0 != 0: if self.h0 != 0:
cl_mfd.append('--injectionSources="{}"'.format(self.config_file_name)) cl_mfd.append('--injectionSources="{}"'.format(self.config_file_name))
earth_ephem = getattr(self, "earth_ephem", None)
sun_ephem = getattr(self, "sun_ephem", None)
if earth_ephem is not None:
cl_mfd.append('--ephemEarth="{}"'.format(earth_ephem))
if sun_ephem is not None:
cl_mfd.append('--ephemSun="{}"'.format(sun_ephem))
cl_mfd = " ".join(cl_mfd) cl_mfd = " ".join(cl_mfd)
check_ok = self.check_cached_data_okay_to_use(cl_mfd) check_ok = self.check_cached_data_okay_to_use(cl_mfd)
......
...@@ -1732,7 +1732,7 @@ class MCMCSearch(core.BaseSearchClass): ...@@ -1732,7 +1732,7 @@ class MCMCSearch(core.BaseSearchClass):
logging.info("theta0 index: {}".format(self.theta0_idx)) logging.info("theta0 index: {}".format(self.theta0_idx))
logging.info("Max twoF: {} with parameters:".format(max_twoF)) logging.info("Max twoF: {} with parameters:".format(max_twoF))
for k in np.sort(list(max_twoFd.keys())): for k in np.sort(list(max_twoFd.keys())):
print(" {:10s} = {:1.9e}".format(k, max_twoFd[k])) logging.info(" {:10s} = {:1.9e}".format(k, max_twoFd[k]))
logging.info("Median +/- std for production values") logging.info("Median +/- std for production values")
for k in np.sort(list(median_std_d.keys())): for k in np.sort(list(median_std_d.keys())):
if "std" not in k: if "std" not in k:
...@@ -2276,6 +2276,7 @@ class MCMCSemiCoherentSearch(MCMCSearch): ...@@ -2276,6 +2276,7 @@ class MCMCSemiCoherentSearch(MCMCSearch):
injectSources=None, injectSources=None,
assumeSqrtSX=None, assumeSqrtSX=None,
nsegs=None, nsegs=None,
EccentricityTiming="ZeroEccentricity",
): ):
self.theta_prior = theta_prior self.theta_prior = theta_prior
...@@ -2300,6 +2301,7 @@ class MCMCSemiCoherentSearch(MCMCSearch): ...@@ -2300,6 +2301,7 @@ class MCMCSemiCoherentSearch(MCMCSearch):
self.injectSources = injectSources self.injectSources = injectSources
self.assumeSqrtSX = assumeSqrtSX self.assumeSqrtSX = assumeSqrtSX
self.nsegs = nsegs self.nsegs = nsegs
self.EccentricityTiming = EccentricityTiming
if os.path.isdir(outdir) is False: if os.path.isdir(outdir) is False:
os.mkdir(outdir) os.mkdir(outdir)
...@@ -2361,6 +2363,7 @@ class MCMCSemiCoherentSearch(MCMCSearch): ...@@ -2361,6 +2363,7 @@ class MCMCSemiCoherentSearch(MCMCSearch):
detectors=self.detectors, detectors=self.detectors,
injectSources=self.injectSources, injectSources=self.injectSources,
assumeSqrtSX=self.assumeSqrtSX, assumeSqrtSX=self.assumeSqrtSX,
EccentricityTiming = self.EccentricityTiming,
) )
if self.minStartTime is None: if self.minStartTime is None:
self.minStartTime = self.search.minStartTime self.minStartTime = self.search.minStartTime
......