Skip to content

Commit

Permalink
make the ACF output with real and complex parts
Browse files Browse the repository at this point in the history
  • Loading branch information
tjira committed Apr 2, 2024
1 parent e8c6e01 commit 6d7532a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/eigen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void EigenWrite(const std::string& fname, const Matrix<T>& A) {
// write the matrix by rows
for (int i = 0; i < A.rows(); i++) {
for (int j = 0; j < A.cols(); j++) {
file << std::setw(20) << A(i, j) << (j < A.cols() - 1 ? " " : "");
file << std::setw(24) << A(i, j) << (j < A.cols() - 1 ? " " : "");
} file << "\n";
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,8 @@ int main(int argc, char** argv) {
// save the spectral analysis results if available
if (res.msv.spectra.size()) {
for (size_t i = 0; i < res.msv.spectra.size(); i++) {
Matrix<> A(res.msv.t.size(), 3); A << res.msv.t, res.msv.acfs.at(i).real(), res.msv.acfs.at(i).imag(); EigenWrite(std::filesystem::path(ip) / ("acf" + std::to_string(i) + ".mat"), A);
Matrix<> F(res.msv.f.size(), 2); F << res.msv.f, res.msv.spectra.at(i).cwiseAbs(); EigenWrite(std::filesystem::path(ip) / ("spectrum" + std::to_string(i) + ".mat"), F);
Matrix<> A(res.msv.t.size(), 2); A << res.msv.t, res.msv.acfs.at(i).cwiseAbs(); EigenWrite(std::filesystem::path(ip) / ("acf" + std::to_string(i) + ".mat"), A);
}
}
}
Expand Down

0 comments on commit 6d7532a

Please sign in to comment.