Commit c1f9fb2d authored by Vivien Raymond's avatar Vivien Raymond

Merge branch 'fix_mcmc_h5injdump' into 'master'

lalinference_mcmc: only write injection params once to avoid H5 error

See merge request lscsoft/lalsuite!629
parents de579f13 e6332392
......@@ -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