Loading .travis/setup_environment.sh +1 −1 Original line number Diff line number Diff line #! /bin/bash STARTLOC=$(pwd) LIBFRAME_VER=v8r26 LALBRANCH=sim_burst_numrel LALBRANCH=minke mkdir .local # CHECK IF WE'RE INSTALLING INTO A VIRTUALENV if [ -n "$VIRTUAL_ENV" ]; then Loading minke/mdctools.py +10 −9 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ class MDCSet(): waveform_row = waveform._row(sim) waveform_row.process_id = procrow.process_id sim.append(waveform_row) del waveform_row # Write out the xml and gzip it. utils.write_filename(xmldoc, filename, gz=True) Loading Loading @@ -186,10 +187,10 @@ class MDCSet(): A copy of the strain in the x polarisation """ #row = self.waveforms[row] self.swig_row = lalburst.CreateSimBurst() swig_row = lalburst.CreateSimBurst() for a in lsctables.SimBurstTable.validcolumns.keys(): try: setattr(self.swig_row, a, getattr( row, a )) setattr(swig_row, a, getattr( row, a )) except AttributeError: continue # we didn't define it except TypeError: print a, getattr(row,a) Loading @@ -198,12 +199,12 @@ class MDCSet(): self.swig_row.numrel_data = row.numrel_data except: pass hp, hx = lalburst.GenerateSimBurst(self.swig_row, 1.0/rate) hp, hx = lalburst.GenerateSimBurst(swig_row, 1.0/rate) # 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(self.swig_row, 1.0/rate) hp0, hx0 = lalburst.GenerateSimBurst(swig_row, 1.0/rate) self.hp, self.hx, self.hp0, self.hx0 = hp, hx, hp0, hx0 lalburst.DestroySimBurst(self.swig_row) lalburst.DestroySimBurst(swig_row) def _getDetector(self, det): """ Loading Loading @@ -347,10 +348,10 @@ class MDCSet(): # |H+Hx| hphx = (lalsimulation.MeasureHrss(hp, hx0)**2 - hrss**2)/2 self.strains.append([hrss, hphp, hxhx, hphx]) lal.DestroyREAL8Sequence(hp) lal.DestroyREAL8Sequence(hx) lal.DestroyREAL8Sequence(hp0) lal.DestroyREAL8Sequence(hx0) #lal.DestroyREAL8Sequence(hp) #lal.DestroyREAL8Sequence(hx) #lal.DestroyREAL8Sequence(hp0) #lal.DestroyREAL8Sequence(hx0) def _measure_egw_rsq(self, rate=16384.0): """ Loading minke/sources.py +20 −11 Original line number Diff line number Diff line Loading @@ -42,17 +42,17 @@ class Waveform(object): waveform = "Generic" expnum = 1 def __del__(self): try: lal.DestroyREAL8Sequence(self.hp) lal.DestroyREAL8Sequence(self.hx) except: print "Failed to destroy hp and hx" try: lal.DestroyREAL8Sequence(self.hp0) lal.DestroyREAL8Sequence(self.hx0) except: print "Failed to destroy hp0 and hx0" # def __del__(self): # try: # lal.DestroyREAL8Sequence(self.hp) # lal.DestroyREAL8Sequence(self.hx) # except: # print "Failed to destroy hp and hx" # try: # lal.DestroyREAL8Sequence(self.hp0) # lal.DestroyREAL8Sequence(self.hx0) # except: # print "Failed to destroy hp0 and hx0" def _clear_params(self): self.params = {} Loading Loading @@ -129,6 +129,8 @@ class Waveform(object): A copy of the strain in the x polarisation """ row = self._row() print "_generate" print "Make row" self.swig_row = lalburst.CreateSimBurst() for a in lsctables.SimBurstTable.validcolumns.keys(): try: Loading @@ -140,15 +142,22 @@ class Waveform(object): self.swig_row.numrel_data = row.numrel_data except: pass print "Make hp,hx" hp, hx = lalburst.GenerateSimBurst(self.swig_row, 1.0/rate) # FIXME: Totally inefficent --- but can we deep copy a SWIG SimBurst? # DW: I tried that, and it doesn't seem to work :/ if not half : print "Make hp0, h0" 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 # try: print "Destroy simburst" lalburst.DestroySimBurst(self.swig_row) # except: # pass print "end_generate" def _row(self, sim=None, slide_id=1): """ Loading Loading
.travis/setup_environment.sh +1 −1 Original line number Diff line number Diff line #! /bin/bash STARTLOC=$(pwd) LIBFRAME_VER=v8r26 LALBRANCH=sim_burst_numrel LALBRANCH=minke mkdir .local # CHECK IF WE'RE INSTALLING INTO A VIRTUALENV if [ -n "$VIRTUAL_ENV" ]; then Loading
minke/mdctools.py +10 −9 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ class MDCSet(): waveform_row = waveform._row(sim) waveform_row.process_id = procrow.process_id sim.append(waveform_row) del waveform_row # Write out the xml and gzip it. utils.write_filename(xmldoc, filename, gz=True) Loading Loading @@ -186,10 +187,10 @@ class MDCSet(): A copy of the strain in the x polarisation """ #row = self.waveforms[row] self.swig_row = lalburst.CreateSimBurst() swig_row = lalburst.CreateSimBurst() for a in lsctables.SimBurstTable.validcolumns.keys(): try: setattr(self.swig_row, a, getattr( row, a )) setattr(swig_row, a, getattr( row, a )) except AttributeError: continue # we didn't define it except TypeError: print a, getattr(row,a) Loading @@ -198,12 +199,12 @@ class MDCSet(): self.swig_row.numrel_data = row.numrel_data except: pass hp, hx = lalburst.GenerateSimBurst(self.swig_row, 1.0/rate) hp, hx = lalburst.GenerateSimBurst(swig_row, 1.0/rate) # 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(self.swig_row, 1.0/rate) hp0, hx0 = lalburst.GenerateSimBurst(swig_row, 1.0/rate) self.hp, self.hx, self.hp0, self.hx0 = hp, hx, hp0, hx0 lalburst.DestroySimBurst(self.swig_row) lalburst.DestroySimBurst(swig_row) def _getDetector(self, det): """ Loading Loading @@ -347,10 +348,10 @@ class MDCSet(): # |H+Hx| hphx = (lalsimulation.MeasureHrss(hp, hx0)**2 - hrss**2)/2 self.strains.append([hrss, hphp, hxhx, hphx]) lal.DestroyREAL8Sequence(hp) lal.DestroyREAL8Sequence(hx) lal.DestroyREAL8Sequence(hp0) lal.DestroyREAL8Sequence(hx0) #lal.DestroyREAL8Sequence(hp) #lal.DestroyREAL8Sequence(hx) #lal.DestroyREAL8Sequence(hp0) #lal.DestroyREAL8Sequence(hx0) def _measure_egw_rsq(self, rate=16384.0): """ Loading
minke/sources.py +20 −11 Original line number Diff line number Diff line Loading @@ -42,17 +42,17 @@ class Waveform(object): waveform = "Generic" expnum = 1 def __del__(self): try: lal.DestroyREAL8Sequence(self.hp) lal.DestroyREAL8Sequence(self.hx) except: print "Failed to destroy hp and hx" try: lal.DestroyREAL8Sequence(self.hp0) lal.DestroyREAL8Sequence(self.hx0) except: print "Failed to destroy hp0 and hx0" # def __del__(self): # try: # lal.DestroyREAL8Sequence(self.hp) # lal.DestroyREAL8Sequence(self.hx) # except: # print "Failed to destroy hp and hx" # try: # lal.DestroyREAL8Sequence(self.hp0) # lal.DestroyREAL8Sequence(self.hx0) # except: # print "Failed to destroy hp0 and hx0" def _clear_params(self): self.params = {} Loading Loading @@ -129,6 +129,8 @@ class Waveform(object): A copy of the strain in the x polarisation """ row = self._row() print "_generate" print "Make row" self.swig_row = lalburst.CreateSimBurst() for a in lsctables.SimBurstTable.validcolumns.keys(): try: Loading @@ -140,15 +142,22 @@ class Waveform(object): self.swig_row.numrel_data = row.numrel_data except: pass print "Make hp,hx" hp, hx = lalburst.GenerateSimBurst(self.swig_row, 1.0/rate) # FIXME: Totally inefficent --- but can we deep copy a SWIG SimBurst? # DW: I tried that, and it doesn't seem to work :/ if not half : print "Make hp0, h0" 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 # try: print "Destroy simburst" lalburst.DestroySimBurst(self.swig_row) # except: # pass print "end_generate" def _row(self, sim=None, slide_id=1): """ Loading