Skip to content
Snippets Groups Projects
Commit 381373f7 authored by Daichi Tsuna's avatar Daichi Tsuna
Browse files

cs_triggergen: added chi2 calculator

in working state
parent 4558b100
No related branches found
No related tags found
No related merge requests found
......@@ -127,8 +127,8 @@ class PSDHandler(simplehandler.Handler):
autocorr_t.data.data /= numpy.max(autocorr_t.data.data)
autocorr_t = autocorr_t.data.data
max_index = numpy.argmax(autocorr_t)
# find the index of the third extremum for the templates, making them all have the same length.
# FIXME we do this because we know that the template with the lowest high-f cutoff will have
# find the index of the third extremum for the template with lowest high-f cutoff.
# we do this because we know that the template with the lowest high-f cutoff will have
# the largest chi2_index.
if i == 0:
extr_ctr = 0
......@@ -249,7 +249,7 @@ xmldoc = ligolw.Document()
xmldoc.appendChild(ligolw.LIGO_LW())
process = ligolw_process.register_to_xmldoc(xmldoc, "StringSearch", options.__dict__)
sngl_burst_table = lsctables.New(lsctables.SnglBurstTable, ["process_id", "event_id","ifo","search","channel","start_time","start_time_ns","peak_time","peak_time_ns","duration","central_freq","bandwidth","amplitude","snr","confidence","chisq","chisq_dof"])
sngl_burst_table = lsctables.New(lsctables.SnglBurstTable, ["process:process_id", "event_id","ifo","search","channel","start_time","start_time_ns","peak_time","peak_time_ns","duration","central_freq","bandwidth","amplitude","snr","confidence","chisq","chisq_dof"])
xmldoc.childNodes[-1].appendChild(sngl_burst_table)
......
This diff is collapsed.
......@@ -5,12 +5,10 @@
#include <glib.h>
#include <gst/gst.h>
#include <gst/audio/audio.h>
#include <gst/base/gstadapter.h>
#include <gst/base/gstbasetransform.h>
#include <gstlal/gstaudioadapter.h>
#include <gstlal/gstlal_peakfinder.h>
#include <lal/LIGOMetadataTables.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector_float.h>
#include <gsl/gsl_matrix_float.h>
......@@ -37,29 +35,36 @@ typedef struct {
typedef struct {
GstBaseTransform element;
GstAudioAdapter *adapter;
/*
* properties
*/
float threshold;
float cluster;
char *bank_filename;
gsl_matrix_float *autocorrelation_matrix;
gsl_vector_float *autocorrelation_norm;
/*
* input stream
*/
GstAudioInfo audio_info;
GstAudioAdapter *adapter;
GstClockTime t0;
guint64 offset0;
guint64 next_in_offset;
guint64 next_out_offset;
gboolean need_discont;
float threshold;
float cluster;
/*
* trigger state
*/
GMutex bank_lock;
gsl_matrix *autocorrelation_matrix;
gsl_vector *autocorrelation_norm;
char *bank_filename;
SnglBurst *bank;
double *data;
struct gstlal_peak_state *maxdata;
gchar *instrument;
gchar *channel_name;
gint num_templates;
LIGOTimeGPS *last_time;
double *snr_mat;
} GSTLALStringTriggergen;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment