Commit 0db18d72 authored by David Keitel's avatar David Keitel
Browse files

Merge branch 'computeAtoms-flag' into 'master'

ComputeFstat: extra flag computeAtoms independent of transientWindowType

See merge request GregAshton/PyFstat!26
parents 9ebe93ba 23b998fd
...@@ -396,6 +396,7 @@ class ComputeFstat(BaseSearchClass): ...@@ -396,6 +396,7 @@ class ComputeFstat(BaseSearchClass):
SSBprec=None, SSBprec=None,
tCWFstatMapVersion="lal", tCWFstatMapVersion="lal",
cudaDeviceName=None, cudaDeviceName=None,
computeAtoms=False,
): ):
""" """
Parameters Parameters
...@@ -417,6 +418,7 @@ class ComputeFstat(BaseSearchClass): ...@@ -417,6 +418,7 @@ class ComputeFstat(BaseSearchClass):
allow for the Fstat to be computed over a transient range. allow for the Fstat to be computed over a transient range.
('none' instead of None explicitly calls the transient-window ('none' instead of None explicitly calls the transient-window
function, but with the full range, for debugging) function, but with the full range, for debugging)
(if not None, will also force atoms regardless of computeAtoms option)
t0Band, tauBand: int t0Band, tauBand: int
if >0, search t0 in (minStartTime,minStartTime+t0Band) if >0, search t0 in (minStartTime,minStartTime+t0Band)
and tau in (tauMin,2*Tsft+tauBand). and tau in (tauMin,2*Tsft+tauBand).
...@@ -451,6 +453,8 @@ class ComputeFstat(BaseSearchClass): ...@@ -451,6 +453,8 @@ class ComputeFstat(BaseSearchClass):
'pycuda' for gpu, and some others for devel/debug. 'pycuda' for gpu, and some others for devel/debug.
cudaDeviceName: str cudaDeviceName: str
GPU name to be matched against drv.Device output. GPU name to be matched against drv.Device output.
computeAtoms: bool
request atoms calculations regardless of transientWindowType
""" """
...@@ -562,10 +566,9 @@ class ComputeFstat(BaseSearchClass): ...@@ -562,10 +566,9 @@ class ComputeFstat(BaseSearchClass):
logging.info("Initialising FstatInput") logging.info("Initialising FstatInput")
dFreq = 0 dFreq = 0
if self.transientWindowType: self.whatToCompute = lalpulsar.FSTATQ_2F
self.whatToCompute = lalpulsar.FSTATQ_ATOMS_PER_DET if self.transientWindowType or self.computeAtoms:
else: self.whatToCompute += lalpulsar.FSTATQ_ATOMS_PER_DET
self.whatToCompute = lalpulsar.FSTATQ_2F
FstatOAs = lalpulsar.FstatOptionalArgs() FstatOAs = lalpulsar.FstatOptionalArgs()
FstatOAs.randSeed = lalpulsar.FstatOptionalArgsDefaults.randSeed FstatOAs.randSeed = lalpulsar.FstatOptionalArgsDefaults.randSeed
......
...@@ -574,6 +574,7 @@ class TransientGridSearch(GridSearch): ...@@ -574,6 +574,7 @@ class TransientGridSearch(GridSearch):
assumeSqrtSX=self.assumeSqrtSX, assumeSqrtSX=self.assumeSqrtSX,
tCWFstatMapVersion=self.tCWFstatMapVersion, tCWFstatMapVersion=self.tCWFstatMapVersion,
cudaDeviceName=self.cudaDeviceName, cudaDeviceName=self.cudaDeviceName,
computeAtoms=self.outputAtoms,
) )
self.search.get_det_stat = self.search.get_fullycoherent_twoF self.search.get_det_stat = self.search.get_fullycoherent_twoF
......
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