diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index 355f934..cfaa65a 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: push: branches: - - v1 + - main permissions: contents: read diff --git a/.github/workflows/build_pkg.yml b/.github/workflows/build_pkg.yml index 496945f..11ccfae 100644 --- a/.github/workflows/build_pkg.yml +++ b/.github/workflows/build_pkg.yml @@ -4,7 +4,8 @@ on: workflow_dispatch: push: branches: - - v1 + - main + - developer #run on PRs as well? jobs: diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..af3e3b7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +install/ +.cproject +.project +bin/ +.settings +*.aux +*.log +*.out +*.toc +*.o +*.so +.* +build/ +RELEASE.txt +Testing/ + +ctbDict.cpp +ctbDict.h + + + +*.pyc +*/__pycache__/* + diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 50b5968..3b77697 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -1,6 +1,6 @@ package: name: aare - version: 2024.11.07.dev0 #TODO! how to not duplicate this? + version: 2024.11.11.dev0 #TODO! how to not duplicate this? source: path: .. diff --git a/include/aare/NDArray.hpp b/include/aare/NDArray.hpp index 0a54091..fb5f446 100644 --- a/include/aare/NDArray.hpp +++ b/include/aare/NDArray.hpp @@ -341,6 +341,19 @@ template void NDArray::Print() { else Print_some(); } + +template +std::ostream& operator <<(std::ostream& os, const NDArray& arr){ + for (auto row = 0; row < arr.shape(0); ++row) { + for (auto col = 0; col < arr.shape(1); ++col) { + os << std::setw(3); + os << arr(row, col) << " "; + } + os << "\n"; + } + return os; +} + template void NDArray::Print_all() { for (auto row = 0; row < shape_[0]; ++row) { for (auto col = 0; col < shape_[1]; ++col) { diff --git a/include/aare/NDView.hpp b/include/aare/NDView.hpp index 8a73038..3e4fab8 100644 --- a/include/aare/NDView.hpp +++ b/include/aare/NDView.hpp @@ -156,4 +156,16 @@ template void NDView::print_all() const { } } +template +std::ostream& operator <<(std::ostream& os, const NDView& arr){ + for (auto row = 0; row < arr.shape(0); ++row) { + for (auto col = 0; col < arr.shape(1); ++col) { + os << std::setw(3); + os << arr(row, col) << " "; + } + os << "\n"; + } + return os; +} + } // namespace aare \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index baf6e38..5cb6b71 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "scikit_build_core.build" [project] name = "aare" -version = "2024.11.07.dev0" +version = "2024.11.11.dev0" [tool.scikit-build] cmake.verbose = true diff --git a/python/src/file.hpp b/python/src/file.hpp index 7c8a3c7..54cb6a7 100644 --- a/python/src/file.hpp +++ b/python/src/file.hpp @@ -219,7 +219,6 @@ void define_file_io_bindings(py::module &m) { [](RawFile &self) { size_t image_size = self.bytes_per_frame(); const uint8_t item_size = self.bytes_per_pixel(); - fmt::print("Image size in bytes: {}\n", image_size); py::array image; std::vector shape; shape.reserve(2); diff --git a/src/RawMasterFile.cpp b/src/RawMasterFile.cpp index 8b3af85..ed16314 100644 --- a/src/RawMasterFile.cpp +++ b/src/RawMasterFile.cpp @@ -247,7 +247,6 @@ void RawMasterFile::parse_json(const std::filesystem::path &fpath) { try{ ROI tmp_roi; auto obj = j.at("Receiver Roi"); - fmt::print("Receiver ROI: {}\n", obj.dump()); tmp_roi.xmin = obj.at("xmin"); tmp_roi.xmax = obj.at("xmax"); tmp_roi.ymin = obj.at("ymin"); diff --git a/src/RawSubFile.cpp b/src/RawSubFile.cpp index 23c1201..c537007 100644 --- a/src/RawSubFile.cpp +++ b/src/RawSubFile.cpp @@ -53,11 +53,9 @@ size_t RawSubFile::tell() { void RawSubFile::read_into(std::byte *image_buf, DetectorHeader *header) { if(header){ - fmt::print("Reading header\n"); m_file.read(reinterpret_cast(header), sizeof(DetectorHeader)); } else { m_file.seekg(sizeof(DetectorHeader), std::ios::cur); - fmt::print("Skipping heading header\n"); } //TODO! expand support for different bitdepths