Commit 95fb1a43 authored by Kipp Cannon's avatar Kipp Cannon
Browse files

burst clean-up

- remove a bunch of defunt burst code
- move some functions from lalburst that are used only by
  lalapps_StringSearch to that location (where they are expected to be
  deleted later)
- convert xfig images to inkscape SVGs
parent e1f6f721
......@@ -28,21 +28,17 @@ pybin_scripts = \
lalapps_power_calc_likelihood \
lalapps_power_final \
lalapps_power_likelihood_pipe \
lalapps_power_online_pipe \
lalapps_power_pipe \
lalapps_power_plot_binjtf \
lalapps_power_plot_burca2 \
lalapps_power_plot_burst \
lalapps_power_plot_burstrate \
lalapps_power_plot_binj \
lalapps_power_plot_burca \
lalapps_power_plot_detresponse \
lalapps_power_veto \
lalapps_xml_plotlalseries
lalapps_power_veto
pkgpython_PYTHON = power.py
endif
pkgdata_DATA = power_pipe.ini power_online_pipe.ini
pkgdata_DATA = power_pipe.ini
EXTRA_DIST += \
H1_L1_dt125_df128.png \
......@@ -56,7 +52,6 @@ EXTRA_DIST += \
plotbinj_L1_5.png \
plotburca2-P-793154128-2525061.png \
power.dox \
power_online_pipe.ini \
power_pipe.ini \
psds.png \
sk_histogram.png \
......
Power tasks:
============
o Make sure can filter auxilliary channels
o Fix injection codes to be able to take arbitrary signals
- this is a substantial job, needs a couple of weeks
- could plan to work with h(t) for now
Burst-inspiral coincidence:
==========================
* Write code to do burst inspiral coincidence
/*
* Copyright (C) 2007 Saikat Ray-Majumder
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with with program; see the file COPYING. If not, write to the Free
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307 USA
*/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <lal/LALStdio.h>
#include <lal/LALgetopt.h>
#include <lal/LALStdlib.h>
#include <lal/Date.h>
#include <lal/LIGOLwXML.h>
#include <lal/LIGOLwXMLRead.h>
#include <lal/LIGOMetadataTables.h>
#include <lal/LIGOMetadataUtils.h>
#include <lal/LALCache.h>
#include <lal/LALInspiral.h>
#include <lalapps.h>
#define MAXSTR 2048
/* Usage format string. */
#define USAGE "Usage: %s --mass1 mass(Msun) --mass2 mass(Msun)" \
"--flow low_freq(Hz)" \
"[--help]\n"
#define MSUNINSEC ( 4.9255*1e-6 ) /* solar mass in sec */
static REAL4
XLALMergerFrequency(
InspiralTemplate *params
)
{
REAL4 fmerger;
fmerger = 205 * (20/params->totalMass);
return(fmerger);
}
static REAL4
XLALQnrFrequency(
InspiralTemplate *params
)
{
REAL4 fqnr;
fqnr = 1320 * (20/params->totalMass);
return(fqnr);
}
static REAL4
XLALMergerEnergyFraction(
InspiralTemplate *params
)
{
REAL4 e_merger = 0.0;
e_merger = 0.1 * 16 * params->mu * params->mu /params->totalMass;
return(e_merger);
}
static void
XLALMergerDuration(
InspiralTemplate *params,
MergerDurationLimits *dur
)
{
dur->high = 50 * params->totalMass;
dur->low = 10 * params->totalMass;
}
/*
* Command-line options
*/
struct options_t {
int verbose;
REAL8 mass1;
REAL8 mass2;
REAL8 flow;
};
/*
* Set defaults for command-line options.
*
*/
static void set_option_defaults(struct options_t *options)
{
options->verbose = 0;
options->mass1 = 0.0;
options->mass2 = 0.0;
options->flow = 0.0;
}
/*
* Parse command line arguments.
*/
static void parse_command_line(int argc, char **argv, struct options_t *options)
{
struct LALoption long_options[] = {
/* these options set a flag */
{"verbose", no_argument, &options->verbose, 1},
/* parameters which determine the output xml file */
{"mass1", required_argument, NULL, 'a'},
{"mass2", required_argument, NULL, 'b'},
{"flow", required_argument, NULL, 'c'},
{"help", no_argument, NULL, 'o'},
{NULL, 0, NULL, 0}
};
int c;
int option_index;
do {
switch(c = LALgetopt_long(argc, argv, "a:b:c:", long_options, &option_index)) {
case -1:
case 0:
break;
case 'a':
/*
* file containing list of xml files to use
*/
options->mass1 = atoi(LALoptarg);
break;
case 'b':
/*
* output cache file name
*/
options->mass2 = atoi(LALoptarg);
break;
case 'c':
/*
* output cache file name
*/
options->flow = atof(LALoptarg);
break;
case ':':
case '?':
case 'o':
default:
/*
* print usage
*/
LALPrintError(USAGE, *argv);
exit(1);
}
} while(c != -1);
if(LALoptind < argc) {
fprintf(stderr, "extraneous command line arguments:\n");
while(LALoptind < argc)
fprintf(stderr, "%s\n", argv[LALoptind++]);
exit(1);
}
}
/*
* Entry Point
*/
int main(int argc, char **argv)
{
static LALStatus stat;
struct options_t options;
InspiralTemplate params;
REAL4 fmerger = 0.0;
REAL4 fqnr = 0.0;
REAL4 e_merger = 0.0;
MergerDurationLimits dur;
FILE *fp = NULL;
/*
* Initialize things
*/
set_option_defaults(&options);
parse_command_line(argc, argv, &options);
params.mass1 = options.mass1;
params.mass2 = options.mass2;
params.fLower = options.flow;
params.massChoice = m1Andm2;
/* generate the template parameters */
LAL_CALL( LALInspiralParameterCalc(&stat, &params), &stat);
params.mu = (params.mass1 * params.mass2)/params.totalMass;
/*merger frequency */
fmerger = XLALMergerFrequency(&params);
/*qnr frequency */
fqnr = XLALQnrFrequency(&params);
/*merger energy fraction */
e_merger = XLALMergerEnergyFraction(&params);
/*merger duration limits in units of M_sun*/
XLALMergerDuration(&params, &dur);
fp = fopen("MergerParams.dat","w");
fprintf(fp,"mass1(Msun) mass2(Msun) totalMass(Msun) mu(Msun) t_insp(seconds) f_merger(Hz) f_qnr(Hz) e_merger(Msun) duration(max)(seconds) duration(minimum)(seconds)\n");
fprintf(fp,"%f %f %f %f %f %f %f %f %f %f\n",params.mass1, params.mass2, params.totalMass, params.mu, params.t0, fmerger, fqnr, e_merger, dur.high * MSUNINSEC, dur.low * MSUNINSEC);
fclose(fp);
exit(0);
}
#FIG 3.2 Produced by xfig version 3.2.5-alpha5
Landscape
Center
Metric
A4
100.00
Single
-2
1200 2
6 -45 -45 3195 225
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
0 0 0 180
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
450 0 450 180
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
45 0 0 45
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
90 0 0 90
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
135 0 0 135
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
180 0 0 180
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
225 0 45 180
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
270 0 90 180
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
315 0 135 180
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
360 0 180 180
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
405 0 225 180
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
450 0 270 180
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
450 45 315 180
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
450 90 360 180
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
450 135 405 180
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
3150 0 3150 180
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
2700 0 2700 180
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
2880 0 2700 180
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
2925 0 2745 180
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
2970 0 2790 180
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
3015 0 2835 180
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
3060 0 2880 180
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
3105 0 2925 180
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
3150 0 2970 180
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
2745 0 2700 45
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
2790 0 2700 90
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
2835 0 2700 135
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
3150 45 3015 180
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
3150 90 3060 180
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
3150 135 3105 180
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
0 90 3150 90
-6
6 1755 180 4995 450
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
1800 225 1800 405
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
2250 225 2250 405
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
1845 225 1800 270
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
1890 225 1800 315
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
1935 225 1800 360
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
1980 225 1800 405
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
2025 225 1845 405
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
2070 225 1890 405
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
2115 225 1935 405
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
2160 225 1980 405
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
2205 225 2025 405
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
2250 225 2070 405
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
2250 270 2115 405
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
2250 315 2160 405
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
2250 360 2205 405
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
4950 225 4950 405
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
4500 225 4500 405
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
4680 225 4500 405
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
4725 225 4545 405
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
4770 225 4590 405
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
4815 225 4635 405
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
4860 225 4680 405
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
4905 225 4725 405
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
4950 225 4770 405
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
4545 225 4500 270
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
4590 225 4500 315
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
4635 225 4500 360
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
4950 270 4815 405
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
4950 315 4860 405
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
4950 360 4905 405
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
1800 315 4950 315
-6
6 -495 675 5445 945
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-450 720 -450 900
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
0 720 0 900
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-405 720 -450 765
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-360 720 -450 810
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-315 720 -450 855
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-270 720 -450 900
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-225 720 -405 900
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-180 720 -360 900
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-135 720 -315 900
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-90 720 -270 900
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-45 720 -225 900
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
0 720 -180 900
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
0 765 -135 900
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
0 810 -90 900
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
0 855 -45 900
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-450 810 5400 810
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
5400 720 5400 900
2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
4950 720 4950 900
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
5130 720 4950 900
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
5175 720 4995 900
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
5220 720 5040 900
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
5265 720 5085 900
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
5310 720 5130 900
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
5355 720 5175 900
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
5400 720 5220 900
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
4995 720 4950 765
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
5040 720 4950 810
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
5085 720 4950 855
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
5400 765 5265 900
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
5400 810 5310 900
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
5400 855 5355 900
-6
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
0 -225 0 1125
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
4950 -225 4950 630
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
4950 -225 4950 630
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
4950 -225 4950 630
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
4950 -225 4950 630
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
4950 -225 4950 630
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
4950 -225 4950 630
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
4950 -225 4950 630
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
4950 -225 4950 630
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
4950 -225 4950 630
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
4950 -225 4950 630
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
4950 -225 4950 630
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
4950 -225 4950 630
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
4950 -225 4950 630
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
4950 -225 4950 630
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
4950 -225 4950 630
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
4950 -225 4950 630
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
4950 -225 4950 630
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
4950 -225 4950 630
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
1800 -225 1800 1125
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
3150 -225 3150 1125
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
4950 -225 4950 1125
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
-450 -225 -450 1125
2 1 1 1 -1 7 50 -1 -1 4.000 0 0 -1 0 0 2
5400 -225 5400 1125
4 0 -1 50 -1 -1 10 0.0000 6 105 75 -495 -270 0\001
4 0 -1 50 -1 -1 10 0.0000 6 105 300 -45 -270 8192\001
4 0 -1 50 -1 -1 10 0.0000 6 105 375 1755 -270 40960\001
4 0 -1 50 -1 -1 10 0.0000 6 105 375 3105 -270 65536\001
4 0 -1 50 -1 -1 10 0.0000 6 105 375 4905 -270 98304\001
4 0 -1 50 -1 -1 10 0.0000 6 105 450 5355 -270 106496\001
lalapps/src/power/conditioning.png

