Commit f03e8a56 authored by Leo Pound Singer's avatar Leo Pound Singer
Browse files

Add f_lower column to sngl_inspiral table

Pipelines need to report their low frequency cutoff in order to
avoid luminosity distance biases.

See https://sympa.ligo.org/wws/arc/cbc/2020-04/msg00116.html.
parent 5f42fc2b
Pipeline #120963 passed with stages
in 156 minutes and 47 seconds
......@@ -102,36 +102,37 @@ LALSnglInspiralTableFromLIGOLw (
{"alpha5", -1, 31},
{"alpha6", -1, 32},
{"beta", -1, 33},
{"f_final", -1, 34},
{"snr", -1, 35},
{"chisq", -1, 36},
{"chisq_dof", -1, 37},
{"bank_chisq", -1, 38},
{"bank_chisq_dof", -1, 39},
{"cont_chisq", -1, 40},
{"cont_chisq_dof", -1, 41},
{"sigmasq", -1, 42},
{"rsqveto_duration", -1, 43},
{"event_id", -1, 44},
{"Gamma0", -1, 45},
{"Gamma1", -1, 46},
{"Gamma2", -1, 47},
{"Gamma3", -1, 48},
{"Gamma4", -1, 49},
{"Gamma5", -1, 50},
{"Gamma6", -1, 51},
{"Gamma7", -1, 52},
{"Gamma8", -1, 53},
{"Gamma9", -1, 54},
{"kappa", -1, 55},
{"chi", -1, 56},
{"spin1x", -1, 57},
{"spin1y", -1, 58},
{"spin1z", -1, 59},
{"spin2x", -1, 60},
{"spin2y", -1, 61},
{"spin2z", -1, 62},
{"process_id", -1, 63},
{"f_lower", -1, 34},
{"f_final", -1, 35},
{"snr", -1, 36},
{"chisq", -1, 37},
{"chisq_dof", -1, 38},
{"bank_chisq", -1, 39},
{"bank_chisq_dof", -1, 40},
{"cont_chisq", -1, 41},
{"cont_chisq_dof", -1, 42},
{"sigmasq", -1, 43},
{"rsqveto_duration", -1, 44},
{"event_id", -1, 45},
{"Gamma0", -1, 46},
{"Gamma1", -1, 47},
{"Gamma2", -1, 48},
{"Gamma3", -1, 49},
{"Gamma4", -1, 50},
{"Gamma5", -1, 51},
{"Gamma6", -1, 52},
{"Gamma7", -1, 53},
{"Gamma8", -1, 54},
{"Gamma9", -1, 55},
{"kappa", -1, 56},
{"chi", -1, 57},
{"spin1x", -1, 58},
{"spin1y", -1, 59},
{"spin1z", -1, 60},
{"spin2x", -1, 61},
{"spin2y", -1, 62},
{"spin2z", -1, 63},
{"process_id", -1, 64},
{NULL, 0, 0}
};
......@@ -378,45 +379,49 @@ LALSnglInspiralTableFromLIGOLw (
}
else if ( tableDir[j].idx == 34 )
{
thisEvent->f_final = r4colData;
thisEvent->f_lower = r4colData;
}
else if ( tableDir[j].idx == 35 )
{
thisEvent->snr = r4colData;
thisEvent->f_final = r4colData;
}
else if ( tableDir[j].idx == 36 )
{
thisEvent->chisq = r4colData;
thisEvent->snr = r4colData;
}
else if ( tableDir[j].idx == 37 )
{
thisEvent->chisq_dof = i4colData;
thisEvent->chisq = r4colData;
}
else if ( tableDir[j].idx == 38 )
{
thisEvent->bank_chisq = r4colData;
thisEvent->chisq_dof = i4colData;
}
else if ( tableDir[j].idx == 39 )
{
thisEvent->bank_chisq_dof = i4colData;
thisEvent->bank_chisq = r4colData;
}
else if ( tableDir[j].idx == 40 )
{
thisEvent->cont_chisq = r4colData;
thisEvent->bank_chisq_dof = i4colData;
}
else if ( tableDir[j].idx == 41 )
{
thisEvent->cont_chisq_dof = i4colData;
thisEvent->cont_chisq = r4colData;
}
else if ( tableDir[j].idx == 42 )
{
thisEvent->sigmasq = r8colData;
thisEvent->cont_chisq_dof = i4colData;
}
else if ( tableDir[j].idx == 43 )
{
thisEvent->rsqveto_duration = r4colData;
thisEvent->sigmasq = r8colData;
}
else if ( tableDir[j].idx == 44 )
{
thisEvent->rsqveto_duration = r4colData;
}
else if ( tableDir[j].idx == 45 )
{
if ( tableDir[j].pos > 0 )
{
......@@ -425,79 +430,79 @@ LALSnglInspiralTableFromLIGOLw (
return -1;
}
}
else if ( tableDir[j].idx == 45 )
else if ( tableDir[j].idx == 46 )
{
thisEvent->Gamma[0] = r4colData;
}
else if ( tableDir[j].idx == 46 )
else if ( tableDir[j].idx == 47 )
{
thisEvent->Gamma[1] = r4colData;
}
else if ( tableDir[j].idx == 47 )
else if ( tableDir[j].idx == 48 )
{
thisEvent->Gamma[2] = r4colData;
}
else if ( tableDir[j].idx == 48 )
else if ( tableDir[j].idx == 49 )
{
thisEvent->Gamma[3] = r4colData;
}
else if ( tableDir[j].idx == 49 )
else if ( tableDir[j].idx == 50 )
{
thisEvent->Gamma[4] = r4colData;
}
else if ( tableDir[j].idx == 50 )
else if ( tableDir[j].idx == 51 )
{
thisEvent->Gamma[5] = r4colData;
}
else if ( tableDir[j].idx == 51 )
else if ( tableDir[j].idx == 52 )
{
thisEvent->Gamma[6] = r4colData;
}
else if ( tableDir[j].idx == 52 )
else if ( tableDir[j].idx == 53 )
{
thisEvent->Gamma[7] = r4colData;
}
else if ( tableDir[j].idx == 53 )
else if ( tableDir[j].idx == 54 )
{
thisEvent->Gamma[8] = r4colData;
}
else if ( tableDir[j].idx == 54 )
else if ( tableDir[j].idx == 55 )
{
thisEvent->Gamma[9] = r4colData;
}
else if ( tableDir[j].idx == 55 )
else if ( tableDir[j].idx == 56 )
{
thisEvent->kappa = r4colData;
}
else if ( tableDir[j].idx == 56 )
else if ( tableDir[j].idx == 57 )
{
thisEvent->chi = r4colData;
}
else if ( tableDir[j].idx == 57 )
else if ( tableDir[j].idx == 58 )
{
thisEvent->spin1x = r4colData;
}
else if ( tableDir[j].idx == 58 )
else if ( tableDir[j].idx == 59 )
{
thisEvent->spin1y = r4colData;
}
else if ( tableDir[j].idx == 59 )
else if ( tableDir[j].idx == 60 )
{
thisEvent->spin1z = r4colData;
}
else if ( tableDir[j].idx == 60 )
else if ( tableDir[j].idx == 61 )
{
thisEvent->spin2x = r4colData;
}
else if ( tableDir[j].idx == 61 )
else if ( tableDir[j].idx == 62 )
{
thisEvent->spin2y = r4colData;
}
else if ( tableDir[j].idx == 62 )
else if ( tableDir[j].idx == 63 )
{
thisEvent->spin2z = r4colData;
}
else if ( tableDir[j].idx == 63 )
else if ( tableDir[j].idx == 64 )
{
if ( tableDir[j].pos > 0 )
{
......
......@@ -475,6 +475,7 @@ int XLALWriteLIGOLwXMLSnglInspiralTable(
XLALFilePuts("\t\t<Column Name=\"sngl_inspiral:alpha5\" Type=\"real_4\"/>\n", xml->fp);
XLALFilePuts("\t\t<Column Name=\"sngl_inspiral:alpha6\" Type=\"real_4\"/>\n", xml->fp);
XLALFilePuts("\t\t<Column Name=\"sngl_inspiral:beta\" Type=\"real_4\"/>\n", xml->fp);
XLALFilePuts("\t\t<Column Name=\"sngl_inspiral:f_lower\" Type=\"real_4\"/>\n", xml->fp);
XLALFilePuts("\t\t<Column Name=\"sngl_inspiral:f_final\" Type=\"real_4\"/>\n", xml->fp);
XLALFilePuts("\t\t<Column Name=\"sngl_inspiral:snr\" Type=\"real_4\"/>\n", xml->fp);
XLALFilePuts("\t\t<Column Name=\"sngl_inspiral:chisq\" Type=\"real_4\"/>\n", xml->fp);
......@@ -509,7 +510,7 @@ int XLALWriteLIGOLwXMLSnglInspiralTable(
/* rows */
for(; sngl_inspiral; sngl_inspiral = sngl_inspiral->next) {
if(XLALFilePrintf(xml->fp,"%s\"process:process_id:%ld\",\"%s\",\"%s\",\"%s\",%d,%d,%.16g,%d,%d,%.16g,%.16g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%u,%.8g,%u,%.8g,%u,%.16g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,\"sngl_inspiral:event_id:%ld\"",
if(XLALFilePrintf(xml->fp,"%s\"process:process_id:%ld\",\"%s\",\"%s\",\"%s\",%d,%d,%.16g,%d,%d,%.16g,%.16g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%u,%.8g,%u,%.8g,%u,%.16g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,%.8g,\"sngl_inspiral:event_id:%ld\"",
row_head,
sngl_inspiral->process_id,
sngl_inspiral->ifo,
......@@ -548,6 +549,7 @@ int XLALWriteLIGOLwXMLSnglInspiralTable(
sngl_inspiral->alpha5,
sngl_inspiral->alpha6,
sngl_inspiral->beta,
sngl_inspiral->f_lower,
sngl_inspiral->f_final,
sngl_inspiral->snr,
sngl_inspiral->chisq,
......
......@@ -333,6 +333,7 @@ XLALFilePuts( " <Column Name=\"alpha4\" Type=\"real_4\"/>\n", fp ) == EOF |
XLALFilePuts( " <Column Name=\"alpha5\" Type=\"real_4\"/>\n", fp ) == EOF || \
XLALFilePuts( " <Column Name=\"alpha6\" Type=\"real_4\"/>\n", fp ) == EOF || \
XLALFilePuts( " <Column Name=\"beta\" Type=\"real_4\"/>\n", fp ) == EOF || \
XLALFilePuts( " <Column Name=\"f_lower\" Type=\"real_4\"/>\n", fp ) == EOF || \
XLALFilePuts( " <Column Name=\"f_final\" Type=\"real_4\"/>\n", fp ) == EOF || \
XLALFilePuts( " <Column Name=\"snr\" Type=\"real_4\"/>\n", fp ) == EOF || \
XLALFilePuts( " <Column Name=\"chisq\" Type=\"real_4\"/>\n", fp ) == EOF || \
......@@ -363,7 +364,7 @@ XLALFilePuts( " <Column Name=\"event_id\" Type=\"ilwd:char\"/>\n", fp ) ==
XLALFilePuts( " <Stream Name=\"sngl_inspiral:table\" Type=\"Local\" Delimiter=\",\">\n", fp ) == EOF )
#define SNGL_INSPIRAL_ROW \
" \"process:process_id:%ld\",\"%s\",\"%s\",\"%s\",%d,%d,%22.16e,%d,%d,%22.16e,%22.16e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%d,%e,%d,%e,%d,%22.16e,%e,%.8e,%.8e,%.8e,%.8e,%.8e,%.8e,%.8e,%.8e,%.8e,%.8e,%.8e,%.8e,%.8e,%.8e,%.8e,%.8e,\"sngl_inspiral:event_id:%ld\""
" \"process:process_id:%ld\",\"%s\",\"%s\",\"%s\",%d,%d,%22.16e,%d,%d,%22.16e,%22.16e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%d,%e,%d,%e,%d,%22.16e,%e,%.8e,%.8e,%.8e,%.8e,%.8e,%.8e,%.8e,%.8e,%.8e,%.8e,%.8e,%.8e,%.8e,%.8e,%.8e,%.8e,\"sngl_inspiral:event_id:%ld\""
#define PRINT_LIGOLW_XML_MULTI_INSPIRAL(fp) ( \
XLALFilePuts( " <Table Name=\"multi_inspiral:table\">\n" , fp ) == EOF || \
......
......@@ -255,6 +255,7 @@ tagSnglInspiralTable
REAL4 alpha5;
REAL4 alpha6;
REAL4 beta;
REAL4 f_lower;
REAL4 f_final;
REAL4 snr;
REAL4 chisq;
......
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