mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-04-20 22:00:02 +02:00
removed prints, bumped version
This commit is contained in:
parent
ecf1b2a90b
commit
5f21759c8c
2
.github/workflows/build_docs.yml
vendored
2
.github/workflows/build_docs.yml
vendored
@ -4,7 +4,7 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- v1
|
- main
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
3
.github/workflows/build_pkg.yml
vendored
3
.github/workflows/build_pkg.yml
vendored
@ -4,7 +4,8 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- v1
|
- main
|
||||||
|
- developer
|
||||||
#run on PRs as well?
|
#run on PRs as well?
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
24
.gitignore
vendored
Normal file
24
.gitignore
vendored
Normal file
@ -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__/*
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
package:
|
package:
|
||||||
name: aare
|
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:
|
source:
|
||||||
path: ..
|
path: ..
|
||||||
|
@ -341,6 +341,19 @@ template <typename T, int64_t Ndim> void NDArray<T, Ndim>::Print() {
|
|||||||
else
|
else
|
||||||
Print_some();
|
Print_some();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T, int64_t Ndim>
|
||||||
|
std::ostream& operator <<(std::ostream& os, const NDArray<T, Ndim>& 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 <typename T, int64_t Ndim> void NDArray<T, Ndim>::Print_all() {
|
template <typename T, int64_t Ndim> void NDArray<T, Ndim>::Print_all() {
|
||||||
for (auto row = 0; row < shape_[0]; ++row) {
|
for (auto row = 0; row < shape_[0]; ++row) {
|
||||||
for (auto col = 0; col < shape_[1]; ++col) {
|
for (auto col = 0; col < shape_[1]; ++col) {
|
||||||
|
@ -156,4 +156,16 @@ template <typename T, int64_t Ndim> void NDView<T, Ndim>::print_all() const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T, int64_t Ndim>
|
||||||
|
std::ostream& operator <<(std::ostream& os, const NDView<T, Ndim>& 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
|
} // namespace aare
|
@ -4,7 +4,7 @@ build-backend = "scikit_build_core.build"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "aare"
|
name = "aare"
|
||||||
version = "2024.11.07.dev0"
|
version = "2024.11.11.dev0"
|
||||||
|
|
||||||
[tool.scikit-build]
|
[tool.scikit-build]
|
||||||
cmake.verbose = true
|
cmake.verbose = true
|
||||||
|
@ -219,7 +219,6 @@ void define_file_io_bindings(py::module &m) {
|
|||||||
[](RawFile &self) {
|
[](RawFile &self) {
|
||||||
size_t image_size = self.bytes_per_frame();
|
size_t image_size = self.bytes_per_frame();
|
||||||
const uint8_t item_size = self.bytes_per_pixel();
|
const uint8_t item_size = self.bytes_per_pixel();
|
||||||
fmt::print("Image size in bytes: {}\n", image_size);
|
|
||||||
py::array image;
|
py::array image;
|
||||||
std::vector<ssize_t> shape;
|
std::vector<ssize_t> shape;
|
||||||
shape.reserve(2);
|
shape.reserve(2);
|
||||||
|
@ -247,7 +247,6 @@ void RawMasterFile::parse_json(const std::filesystem::path &fpath) {
|
|||||||
try{
|
try{
|
||||||
ROI tmp_roi;
|
ROI tmp_roi;
|
||||||
auto obj = j.at("Receiver Roi");
|
auto obj = j.at("Receiver Roi");
|
||||||
fmt::print("Receiver ROI: {}\n", obj.dump());
|
|
||||||
tmp_roi.xmin = obj.at("xmin");
|
tmp_roi.xmin = obj.at("xmin");
|
||||||
tmp_roi.xmax = obj.at("xmax");
|
tmp_roi.xmax = obj.at("xmax");
|
||||||
tmp_roi.ymin = obj.at("ymin");
|
tmp_roi.ymin = obj.at("ymin");
|
||||||
|
@ -53,11 +53,9 @@ size_t RawSubFile::tell() {
|
|||||||
|
|
||||||
void RawSubFile::read_into(std::byte *image_buf, DetectorHeader *header) {
|
void RawSubFile::read_into(std::byte *image_buf, DetectorHeader *header) {
|
||||||
if(header){
|
if(header){
|
||||||
fmt::print("Reading header\n");
|
|
||||||
m_file.read(reinterpret_cast<char *>(header), sizeof(DetectorHeader));
|
m_file.read(reinterpret_cast<char *>(header), sizeof(DetectorHeader));
|
||||||
} else {
|
} else {
|
||||||
m_file.seekg(sizeof(DetectorHeader), std::ios::cur);
|
m_file.seekg(sizeof(DetectorHeader), std::ios::cur);
|
||||||
fmt::print("Skipping heading header\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO! expand support for different bitdepths
|
//TODO! expand support for different bitdepths
|
||||||
|
Loading…
x
Reference in New Issue
Block a user