mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-15 08:47:14 +02:00
Feature/reactivate python bindings (#74)
major changes: - add python bindings for all c++ features except network_io - changes to cross compile on windows,linux and macos - fix bugs with cluster_finder - use Dtype in Frame instead of bitdepth - remove boost::program_options and replace with our implementation - add Transforms class that applies a sequence of functions (c++ or python functions) on a Frame. - remove frame reorder and flip from SubFile.cpp. use Transforms instead - Test clusterFinder and Pedestal results in comparison with slsDetectorCalibration --------- Co-authored-by: Bechir <bechir.brahem420@gmail.com> Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com>
This commit is contained in:
@ -11,7 +11,7 @@ using namespace aare;
|
||||
|
||||
void print_vpair(std::vector<std::pair<int, double>> &v) {
|
||||
std::cout << "[ ";
|
||||
for (int i = 0; i < v.size(); i++) {
|
||||
for (unsigned int i = 0; i < v.size(); i++) {
|
||||
std::cout << "(" << v[i].first << "," << v[i].second << "), ";
|
||||
}
|
||||
std::cout << "]" << std::endl;
|
||||
@ -19,7 +19,7 @@ void print_vpair(std::vector<std::pair<int, double>> &v) {
|
||||
int range(int min, int max, int i, int steps) { return min + (max - min) * i / steps; }
|
||||
int main() {
|
||||
const int rows = 1, cols = 1;
|
||||
double MEAN = 5.0, STD = 1.0, VAR = STD * STD, TOLERANCE = 0.1;
|
||||
double MEAN = 5.0, STD = 1.0;
|
||||
|
||||
unsigned seed = std::chrono::system_clock::now().time_since_epoch().count();
|
||||
std::default_random_engine generator(seed);
|
||||
@ -53,7 +53,7 @@ int main() {
|
||||
long double sum2 = 0;
|
||||
// fill 1000 first values of pedestal
|
||||
for (int x = 0; x < 1000; x++) {
|
||||
Frame frame(rows, cols, 64);
|
||||
Frame frame(rows, cols, Dtype::DOUBLE);
|
||||
double val = distribution(generator);
|
||||
frame.set<double>(0, 0, val);
|
||||
pedestal.push<double>(frame);
|
||||
@ -63,7 +63,7 @@ int main() {
|
||||
}
|
||||
|
||||
for (int x = 0, aa = 0; x < 100000; x++, aa++) {
|
||||
Frame frame(rows, cols, 64);
|
||||
Frame frame(rows, cols, Dtype::DOUBLE);
|
||||
double val = distribution(generator);
|
||||
frame.set<double>(0, 0, val);
|
||||
pedestal.push<double>(frame);
|
||||
|
Reference in New Issue
Block a user