Skip to content

Commit

Permalink
Merge pull request #42 from a-r-williamson/pygrb_changes
Browse files Browse the repository at this point in the history
Fixing issues due to changes in pygrb dependencies
  • Loading branch information
pannarale authored Jun 26, 2017
2 parents b30df81 + f14ebcb commit 222a8c4
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 18 deletions.
26 changes: 14 additions & 12 deletions bin/pylal_cbc_cohptf_efficiency
Original file line number Diff line number Diff line change
Expand Up @@ -1581,12 +1581,12 @@ def main(segdir, outdir, trigFile, foundFile, missedFile,\
fig = plt.figure()
ax = fig.gca()
if len(gFoundMchirp):
ax.scatter(gFoundMchirp, gFoundEffDist, c="b", marker='x',\
ax.scatter(gFoundMchirp, gFoundEffDist, c="g", marker='x',\
edgecolors='g')
if len(gIFARMchirp):
p = ax.scatter(gIFARMchirp, gIFAREffDist, c=gIFARStat,\
norm=colors.Normalize(0,1,clip=False), marker='o',\
edgecolors='none')
edgecolors='none', cmap=cm.plasma)
if len(gMissed2Mchirp):
ax.scatter(gMissed2Mchirp, gMissed2EffDist, c="r", marker='x',\
edgecolors='r')
Expand Down Expand Up @@ -1616,7 +1616,7 @@ def main(segdir, outdir, trigFile, foundFile, missedFile,\
if len(gIFARMchirp):
p = ax.scatter(gIFARMchirp, gIFAREffDist, c=gIFARStat,\
norm=colors.Normalize(0,1,clip=False), marker='o',\
edgecolors='none')
edgecolors='none', cmap=cm.plasma)
if len(gFoundMchirp):
ax.scatter(gFoundMchirp, gFoundEffDist, c="b", marker='x',\
edgecolors='g')
Expand All @@ -1639,7 +1639,7 @@ def main(segdir, outdir, trigFile, foundFile, missedFile,\
if len(gIFARTime):
p = ax.scatter(gIFARTime, gIFAREffDist, c=gIFARStat,\
norm=colors.Normalize(0,1,clip=False), marker='o',\
edgecolors='none')
edgecolors='none', cmap=cm.plasma)
if len(gMissed2Time):
ax.scatter(gMissed2Time, gMissed2EffDist, c="r", marker='x',\
edgecolors='r')
Expand Down Expand Up @@ -1670,7 +1670,7 @@ def main(segdir, outdir, trigFile, foundFile, missedFile,\
if len(gIFARTime):
p = ax.scatter(gIFARTime, gIFAREffDist, c=gIFARStat,\
norm=colors.Normalize(0,1,clip=False), marker='o',\
edgecolors='none')
edgecolors='none', cmap=cm.plasma)
if len(gFoundTime):
ax.scatter(gFoundTime, gFoundEffDist, c="b", marker='x', edgecolors='g')
ax.grid()
Expand Down Expand Up @@ -1706,7 +1706,7 @@ def main(segdir, outdir, trigFile, foundFile, missedFile,\
gIFARSpin2 = np.sqrt(gIFARSpin2x**2 + gIFARSpin2y**2 + gIFARSpin2z**2)
p = ax.scatter(gIFARSpin1, gIFARSpin2, c=gIFARStat,
norm=colors.Normalize(0, 1, clip=False), marker="o",
edgecolors="none")
edgecolors="none", cmap=cm.plasma)
if len(missedInjSpin1x):
ax.scatter(missedInjSpin1, missedInjSpin2, c="k", marker="x",
edgecolors="k")
Expand Down Expand Up @@ -1738,7 +1738,8 @@ def main(segdir, outdir, trigFile, foundFile, missedFile,\
ax.scatter(gFoundm1, gFoundm2, c="g", marker="x", edgecolors="g")
if len(gIFARm1):
p = ax.scatter(gIFARm1, gIFARm2, c=gIFARStat, edgecolors="none",
norm=colors.Normalize(0, 1, clip=False), marker="o")
norm=colors.Normalize(0, 1, clip=False), marker="o",
cmap=cm.plasma)
if len(missedInjm1):
ax.scatter(missedInjm1, missedInjm2, c="k", marker="x", edgecolors="k")
if len(gMissed2m1):
Expand All @@ -1764,7 +1765,8 @@ def main(segdir, outdir, trigFile, foundFile, missedFile,\
ax.scatter(gFoundMchirp, gFoundInc, c="g", marker="x", edgecolors="g")
if len(gIFARInc):
p = ax.scatter(gIFARMchirp, gIFARInc, c=gIFARStat, edgecolors="none",
norm=colors.Normalize(0, 1, clip=False), marker="o")
norm=colors.Normalize(0, 1, clip=False), marker="o",
cmap=cm.plasma)
if len(gMissed2Inc):
ax.scatter(gMissed2Mchirp, gMissed2Inc, c="r", marker="x",
edgecolors="r")
Expand Down Expand Up @@ -1807,7 +1809,7 @@ def main(segdir, outdir, trigFile, foundFile, missedFile,\
if len(gIFARMchirp):
p = ax.scatter(gIFARMchirp, gIFAREffSiteDist[site],\
c=gIFARStat, norm=colors.Normalize(0,1,clip=False),\
marker='o', edgecolors='none')
marker='o', edgecolors='none', cmap=cm.plasma)
ax.semilogy()
if len(gIFARMchirp):
cb = ax.figure.colorbar(p)
Expand Down Expand Up @@ -1835,7 +1837,7 @@ def main(segdir, outdir, trigFile, foundFile, missedFile,\
if len(gIFARTime):
p = ax.scatter(gIFARTime ,gIFAREffSiteDist[site],\
c=gIFARStat, norm=colors.Normalize(0,1,clip=False),\
marker='o', edgecolors='none')
marker='o', edgecolors='none', cmap=cm.plasma)
ax.semilogy()
if len(gIFARTime):
cb = ax.figure.colorbar(p)
Expand All @@ -1862,7 +1864,7 @@ def main(segdir, outdir, trigFile, foundFile, missedFile,\
if len(gIFARMchirp):
p = ax.scatter(gIFARMchirp, gIFARDist, c=gIFARStat,\
norm=colors.Normalize(0,1,clip=False),\
marker='o', edgecolors='none')
marker='o', edgecolors='none', cmap=cm.plasma)
ax.semilogy()
if len(gIFARMchirp):
cb = ax.figure.colorbar(p)
Expand All @@ -1887,7 +1889,7 @@ def main(segdir, outdir, trigFile, foundFile, missedFile,\
if len(gIFARTime):
p = ax.scatter(gIFARTime, gIFARDist, c=gIFARStat,\
norm=colors.Normalize(0,1,clip=False),\
marker='o', edgecolors='none')
marker='o', edgecolors='none', cmap=cm.plasma)
ax.semilogy()
if len(gIFARTime):
cb = ax.figure.colorbar(p)
Expand Down
4 changes: 2 additions & 2 deletions bin/pylal_cbc_cohptf_injcombiner
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ from __future__ import division
import os,sys,glob,re
from optparse import OptionParser
from pylal import SimInspiralUtils,MultiInspiralUtils,git_version
from glue.ligolw import ilwd,ligolw,table,lsctables,utils
from glue import segments,segmentsUtils,lal
from pycbc_glue.ligolw import ilwd,ligolw,table,lsctables,utils
from pycbc_glue import segments,segmentsUtils,lal
from pylal.dq import dqSegmentUtils
from pylal.coh_PTF_pyutils import append_process_params,remove_bad_injections,identify_bad_injections,sim_inspiral_get_theta

Expand Down
8 changes: 4 additions & 4 deletions pylal/SimInspiralUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
#

from pylal.xlal.datatypes.ligotimegps import LIGOTimeGPS
from glue.ligolw import table
from glue.ligolw import lsctables
from glue.ligolw import utils
from glue.ligolw import ligolw
from pycbc_glue.ligolw import table
from pycbc_glue.ligolw import lsctables
from pycbc_glue.ligolw import utils
from pycbc_glue.ligolw import ligolw
#
# =============================================================================
#
Expand Down
3 changes: 3 additions & 0 deletions pylal/legacy_ihope.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@ def create_node(self, trig_files=None, segment_dir=None, analysis_seg=None,
if all(t.node.executable.name == "trig_cluster" for t in trig_files):
node.add_opt('--input-files',
" ".join([t.storage_path for t in trig_files]))
if self.cp.has_option_tag('inspiral', 'do-short-slides',
'coherent_no_injections'):
node.add_opt('--short-slides')
else:
node.add_input_list_opt('--input-files', trig_files)

Expand Down

0 comments on commit 222a8c4

Please sign in to comment.