Commit 0c858c7f authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Fixes number of sidebands in SSBprec=2 to 9

- In a prior commit, the number of sidebands checked for the normal search
(i.e. SSBprec=2) was erroneously set to M0, rather than 9. This fixes
that.
- Also improves logging output
- Splits of the UniformPriorToGrid run function to produce the data and
  plot separately
parent e74d5b38
......@@ -279,8 +279,10 @@ class GridUniformPriorSearch():
detectors=detectors, minCoverFreq=minCoverFreq,
maxCoverFreq=maxCoverFreq, nsegs=nsegs)
def run(self, **kwargs):
def run(self):
self.search.run()
def get_2D_plot(self, **kwargs):
return self.search.plot_2D('F0', 'F1', **kwargs)
......@@ -510,7 +512,8 @@ class DMoff_NO_SPIN(GridSearch):
self.TERRESTRIAL_DAY = 86400.
a0 = self.Re/self.c # *np.cos(self.par['Delta'])
self.m0 = np.max([4, int(np.ceil(2*np.pi*self.par['F0']*a0))])
logging.info('m0 = {}'.format(self.m0))
logging.info(
'Setting up DMoff_NO_SPIN search with m0 = {}'.format(self.m0))
def get_results(self):
""" Compute the three summed detection statistics
......@@ -523,8 +526,7 @@ class DMoff_NO_SPIN(GridSearch):
self.SSBprec = 2
self.out_file = '{}/{}_gridFS_SSBPREC2.txt'.format(
self.outdir, self.label)
self.F0s = [self.par['F0']+j/self.SIDEREAL_DAY
for j in range(-self.m0, self.m0+1)]
self.F0s = [self.par['F0']+j/self.SIDEREAL_DAY for j in range(-4, 5)]
self.run()
twoF_SUM = np.sum(self.data[:, -1])
......
......@@ -93,9 +93,13 @@ class MCMCSearch(core.BaseSearchClass):
if os.path.isdir(outdir) is False:
os.mkdir(outdir)
self._add_log_file()
logging.info(
'Set-up MCMC search for model {} on data {}'.format(
self.label, self.sftfilepath))
logging.info('Set-up MCMC search for model {}'.format(self.label))
if sftfilepath:
logging.info('Using data {}'.format(self.sftfilepath))
else:
logging.info('No sftfilepath given')
if injectSources:
logging.info('Inject sources: {}'.format(injectSources))
self.pickle_path = '{}/{}_saved_data.p'.format(self.outdir, self.label)
self._unpack_input_theta()
self.ndim = len(self.theta_keys)
......
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