Commit e6332392 authored by John Douglas Veitch's avatar John Douglas Veitch

lalinference_mcmc: only write injection params once to avoid H5 error

parent 24322407
......@@ -1412,15 +1412,14 @@ void LALInferenceWriteMCMCSamples(LALInferenceRunState *runState) {
/* Create run identifier group */
LALInferenceH5VariablesArrayToDataset(group, output_array, N_output_array, thread->name);
}
/* TODO: Write metadata */
LALInferenceVariables *injParams = NULL;
if ( (injParams=LALInferencePrintInjectionSample(runState)) )
{
LALInferenceH5VariablesArrayToDataset(group, &injParams, 1, "injection_params");
LALInferenceClearVariables(injParams);
XLALFree(injParams);
}
}
/* TODO: Write metadata */
LALInferenceVariables *injParams = NULL;
if ( (injParams=LALInferencePrintInjectionSample(runState)) )
{
LALInferenceH5VariablesArrayToDataset(group, &injParams, 1, "injection_params");
LALInferenceClearVariables(injParams);
XLALFree(injParams);
}
XLALH5FileClose(group);
......
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