diff --git a/include/amici/hdf5.h b/include/amici/hdf5.h index 32cd4c925a..731c4ddecc 100644 --- a/include/amici/hdf5.h +++ b/include/amici/hdf5.h @@ -164,8 +164,8 @@ std::unique_ptr readSimulationExpData( /** * @brief Write AMICI experimental data to HDF5 file. * @param edata The experimental data which is to be written - * @param file Name of HDF5 file - * @param hdf5Location Path inside the HDF5 file to object having ExpData + * @param file HDF5 file + * @param hdf5Location Path inside the HDF5 file */ void writeSimulationExpData( @@ -173,6 +173,18 @@ void writeSimulationExpData( std::string const& hdf5Location ); +/** + * @brief Write AMICI experimental data to HDF5 file. + * @param edata The experimental data which is to be written + * @param file Name of HDF5 file + * @param hdf5Location Path inside the HDF5 file + */ +void writeSimulationExpData( + ExpData const& edata, std::string const& hdf5Filename, + std::string const& hdf5Location + ); + + /** * @brief Check whether an attribute with the given name exists * on the given dataset. diff --git a/src/hdf5.cpp b/src/hdf5.cpp index f9914452eb..a22ec65a2b 100644 --- a/src/hdf5.cpp +++ b/src/hdf5.cpp @@ -1388,5 +1388,14 @@ std::vector getDoubleDataset3D( return result; } +void writeSimulationExpData( + ExpData const& edata, std::string const& hdf5Filename, + std::string const& hdf5Location +) { + auto file = createOrOpenForWriting(hdf5Filename); + + writeSimulationExpData(edata, file, hdf5Location); +} + } // namespace hdf5 } // namespace amici