Commit Graph

  • 118b97acfb Restore mask ROI fuctionality; Concentric streaks filter in a function; Cleanup Lisa Dorofeeva 2025-07-15 08:35:08 +02:00
  • ad0752aa92 Correct region mask Dorofeeva Elizaveta (EXT) 2025-07-14 23:35:26 +02:00
  • b2cc1e27a4 TEST: crop data AND mask Lisa Dorofeeva 2025-07-14 23:10:46 +02:00
  • d30adf3e14 TEST: try return crop roi; cleanup Lisa Dorofeeva 2025-07-14 23:04:17 +02:00
  • 9ed3335021 TEST: use median method for whitefield scale Lisa Dorofeeva 2025-07-14 22:44:03 +02:00
  • 90c0b9cf3d No newaxis, still extremely slow method for white field scale; TODO: use median instead Dorofeeva Elizaveta (EXT) 2025-07-14 22:42:05 +02:00
  • f1828cb4b5 True divide Dorofeeva Elizaveta (EXT) 2025-07-14 22:26:58 +02:00
  • 77d3ff9293 TEST scale whitefield Lisa Dorofeeva 2025-07-14 22:07:08 +02:00
  • e3efd82b2c Bugfixes, no leak visible, TODO: cleanup, wf norm, crop, maybe mask roi Dorofeeva Elizaveta (EXT) 2025-07-14 21:25:59 +02:00
  • 901587db79 TEST: try to get rid of data containers in streak finder package; make it simple Lisa Dorofeeva 2025-07-14 20:58:20 +02:00
  • 2ea2129d5b Try to get rid of cryst data entirely Lisa Dorofeeva 2025-07-14 19:40:28 +02:00
  • 6ebaf0ae6a Try cleanup cryst data, track memory usage Lisa Dorofeeva 2025-07-14 19:29:29 +02:00
  • c09bdc5b4e Explicitly delete cryst_data object after algorithm completion Lisa Dorofeeva 2025-07-14 19:09:52 +02:00
  • 8ffad86f9a Use bool rather than np.bool to avoid deprecation errors Lisa Dorofeeva 2025-07-14 18:59:27 +02:00
  • 23983ddd6f Merge pull request 'Streak Finder algorithm for CBD experiment' (#2) from ext-dorofe_e/dap:chapman into main augustin_s 2025-07-14 11:18:06 +02:00
  • 1d88f33cf3 Replace sf_ prefix with cbd_ for streak finder params; We are at SwissFell after all Lisa Dorofeeva 2025-07-11 15:29:51 +02:00
  • 193f531d5c Correct setting name for mask form file dataset; prepend all strak-finder-specific settings names with sf; Make streak-finder mask optional now that we have mask from file Lisa Dorofeeva 2025-07-11 14:57:20 +02:00
  • 4eb4bb76dc Ensure single read and no copy for hdf5 data Lisa Dorofeeva 2025-07-11 14:47:20 +02:00
  • 7169ce5acb We know that detected streaks are list, use np.array Dorofeeva Elizaveta (EXT) 2025-07-11 11:22:45 +02:00
  • e3e701a4da Masking negative values for streak finder should be reflected in mask, not in data Dorofeeva Elizaveta (EXT) 2025-07-11 11:09:17 +02:00
  • d8e38df39a Option to read additional mask from file; Applied on startup only Lisa Dorofeeva 2025-07-11 10:16:05 +02:00
  • e756b70655 Credits Lisa Dorofeeva 2025-07-11 08:57:24 +02:00
  • 2b17a8bd3a Configurable negative values handler for streak finder Lisa Dorofeeva 2025-07-11 08:53:18 +02:00
  • b6df4986de Further simplify, get rid of redundant brackets Lisa Dorofeeva 2025-07-11 08:19:10 +02:00
  • 1ef801c37e Add parameter sf_min_hit_streaks to streak finder - Minimum number of discovered streaks to categorize frame as a hit Lisa Dorofeeva 2025-07-11 08:11:42 +02:00
  • c5ba140c71 Format import Lisa Dorofeeva 2025-07-11 08:08:22 +02:00
  • 152b2342d7 Simplify results dictionary updates in streak finder Lisa Dorofeeva 2025-07-11 08:06:29 +02:00
  • 6f2fa2d419 Merge branch 'chapman' of https://gitea.psi.ch/ext-dorofe_e/dap into chapman Lisa Dorofeeva 2025-07-11 07:59:27 +02:00
  • 094371a63b Simplify converting frame to stack for CrystData Lisa Dorofeeva 2025-07-11 07:59:19 +02:00
  • 626f324eff Merge branch 'main' into chapman ext-dorofe_e 2025-07-10 18:52:10 +02:00
  • a304ff1d9d Added crop roi to readme Lisa Dorofeeva 2025-07-10 10:33:38 +02:00
  • 2bd3e875e3 Bug fix in streaks coordintaes shift Dorofeeva Elizaveta (EXT) 2025-07-10 10:26:38 +02:00
  • b3ec993f2f Swap x/t for crop roi for cryst data Lisa Dorofeeva 2025-07-10 10:08:37 +02:00
  • 84b6ef3c52 For concentric streaks detection, take into account crop region shift Lisa Dorofeeva 2025-07-10 10:07:19 +02:00
  • ea28335ae0 For final streak finder result, take into account crop region shift Lisa Dorofeeva 2025-07-10 09:33:36 +02:00
  • 969ac8ffcf First step towards running algorithm on cropped image Dorofeeva Elizaveta (EXT) 2025-07-10 09:26:17 +02:00
  • da8141b687 convert numpy bool_ scalar to python bool Sven Augustin 2025-07-08 18:57:31 +02:00
  • 9bfe0cc8c5 changed gitlab -> gitea Sven Augustin 2025-07-08 16:05:07 +02:00
  • 7d5a0f7ad8 disable deprecated APIs in NumPy (from before version 1.7) to silence warning Sven Augustin 2025-07-08 15:48:53 +02:00
  • 157b7bad8c typo Sven Augustin 2025-07-08 11:36:03 +02:00
  • e984b336a0 SPI v2 Sven Augustin 2025-07-08 08:54:35 +02:00
  • d9ef09a69e Clean up debug prints; minor cleanup in README Lisa Dorofeeva 2025-07-07 10:05:29 +02:00
  • 8e4301c443 Update README with details of streak finder input and output parameters as well as example settings json Lisa Dorofeeva 2025-07-07 09:56:25 +02:00
  • 76b8d957dd Code cleanup; TODO: update README Lisa Dorofeeva 2025-07-07 09:28:41 +02:00
  • 00024ffd5d Merge branch 'chapman' of https://gitea.psi.ch/ext-dorofe_e/dap into chapman Lisa Dorofeeva 2025-07-07 09:03:20 +02:00
  • c6d10b2fae Bugfixes, add mask rois to streak finder; Allows masking out bad rois or a part of sensor to speed up Lisa Dorofeeva 2025-07-07 09:00:57 +02:00
  • ca6ef2453a Bug fix in streak finder; TODO: mask from file is not refreshed on file change Dorofeeva Elizaveta (EXT) 2025-07-04 11:57:08 +02:00
  • ff532af0d6 Chane image in-place if snr selected; Use concentric mask Lisa Dorofeeva 2025-07-04 11:14:32 +02:00
  • 2e066ef3a7 Have mask and whitefield also available as it was outside of streak finder Lisa Dorofeeva 2025-07-04 10:55:04 +02:00
  • a87b84e6c2 Correct order of calls in streakfind Lisa Dorofeeva 2025-07-04 08:56:45 +02:00
  • 6ff5e54be7 Return early if no streaks detected Lisa Dorofeeva 2025-07-04 08:55:20 +02:00
  • 2852a5320a Bug fixes in new streak finder Dorofeeva Elizaveta (EXT) 2025-07-04 08:43:28 +02:00
  • 6e695a6734 New streak finder Lisa Dorofeeva 2025-07-03 15:22:34 +02:00
  • fe23223887 Update readme - streak finder now marks frames as hits Lisa Dorofeeva 2025-06-30 13:51:07 +02:00
  • 3e9da9aae5 Bug fix in streak finder; Mark frames with streaks as a hit Dorofeeva Elizaveta (EXT) 2025-06-30 13:47:44 +02:00
  • 0962f48349 More parameters returned by streak finder: lengths and Bragg counts of all identified streaks Lisa Dorofeeva 2025-06-30 13:26:24 +02:00
  • 8f66420538 Updated README - update json settings file example Lisa Dorofeeva 2025-06-30 09:13:52 +02:00
  • 3c48072d84 Pixel mask that is read from file is converted to bool Dorofeeva Elizaveta (EXT) 2025-06-25 15:32:55 +02:00
  • a69498ce7e Correct parameter name in README for mask from file Lisa Dorofeeva 2025-06-25 11:30:33 +02:00
  • 84486c6ff9 Allow to apply additional mask that is read out of file - NumPy or hdf5 Lisa Dorofeeva 2025-06-25 11:15:43 +02:00
  • a10c70028f For white field correction, allow to specify dataset to read white field from Lisa Dorofeeva 2025-06-25 11:05:21 +02:00
  • cca5decacc Add whitefield correction error handling Lisa Dorofeeva 2025-06-25 10:21:56 +02:00
  • 02e15090cd Add example parameters for streak finder and whitefield correction to README Lisa Dorofeeva 2025-06-25 09:22:14 +02:00
  • 12104e72ef CBD streak finder: Correct shape of streaks data Lisa Dorofeeva 2025-06-25 08:53:25 +02:00
  • 68b108655b Ensure wf correctrion to be in-place Dorofeeva Elizaveta (EXT) 2025-06-24 10:09:04 +02:00
  • cb2c6d5ab2 Added streak finding and white field correction for convergent-beam diffraction experiments; TODO: cleanup, document streakfinder installation or add to setup Lisa Dorofeeva 2025-06-24 08:13:28 +02:00
  • f47e1bbb88 Update addmask.py augustin_s 2025-05-19 19:30:33 +02:00
  • 1585a1b4a4 Update addmask.py augustin_s 2025-05-19 19:27:12 +02:00
  • 0793d4e298 Update addmask.py augustin_s 2025-05-19 17:54:46 +02:00
  • e596def451 renamed JF06T08V06 -> JF06T08V07 Sven Augustin 2025-01-22 19:28:05 +01:00
  • 9ae4464086 generalized "SPI analysis" from 2 to N ROIs (incl. N=0) Sven Augustin 2024-12-05 12:23:26 +01:00
  • b245387d79 renamed: JF06T08V05 -> JF06T08V06 Sven Augustin 2024-11-19 14:05:01 +01:00
  • 4027fcbc67 Merge branch 'refactor' into 'main' augustin_s 2024-10-12 17:09:09 +02:00
  • 7a57201ca3 fixed dtype of "roi_intensities_normalised" if threshold_value != "NaN" Sven Augustin 2024-10-03 12:13:39 +02:00
  • 98bbe76936 typo: vmin instead of vmax Sven Augustin 2024-10-03 11:50:49 +02:00
  • df17ae536c numpy arrays do not like to be treated as booleans Sven Augustin 2024-10-03 11:03:55 +02:00
  • 5bf58d1193 fixed dtype of "roi_intensities" Sven Augustin 2024-10-03 11:02:24 +02:00
  • 05905d183c bumped version of JF06 (4 -> 5) Sven Augustin 2024-09-11 21:36:14 +02:00
  • f18af38dc6 reordered operations Sven Augustin 2024-09-04 17:30:43 +02:00
  • 35c50b472f split updating nmax and checking readiness Sven Augustin 2024-08-30 18:01:13 +02:00
  • a65553e13a removed apply_aggregation check [aggregator cannot be ready if apply_aggregation is False] Sven Augustin 2024-08-30 17:38:16 +02:00
  • 7a05d8f095 moved aggregator.reset() [this now also resets if aggregation_max wasnt given] Sven Augustin 2024-08-30 15:56:27 +02:00
  • 4db7f4f8cd moved "not ready" due to missing aggregation_max into Aggregator Sven Augustin 2024-08-30 14:53:05 +02:00
  • 7d57d6c5e0 removed unused data argument and numpy import Sven Augustin 2024-08-30 11:54:10 +02:00
  • 1350093d5a removed apply_threshold check from calc_aggregation_ready as these are independent operations Sven Augustin 2024-08-30 11:52:35 +02:00
  • 470aa52ff9 use the proper check from JU [this includes checking for the gain now, which probably was ommitted before since the gain file rarely changes and always exists] Sven Augustin 2024-08-29 10:56:46 +02:00
  • cc0113507b removed unreachable special case for raw data (uint16) reaching aggregation [adapter.process calls handler.process with conversion=handler.can_convert(), which checks if gain and pedestal are truthy; with conversion, the dtype is float32 or int32; if handler.pedestal_file is falsy, the image is skipped upon receive -> special case can never trigger] Sven Augustin 2024-08-29 10:36:31 +02:00
  • cb79be0a3e added/use Aggregator.is_ready Sven Augustin 2024-08-28 10:53:21 +02:00
  • 1e6af40d56 moved calc_apply_threshold out of calc_data, removed special case check Sven Augustin 2024-08-28 10:39:01 +02:00
  • b99a32d9d7 renamed raw_data -> raw_image Sven Augustin 2024-08-28 10:21:32 +02:00
  • 8981eab522 renamed pfdata -> pfimage Sven Augustin 2024-08-28 10:19:01 +02:00
  • 6ca0ebf945 renamed data -> image Sven Augustin 2024-08-28 10:16:30 +02:00
  • f2f871c880 renamed image -> raw_data Sven Augustin 2024-08-28 10:13:21 +02:00
  • d0c1621109 consistency: removed special case that sends the raw data image instead of the processed image data [special case triggered if apply_aggregation and apply_threshold are off, but both can still be not applied if the respective parameters (aggregation_max, threshold_min, threshold_max) are not given, which would send data] Sven Augustin 2024-08-28 10:08:18 +02:00
  • b1f104a71d disentangle Sven Augustin 2024-08-21 15:55:23 +02:00
  • 18d6dd0b7b consistent naming with the other algos Sven Augustin 2024-08-20 22:23:36 +02:00
  • 4b01cb0dca naming; switch order Sven Augustin 2024-08-20 22:17:56 +02:00
  • 547b2b7fb1 disentangle Sven Augustin 2024-08-20 22:11:16 +02:00
  • d3ac74835e simplified Sven Augustin 2024-08-19 13:02:36 +02:00
  • 52e7260fb1 added (commented) an alternative idea Sven Augustin 2024-08-19 12:59:07 +02:00