Commit ddeffa82 authored by James Clark's avatar James Clark
Browse files

updated mega scripts to reflect module reorganisation

parent ce54a2b8
#!/usr/bin/env python
#!/bin/python
"""
This script generates a webpage to display the results of a BayesWave run.
......@@ -27,7 +27,7 @@ import os
import pwd
import subprocess
import sys
import re,subprocess
import re
print 'Path to megaplot: '
print sys.argv[0]
......@@ -43,38 +43,18 @@ except IndexError:
workdir=os.getcwd()
os.chdir(workdir)
# See: http://pyinstaller.readthedocs.io/en/latest/runtime-information.html
if getattr(sys, 'frozen', False):
# we are running in a bundle
print 'Running as compiled binary'
postprocesspath = sys._MEIPASS
svn_info = open(os.path.join(postprocesspath, 'svn_info.txt'),'r')
print "---- SVN INFO ---- "
for info_line in svn_info.readlines():
print info_line
svn_info.close()
# FIXME: figure out svn rev number from file
svn_rev = 0
print "---- END SVN INFO ---- "
import pkg_resources
postprocesspath = pkg_resources.resource_filename('bayeswave_plot',
'../bayeswave_plot_data/')
else:
# we are running in a normal Python environment
print 'Running as interpreted script'
postprocesspath = os.path.dirname(os.path.abspath(__file__))
print 'svn revision: '
try:
svn_rev = os.system("svn info "+postprocesspath+" | grep \"Revision\" | awk '{print $2}'")
except:
print 'Couldn\'t find svn version from directory: ', postprocesspath
print '\n'
#sys.path.insert(0,'/Users/megmillhouse/Desktop/O1/O2dev/cycler-0.10.0/')
print 'svn revision: '
try:
svn_rev = os.system("svn info "+postprocesspath+" | grep \"Revision\" | awk '{print $2}'")
except:
print 'Couldn\'t find svn version from directory: ', postprocesspath
print '\n'
#from cycler import cycler
from scipy import integrate
######################################################################################################################
......
......@@ -10,7 +10,7 @@ import sys
from pylal.xlal.datatypes.ligotimegps import LIGOTimeGPS
#from pylal.xlal.date import XLALGreenwichSiderealTime
from lal import GreenwichSiderealTime
import find_trig as ft
from bayeswave_plot import find_trig as ft
import healpy as hp
from subprocess import call
# from scipy.optimize import curve_fit
......@@ -18,7 +18,7 @@ import acor
from pylal import bayespputils
import sky_area.sky_area_clustering as sky
import getopt
from readbwb import BwbParams
from bayeswave_plot.readbwb import BwbParams
import math
#import lalinference.fits as lf
......
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