//  ************************************************************************************************
//
//  BornAgain: simulate and fit reflection and scattering
//
//! @file      Device/IO/SaveProjections.h
//! @brief     Defines function saveProjections.
//!
//! @homepage  http://www.bornagainproject.org
//! @license   GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
//  ************************************************************************************************

#ifndef BORNAGAIN_DEVICE_IO_SAVEPROJECTIONS_H
#define BORNAGAIN_DEVICE_IO_SAVEPROJECTIONS_H

#include <string>
#include <vector>

class Datafield;

namespace IO {

//! Saves projections of a 2D datafield to an ASCII file.
//! @param field The 2D datafield to project
//! @param horizontal_positions Y-values at which to take horizontal (x) projections
//! @param vertical_positions X-values at which to take vertical (y) projections
//! @param filename Output file path
void saveProjections(const Datafield& field, const std::vector<double>& horizontal_positions,
                     const std::vector<double>& vertical_positions, const std::string& filename);

} // namespace IO

#endif // BORNAGAIN_DEVICE_IO_SAVEPROJECTIONS_H
