Loading minke/mdctools.py +3 −4 Original line number Diff line number Diff line Loading @@ -153,7 +153,6 @@ class MDCSet(): self.waveforms.append(sim_burst_table) if full: self._generate_burst(sim_burst_table) self._measure_hrss() self._measure_egw_rsq() Loading Loading @@ -204,7 +203,7 @@ class MDCSet(): # FIXME: Totally inefficent --- but can we deep copy a SWIG SimBurst? # DW: I tried that, and it doesn't seem to work :/ hp0, hx0 = lalburst.GenerateSimBurst(swig_row, 1.0/rate) self.hp, self.hx, self.hp0, self.hx0 = hp, hx, hp0, hx0 return hp, hx, hp0, hx0 #lalburst.DestroySimBurst(swig_row) del swig_row Loading Loading @@ -336,7 +335,7 @@ class MDCSet(): hphx : float The hrss of |HpHx| """ hp, hx, hp0, hx0 = self.hp, self.hx, self.hp0, self.hx0 hp, hx, hp0, hx0 = self._generate_burst()# self.hp, self.hx, self.hp0, self.hx0 hp0.data.data *= 0 hx0.data.data *= 0 Loading Loading @@ -373,7 +372,7 @@ class MDCSet(): The energy emitted in gravitational waves divided by the distance squared in M_solar / pc^2. """ hp, hx = self.hp, self.hx hp, hx, _, _ = self._generate_burst() self.egw.append(lalsimulation.MeasureEoverRsquared(hp, hx)) def _responses(self, row): Loading minke/sources.py +4 −4 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ class Waveform(object): """ Produce a plot of the injection. """ self._generate() hp, hx = self._generate(half=True) f, ax = plt.subplots(1,2) times = np.arange(0, self.hp.deltaT*len(self.hp.data.data), self.hp.deltaT) ax[0].plot(times, self.hp.data.data, label="+ polarisation") Loading Loading @@ -139,7 +139,7 @@ class Waveform(object): hp0, hx0 = lalburst.GenerateSimBurst(self.swig_row, 1.0/rate) else: hp0, hx0 = hp, hx self.hp, self.hx, self.hp0, self.hx0 = hp, hx, hp0, hx0 return hp, hx, hp0, hx0 del(self.swig_row) Loading Loading @@ -362,8 +362,8 @@ class WhiteNoiseBurst(Waveform): # the old pyBurst code measured this by generating the waveform # which seems wasteful, but I'll replicate it here anyway, for # consistency with the method used for O1. self._generate(half=True) self.params['hrss'] = lalsimulation.MeasureHrss(self.hp, self.hx) hp, hx = self._generate(half=True) self.params['hrss'] = lalsimulation.MeasureHrss(hp, hx) class Supernova(Waveform): Loading Loading
minke/mdctools.py +3 −4 Original line number Diff line number Diff line Loading @@ -153,7 +153,6 @@ class MDCSet(): self.waveforms.append(sim_burst_table) if full: self._generate_burst(sim_burst_table) self._measure_hrss() self._measure_egw_rsq() Loading Loading @@ -204,7 +203,7 @@ class MDCSet(): # FIXME: Totally inefficent --- but can we deep copy a SWIG SimBurst? # DW: I tried that, and it doesn't seem to work :/ hp0, hx0 = lalburst.GenerateSimBurst(swig_row, 1.0/rate) self.hp, self.hx, self.hp0, self.hx0 = hp, hx, hp0, hx0 return hp, hx, hp0, hx0 #lalburst.DestroySimBurst(swig_row) del swig_row Loading Loading @@ -336,7 +335,7 @@ class MDCSet(): hphx : float The hrss of |HpHx| """ hp, hx, hp0, hx0 = self.hp, self.hx, self.hp0, self.hx0 hp, hx, hp0, hx0 = self._generate_burst()# self.hp, self.hx, self.hp0, self.hx0 hp0.data.data *= 0 hx0.data.data *= 0 Loading Loading @@ -373,7 +372,7 @@ class MDCSet(): The energy emitted in gravitational waves divided by the distance squared in M_solar / pc^2. """ hp, hx = self.hp, self.hx hp, hx, _, _ = self._generate_burst() self.egw.append(lalsimulation.MeasureEoverRsquared(hp, hx)) def _responses(self, row): Loading
minke/sources.py +4 −4 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ class Waveform(object): """ Produce a plot of the injection. """ self._generate() hp, hx = self._generate(half=True) f, ax = plt.subplots(1,2) times = np.arange(0, self.hp.deltaT*len(self.hp.data.data), self.hp.deltaT) ax[0].plot(times, self.hp.data.data, label="+ polarisation") Loading Loading @@ -139,7 +139,7 @@ class Waveform(object): hp0, hx0 = lalburst.GenerateSimBurst(self.swig_row, 1.0/rate) else: hp0, hx0 = hp, hx self.hp, self.hx, self.hp0, self.hx0 = hp, hx, hp0, hx0 return hp, hx, hp0, hx0 del(self.swig_row) Loading Loading @@ -362,8 +362,8 @@ class WhiteNoiseBurst(Waveform): # the old pyBurst code measured this by generating the waveform # which seems wasteful, but I'll replicate it here anyway, for # consistency with the method used for O1. self._generate(half=True) self.params['hrss'] = lalsimulation.MeasureHrss(self.hp, self.hx) hp, hx = self._generate(half=True) self.params['hrss'] = lalsimulation.MeasureHrss(hp, hx) class Supernova(Waveform): Loading