Commit 84ef1960 authored by Cody Messick's avatar Cody Messick

snglinspiraltable.c: Remove old commented out code

parent dc7bc59f
......@@ -389,126 +389,6 @@ static PyObject *K1_snr_component_get(PyObject *obj, void *data)
return NULL;
}
/*
static PyObject *snr_component_get(PyObject *obj, void *data)
{
COMPLEX8TimeSeries *H1_snr = ((gstlal_GSTLALSnglInspiral *) obj)->H1_snr;
COMPLEX8TimeSeries *L1_snr = ((gstlal_GSTLALSnglInspiral *) obj)->L1_snr;
COMPLEX8TimeSeries *V1_snr = ((gstlal_GSTLALSnglInspiral *) obj)->V1_snr;
COMPLEX8TimeSeries *K1_snr = ((gstlal_GSTLALSnglInspiral *) obj)->K1_snr;
const char *name = data;
if(!H1_snr && !L1_snr && !V1_snr && !K1_snr) {
PyErr_SetString(PyExc_ValueError, "no snr time series available");
return NULL;
}
if(!strcmp(name, "_H1_snr_name")) {
return PyString_FromString(H1_snr->name);
} else if(!strcmp(name, "_L1_snr_name")) {
return PyString_FromString(L1_snr->name);
} else if(!strcmp(name, "_V1_snr_name")) {
return PyString_FromString(V1_snr->name);
} else if(!strcmp(name, "_K1_snr_name")) {
return PyString_FromString(K1_snr->name);
} else if(!strcmp(name, "_H1_snr_epoch_gpsSeconds")) {
return PyInt_FromLong(H1_snr->epoch.gpsSeconds);
} else if(!strcmp(name, "_L1_snr_epoch_gpsSeconds")) {
return PyInt_FromLong(L1_snr->epoch.gpsSeconds);
} else if(!strcmp(name, "_V1_snr_epoch_gpsSeconds")) {
return PyInt_FromLong(V1_snr->epoch.gpsSeconds);
} else if(!strcmp(name, "_K1_snr_epoch_gpsSeconds")) {
return PyInt_FromLong(K1_snr->epoch.gpsSeconds);
} else if(!strcmp(name, "_H1_snr_epoch_gpsNanoSeconds")) {
return PyInt_FromLong(H1_snr->epoch.gpsNanoSeconds);
} else if(!strcmp(name, "_L1_snr_epoch_gpsNanoSeconds")) {
return PyInt_FromLong(L1_snr->epoch.gpsNanoSeconds);
} else if(!strcmp(name, "_V1_snr_epoch_gpsNanoSeconds")) {
return PyInt_FromLong(V1_snr->epoch.gpsNanoSeconds);
} else if(!strcmp(name, "_K1_snr_epoch_gpsNanoSeconds")) {
return PyInt_FromLong(K1_snr->epoch.gpsNanoSeconds);
} else if(!strcmp(name, "_H1_snr_f0")) {
return PyFloat_FromDouble(H1_snr->f0);
} else if(!strcmp(name, "_L1_snr_f0")) {
return PyFloat_FromDouble(L1_snr->f0);
} else if(!strcmp(name, "_V1_snr_f0")) {
return PyFloat_FromDouble(V1_snr->f0);
} else if(!strcmp(name, "_K1_snr_f0")) {
return PyFloat_FromDouble(K1_snr->f0);
} else if(!strcmp(name, "_H1_snr_deltaT")) {
return PyFloat_FromDouble(H1_snr->deltaT);
} else if(!strcmp(name, "_L1_snr_deltaT")) {
return PyFloat_FromDouble(L1_snr->deltaT);
} else if(!strcmp(name, "_V1_snr_deltaT")) {
return PyFloat_FromDouble(V1_snr->deltaT);
} else if(!strcmp(name, "_K1_snr_deltaT")) {
return PyFloat_FromDouble(K1_snr->deltaT);
} else if(!strcmp(name, "_H1_snr_sampleUnits")) {
char *s = XLALUnitToString(&H1_snr->sampleUnits);
PyObject *result = PyString_FromString(s);
XLALFree(s);
return result;
} else if(!strcmp(name, "_L1_snr_sampleUnits")) {
char *s = XLALUnitToString(&L1_snr->sampleUnits);
PyObject *result = PyString_FromString(s);
XLALFree(s);
return result;
} else if(!strcmp(name, "_V1_snr_sampleUnits")) {
char *s = XLALUnitToString(&V1_snr->sampleUnits);
PyObject *result = PyString_FromString(s);
XLALFree(s);
return result;
} else if(!strcmp(name, "_K1_snr_sampleUnits")) {
char *s = XLALUnitToString(&K1_snr->sampleUnits);
PyObject *result = PyString_FromString(s);
XLALFree(s);
return result;
} else if(!strcmp(name, "_H1_snr_data_length")) {
return PyInt_FromLong(H1_snr->data->length);
} else if(!strcmp(name, "_L1_snr_data_length")) {
return PyInt_FromLong(L1_snr->data->length);
} else if(!strcmp(name, "_V1_snr_data_length")) {
return PyInt_FromLong(V1_snr->data->length);
} else if(!strcmp(name, "_K1_snr_data_length")) {
return PyInt_FromLong(K1_snr->data->length);
} else if(!strcmp(name, "_H1_snr_data")) {
npy_intp dims[] = {H1_snr->data->length};
PyObject *array = PyArray_SimpleNewFromData(1, dims, NPY_CFLOAT, H1_snr->data->data);
if(!array)
return NULL;
Py_INCREF(obj);
PyArray_SetBaseObject((PyArrayObject *) array, obj);
return array;
} else if(!strcmp(name, "_L1_snr_data")) {
npy_intp dims[] = {L1_snr->data->length};
PyObject *array = PyArray_SimpleNewFromData(1, dims, NPY_CFLOAT, L1_snr->data->data);
if(!array)
return NULL;
Py_INCREF(obj);
PyArray_SetBaseObject((PyArrayObject *) array, obj);
return array;
} else if(!strcmp(name, "_V1_snr_data")) {
npy_intp dims[] = {V1_snr->data->length};
PyObject *array = PyArray_SimpleNewFromData(1, dims, NPY_CFLOAT, V1_snr->data->data);
if(!array)
return NULL;
Py_INCREF(obj);
PyArray_SetBaseObject((PyArrayObject *) array, obj);
return array;
} else if(!strcmp(name, "_K1_snr_data")) {
npy_intp dims[] = {K1_snr->data->length};
PyObject *array = PyArray_SimpleNewFromData(1, dims, NPY_CFLOAT, K1_snr->data->data);
if(!array)
return NULL;
Py_INCREF(obj);
PyArray_SetBaseObject((PyArrayObject *) array, obj);
return array;
}
PyErr_BadArgument();
return NULL;
}
*/
static struct PyGetSetDef getset[] = {
{"ifo", pylal_inline_string_get, pylal_inline_string_set, "ifo", &(struct pylal_inline_string_description) {offsetof(gstlal_GSTLALSnglInspiral, row.ifo), LIGOMETA_IFO_MAX}},
{"search", pylal_inline_string_get, pylal_inline_string_set, "search", &(struct pylal_inline_string_description) {offsetof(gstlal_GSTLALSnglInspiral, row.search), LIGOMETA_SEARCH_MAX}},
......
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