diff --git a/pyfstat/grid_based_searches.py b/pyfstat/grid_based_searches.py index f33f720a3be99f97ec81c6f0edcf2163675a26b0..3ba1b827047e7e9ccf939c415bdf34a7db1a29b8 100644 --- a/pyfstat/grid_based_searches.py +++ b/pyfstat/grid_based_searches.py @@ -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]) diff --git a/pyfstat/mcmc_based_searches.py b/pyfstat/mcmc_based_searches.py index 68f5fc03d94b7d8debbde31250a058b91f77064f..e41fe8c9a5a9e3ace293532eadf45090fcc051c8 100644 --- a/pyfstat/mcmc_based_searches.py +++ b/pyfstat/mcmc_based_searches.py @@ -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)