RadioImagerGPU 1.0
Loading...
Searching...
No Matches
data_io.cpp File Reference
#include "data_io.hpp"
#include <fstream>
#include <sstream>
#include <iostream>
#include <filesystem>

Functions

void readXYZCoordinates (const std::string &filename, std::vector< double > &x_m, std::vector< double > &y_m, std::vector< double > &z_m)
 Reads XYZ coordinates from a CSV file.
 
void saveUVWCoordinates (const std::vector< std::vector< double > > &u, const std::vector< std::vector< double > > &v, const std::vector< std::vector< double > > &w, const std::string &directory)
 Saves UVW coordinates to CSV files in the specified directory.
 
void saveImages (const std::vector< std::vector< double > > &images, int image_size, const std::string &directory)
 Saves images to CSV files in the specified directory.
 
void readDirections (const std::string &filename, std::vector< double > &HAs, std::vector< double > &Decs)
 Reads HAs and Decs from a CSV file.
 

Function Documentation

◆ readDirections()

void readDirections ( const std::string & filename,
std::vector< double > & HAs,
std::vector< double > & Decs )

Reads HAs and Decs from a CSV file.

Parameters
filenameThe path to the CSV file.
HAsVector to store the Hour Angles.
DecsVector to store the Declinations.

◆ readXYZCoordinates()

void readXYZCoordinates ( const std::string & filename,
std::vector< double > & x_m,
std::vector< double > & y_m,
std::vector< double > & z_m )

Reads XYZ coordinates from a CSV file.

Parameters
filenameThe name of the CSV file to read from.
x_mVector to store the X coordinates.
y_mVector to store the Y coordinates.
z_mVector to store the Z coordinates.

◆ saveImages()

void saveImages ( const std::vector< std::vector< double > > & images,
int image_size,
const std::string & directory )

Saves images to CSV files in the specified directory.

Parameters
imagesVector of images.
image_sizeSize of the images.
directoryThe directory to save the image files.

◆ saveUVWCoordinates()

void saveUVWCoordinates ( const std::vector< std::vector< double > > & u,
const std::vector< std::vector< double > > & v,
const std::vector< std::vector< double > > & w,
const std::string & directory )

Saves UVW coordinates to CSV files in the specified directory.

Parameters
uVector of U coordinates for multiple directions.
vVector of V coordinates for multiple directions.
wVector of W coordinates for multiple directions.
directoryThe directory to save the UVW coordinate files.