Commit b8584b14 authored by Jonah Kanner's avatar Jonah Kanner 🤓
Browse files

Updates to megasky for injections drawn from prior


git-svn-id: https://svn.ligo.caltech.edu/svn/bayeswave/trunk@378 c56465c9-8126-4a4f-9d7d-ac845eff4865
parent e523eb26
......@@ -143,6 +143,13 @@ def make_skyview(directory='.', mdc=None, NSIDE=256, ra=None, dec=None, results=
injdec = np.pi/2 - injtheta
print injtheta, injra
# -- Special handling for injections drawn from prior
if params.ra is not None:
injdec = params.dec
injra = params.ra
injtheta = np.pi/2 - injdec
mdc = True
# -- Make plots directory, if needed
plotsDir = './plots'
if not os.path.exists(plotsDir):
......
......@@ -12,7 +12,7 @@ CCFLAGS = -Wall -O3 -std=gnu99 -march=native -mtune=native -Wl,--unresolved-symb
OBJS = Subroutines.o BayesLine.o
all: $(OBJS) BayesWaveBurst BayesWavePost BayesWavePostPEC
all: $(OBJS) BayesWaveBurst BayesWavePost
BayesLine.o : BayesLine.c BayesLine.h
condor_compile gcc $(CCFLAGS) -c BayesLine.c $($INCDIR:%=-I%)
......
......@@ -17,6 +17,8 @@ class BwbParams:
# -- Initialize variables
ifoNames = []
self.bayesline = False
self.ra = None
self.dec = None
# -- Determine name of job
......@@ -54,6 +56,17 @@ class BwbParams:
# -- Parse command line arguments
cmdline = runfile.readline().split(' ')
foundit = False
for line in runfile:
print line
if foundit:
self.ra = float(line.split()[1])
sin_dec = float(line.split()[2])
self.dec = np.arcsin(sin_dec)
break
if line.find('== Signal Injection ==') > 0:
foundit = True
runfile.close()
for index, arg in enumerate(cmdline):
......
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