Commit e7d94834 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Adds individual detector contributions to the cumulative Fstat

parent 798429b2
...@@ -484,11 +484,18 @@ class ComputeFstat(object): ...@@ -484,11 +484,18 @@ class ComputeFstat(object):
def plot_twoF_cumulative(self, label, outdir, ax=None, c='k', savefig=True, def plot_twoF_cumulative(self, label, outdir, ax=None, c='k', savefig=True,
title=None, **kwargs): title=None, **kwargs):
taus, twoFs = self.calculate_twoF_cumulative(**kwargs)
if ax is None: if ax is None:
fig, ax = plt.subplots() fig, ax = plt.subplots()
ax.plot(taus/86400., twoFs, label=label, color=c)
taus, twoFs = self.calculate_twoF_cumulative(**kwargs)
ax.plot(taus/86400., twoFs, label='All detectors', color=c)
if len(self.detector_names) > 1:
for d in self.detector_names:
self.detectors = d
self.init_computefstatistic_single_point()
taus, twoFs = self.calculate_twoF_cumulative(**kwargs)
ax.plot(taus/86400., twoFs, label='{}'.format(d))
ax.set_xlabel(r'Days from $t_{{\rm start}}={:.0f}$'.format( ax.set_xlabel(r'Days from $t_{{\rm start}}={:.0f}$'.format(
kwargs['tstart'])) kwargs['tstart']))
if self.BSGL: if self.BSGL:
...@@ -496,6 +503,7 @@ class ComputeFstat(object): ...@@ -496,6 +503,7 @@ class ComputeFstat(object):
else: else:
ax.set_ylabel(r'$\widetilde{2\mathcal{F}}_{\rm cumulative}$') ax.set_ylabel(r'$\widetilde{2\mathcal{F}}_{\rm cumulative}$')
ax.set_xlim(0, taus[-1]/86400) ax.set_xlim(0, taus[-1]/86400)
ax.legend(frameon=False)
if title: if title:
ax.set_title(title) ax.set_title(title)
if savefig: if savefig:
......
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