Commit ca1c2ee0 authored by Tyson Littenberg's avatar Tyson Littenberg
Browse files

removed vestigial _1_ from BW output, fixed healpix labeling scheme, updates to user's guide


git-svn-id: https://svn.ligo.caltech.edu/svn/bayeswave/trunk@237 c56465c9-8126-4a4f-9d7d-ac845eff4865
parent 2fee0107
I added this line to the file.
-- BASIC USE --
To check out the SVN:
svn checkout https://svn.ligo.caltech.edu/svn/bayeswave
To add a new file (or directory):
svn add README.txt
svn commit -m "Fist commit"
To make the first import, copy the source code into the "trunk" directory. Then,
move into the trunk directory, and run
svn add CODEDIRECTORY
svn commit -m "Tyson's first commit"
The "add" command tells the SVN to start tracking that particular file, and only
gets run once per new file. The commit command pushes your changes to the remote server.
Run this command every time you have some changes that you want to keep.
To pull changes from the server to your local copy, run
svn update
A good habit is to run "svn update" every time you sit down to start work, and
run "svn commit" every time you are finished for the day.
- ADVANCED -
The "branches" and "tags" directories are not special, but are just place holders
in case we want to merge or make "releases" at some point.
svn copy /trunk/src /branches/crazy_prototype
Then, if we want these things back in the trunk, you run
svn merge /branches/crazy_protoype /trunk/src
......@@ -524,10 +524,10 @@ def plot_likelihood_1(modelList, plotsDir):
else:
colour = 'red'
try:
temp, likehood, error = np.recfromtxt(str(jobName)+"{0}_1_evidence.dat".format(mod), unpack=True)
temp, likehood, error = np.recfromtxt(str(jobName)+"{0}_evidence.dat".format(mod), unpack=True)
except:
try:
temp, likehood = np.recfromtxt(str(jobName)+"{0}_1_evidence.dat".format(mod), unpack=True)
temp, likehood = np.recfromtxt(str(jobName)+"{0}_evidence.dat".format(mod), unpack=True)
except:
continue
error = np.zeros(likehood.shape)
......@@ -551,10 +551,10 @@ def plot_likelihood_2(modelList, plotsDir):
else:
colour = 'red'
try:
temp, likehood, error = np.recfromtxt(str(jobName)+"{0}_1_evidence.dat".format(mod), unpack=True)
temp, likehood, error = np.recfromtxt(str(jobName)+"{0}_evidence.dat".format(mod), unpack=True)
except:
try:
temp, likehood = np.recfromtxt(str(jobName)+"{0}_1_evidence.dat".format(mod), unpack=True)
temp, likehood = np.recfromtxt(str(jobName)+"{0}_evidence.dat".format(mod), unpack=True)
except:
continue
error = np.zeros(likehood.shape)
......@@ -577,7 +577,7 @@ def plot_model_dims(modelList, ifoList, ifoNames, plotsDir):
cleanChains = []
# -- Read in data
for mod in modelList:
intChainFile = 'chains/'+str(jobName)+"{0}_1_intchain.dat.0".format(mod)
intChainFile = 'chains/'+str(jobName)+"{0}_intchain.dat.0".format(mod)
chains = np.loadtxt(intChainFile)
chains = np.transpose(chains)
if mod == modelList[0]:
......@@ -1019,7 +1019,7 @@ for mod in modelList:
# -----------------------
# Plot the median PSDs
# -----------------------
##fileList = glob.glob('waveforms/'+str(jobName)+'clean_1_psd_*.dat.{0}'.format(ifo))
##fileList = glob.glob('waveforms/'+str(jobName)+'clean_psd_*.dat.{0}'.format(ifo))
##if not len(fileList) == 0:
## count=0
......
......@@ -76,7 +76,7 @@ def make_skyview(directory='.', mdc=None, NSIDE=256, results=None):
# -- Input skymap data
# num, L, ralist, sin_dec, psi, e, dA, dphi, dt = np.loadtxt(filename, unpack=True)
print "Extracting RA/DEC samples"
filename = './chains/signal_1_extchain.dat.0'
filename = './chains/signal_extchain.dat.0'
data = np.loadtxt(filename, unpack=True)
ralist = data[2]
sin_dec = data[3]
......@@ -130,13 +130,13 @@ def make_skyview(directory='.', mdc=None, NSIDE=256, results=None):
os.makedirs('./plots')
# -- Plot the skymap and injection location
skymap = kde.as_healpix(NSIDE)
hp.mollview(skymap, title='Skymap from KDE clusters')
skymap = kde.as_healpix(NSIDE, nest=True)
hp.mollview(skymap, title='Skymap from KDE clusters', nest=True)
if mdc is not None:
hp.projscatter(injtheta, injra, s=200, c='yellow', marker=(5,1), alpha=0.5)
plt.savefig('plots/skymap.png')
plt.close()
hp.write_map("skymap_{0}.fits".format(gps), skymap)
hp.write_map("skymap_{0}.fits".format(gps), skymap, nest=True)
# -- Calculate the 50 and 90% credible intervals
......
This diff is collapsed.
......@@ -353,7 +353,7 @@ int main(int argc, char *argv[])
{
//Get BayesLine parameter files
sprintf(filename,"chains/%sclean_1_lorentzchain_ifo%i.dat.0",data->runName,ifo);
sprintf(filename,"chains/%sclean_lorentzchain_ifo%i.dat.0",data->runName,ifo);
linechain = fopen(filename,"r");
if(linechain==NULL)
{
......@@ -361,7 +361,7 @@ int main(int argc, char *argv[])
return 1;
}
sprintf(filename,"chains/%sclean_1_splinechain_ifo%i.dat.0",data->runName,ifo);
sprintf(filename,"chains/%sclean_splinechain_ifo%i.dat.0",data->runName,ifo);
splinechain = fopen(filename,"r");
if(splinechain==NULL)
{
......@@ -780,7 +780,7 @@ int main(int argc, char *argv[])
/********************************/
//File containing signal-model waveform parameters
sprintf(filename,"chains/%ssignal_1_wavechain.dat.0",data->runName);
sprintf(filename,"chains/%ssignal_wavechain.dat.0",data->runName);
FILE *signalParams;
if( (signalParams = fopen(filename,"r")) == NULL)
......@@ -948,7 +948,7 @@ int main(int argc, char *argv[])
FILE **glitchParams = malloc(NI*sizeof(FILE *));
sprintf(filename,"chains/%sglitch_1_glitchchain_ifo0.dat.0",data->runName);
sprintf(filename,"chains/%sglitch_glitchchain_ifo0.dat.0",data->runName);
if( (glitchParams[0] = fopen(filename,"r")) == NULL)
{
......@@ -964,7 +964,7 @@ int main(int argc, char *argv[])
for(ifo=1; ifo<NI; ifo++)
{
sprintf(filename,"chains/%sglitch_1_glitchchain_ifo%i.dat.0",data->runName,ifo);
sprintf(filename,"chains/%sglitch_glitchchain_ifo%i.dat.0",data->runName,ifo);
glitchParams[ifo] = fopen(filename,"r");
glitch[ifo] = model->glitch[ifo];
......@@ -1069,7 +1069,7 @@ int main(int argc, char *argv[])
FILE **cleanParams = malloc(NI*sizeof(FILE *));
sprintf(filename,"chains/%sclean_1_glitchchain_ifo0.dat.0",data->runName);
sprintf(filename,"chains/%sclean_glitchchain_ifo0.dat.0",data->runName);
if( (cleanParams[0] = fopen(filename,"r")) == NULL)
{
fprintf(stdout,"Could not find %s. Finishing...\n",filename);
......@@ -1085,7 +1085,7 @@ int main(int argc, char *argv[])
for(ifo=1; ifo<NI; ifo++)
{
sprintf(filename,"chains/%sclean_1_glitchchain_ifo%i.dat.0",data->runName,ifo);
sprintf(filename,"chains/%sclean_glitchchain_ifo%i.dat.0",data->runName,ifo);
cleanParams[ifo] = fopen(filename,"r");
glitch[ifo] = model->glitch[ifo];
......
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