3.29 KB | W: | H:

lalapps/src/power/conditioning.png

6.91 KB | W: | H:

lalapps/src/power/conditioning.png
lalapps/src/power/conditioning.png
lalapps/src/power/conditioning.png
lalapps/src/power/conditioning.png
  • 2-up
  • Swipe
  • Onion skin
#
# Copyright (C) 2005 Kipp C. Cannon
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# =============================================================================
#
# Preamble
#
# =============================================================================
#
"""
Pipeline generation script for the excess power online analysis.
"""
import ConfigParser
from optparse import OptionParser
import os
import sys
import tempfile
import lal
from glue import pipeline
from glue import segments
from glue import segmentsUtils
from lalapps import power
__author__ = "Kipp Cannon <kipp@gravity.phys.uwm.edu>"
__date__ = "$Date$"
__version__ = "$Revision$"
#
# =============================================================================
#
# Command Line
#
# =============================================================================
#
def parse_command_line():
parser = OptionParser(
version="%prog CVS $Id$"
)
parser.add_option("-s", "--data-start", metavar = "GPSSECONDS", help = "set data segment start time")
parser.add_option("-e", "--data-end", metavar = "GPSSECONDS", help = "set data segment end time")
parser.add_option("-a", "--trig-start", metavar = "GPSSECONDS", help = "set analysis segment start time")
parser.add_option("-b", "--trig-end", metavar = "GPSSECONDS", help = "set analysis segment end time")
parser.add_option("-f", "--dag-name", metavar = "FILENAME", help = "set output .dag file name")
parser.add_option("-t", "--aux-dir", metavar = "PATH", help = "set auxiliary data directory")
parser.add_option("--condor-log-dir", metavar = "PATH", help = "set directory for Condor log")
parser.add_option("--config-file", metavar = "FILENAME", default = "online_power.ini", help = "set .ini config file name")
parser.add_option("--instrument", metavar = "INSTRUMENT", help = "set instrument name (default = value of instrument variable in [pipeline] section of .ini file)")
parser.add_option