GithubHelp home page GithubHelp logo

lucabaldini / hexsample Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 2.55 MB

Solid-state hybrid detectors with hexagonal sampling.

Home Page: https://lucabaldini.github.io/hexsample/

License: GNU General Public License v3.0

Makefile 0.05% Python 99.42% Shell 0.26% Batchfile 0.26%
detector-2d event-driven-readout hexagonal-architecture x-ray-imaging x-ray-spectroscopy

hexsample's People

Contributors

lucabaldini avatar

Stargazers

 avatar

Watchers

 avatar

hexsample's Issues

Optimize the clustering

We are starting with a fairly simple NN clustering implementation, where the two basic handles that we have are the zero-suppression threshold and the number of neighbors.

(Note that pixels added to the cluster can be on opposite sides of the seed, which probably does not make much sense.)

I think the first information that we need here is understanding how the charge is shared between adjacent pixels without the noise.

Digitization errors at the borders of the matrix

We do have errors when the ROI hits the physical bounds of the readout.

2023-10-06 12:35:28.238 | ERROR    | hexsample.digi:__post_init__:86 - Error in DigiEvent post-initializaion.
RegionOfInterest(min_col=160, max_col=304, min_row=0, max_row=189, padding=Padding(top=2, right=2, bottom=2, left=2))
ROI size: 27550
pha size: 27360

Unit test failing intermittendtly on CI

FAILED tests/test_source.py::test_cu_k_forest - AssertionError: assert (33.67776280160456 - 5) <= (5.0 * 3.1622776601683795)
 +  where 3.1622776601683795 = <ufunc 'sqrt'>((2.0 * 5))
 +    where <ufunc 'sqrt'> = np.sqrt

Speed up the simulation

At this point hxsim runs at something between 200 and 1000 events per seconds depending of the machine and on the particular setup. This implies roughly O(1 hour) for 1 M events, which is not outrageous, but still kind of annoying. It would be nice to speed things up by at least a factor of a few. A few lines of action might be:

  • check if we're doing something wrong with the generation of the noise on the matrix---it looks like adding the noise per se slows things down by a factor of ~2;
  • check if I/O is a bottleneck at all;
  • check what's the smallest sensible padding that we can use, in order to reduce the event size;
  • check if there's something that we can vectorize without complicating the logic flow too much.

I am sure there are others.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.