diff --git a/pyfstat/core.py b/pyfstat/core.py index 6a278675c0345077744c1a2fdf763a4ad942b01e..1228a4cf7990a5c9ac6974e0ccf6aec293d93993 100755 --- a/pyfstat/core.py +++ b/pyfstat/core.py @@ -396,6 +396,7 @@ class ComputeFstat(BaseSearchClass): SSBprec=None, tCWFstatMapVersion="lal", cudaDeviceName=None, + computeAtoms=False, ): """ Parameters @@ -417,6 +418,7 @@ class ComputeFstat(BaseSearchClass): allow for the Fstat to be computed over a transient range. ('none' instead of None explicitly calls the transient-window function, but with the full range, for debugging) + (if not None, will also force atoms regardless of computeAtoms option) t0Band, tauBand: int if >0, search t0 in (minStartTime,minStartTime+t0Band) and tau in (tauMin,2*Tsft+tauBand). @@ -451,6 +453,8 @@ class ComputeFstat(BaseSearchClass): 'pycuda' for gpu, and some others for devel/debug. cudaDeviceName: str GPU name to be matched against drv.Device output. + computeAtoms: bool + request atoms calculations regardless of transientWindowType """ @@ -562,10 +566,9 @@ class ComputeFstat(BaseSearchClass): logging.info("Initialising FstatInput") dFreq = 0 - if self.transientWindowType: - self.whatToCompute = lalpulsar.FSTATQ_ATOMS_PER_DET - else: - self.whatToCompute = lalpulsar.FSTATQ_2F + self.whatToCompute = lalpulsar.FSTATQ_2F + if self.transientWindowType or self.computeAtoms: + self.whatToCompute += lalpulsar.FSTATQ_ATOMS_PER_DET FstatOAs = lalpulsar.FstatOptionalArgs() FstatOAs.randSeed = lalpulsar.FstatOptionalArgsDefaults.randSeed diff --git a/pyfstat/grid_based_searches.py b/pyfstat/grid_based_searches.py index cf6a98262dad94a8a14c3d4e5a53d73f9bfd3ffb..7251013a87f894809e630a07a8a9059a6722e754 100644 --- a/pyfstat/grid_based_searches.py +++ b/pyfstat/grid_based_searches.py @@ -574,6 +574,7 @@ class TransientGridSearch(GridSearch): assumeSqrtSX=self.assumeSqrtSX, tCWFstatMapVersion=self.tCWFstatMapVersion, cudaDeviceName=self.cudaDeviceName, + computeAtoms=self.outputAtoms, ) self.search.get_det_stat = self.search.get_fullycoherent_twoF