Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
302 commits
Select commit Hold shift + click to select a range
e380002
add quickhull dep.
HaiwangYu Jun 18, 2024
dc73eb3
get_closest_point_along_vec imp/val
HaiwangYu Jun 20, 2024
6d05dcf
get_closest_points imp/val
HaiwangYu Jun 20, 2024
d205457
io debugging
HaiwangYu Jun 20, 2024
b6f3319
Improve the setting of log levels
brettviren Jun 20, 2024
86de40e
all tests pass, print_dds does not work with int
HaiwangYu Jun 21, 2024
3b89f6c
Fix JSON to string formatting to include 'pretty' and control over nu…
brettviren Jun 21, 2024
d408cb7
Add general support for dumping to Bee zip archives and get UbooneBlo…
brettviren Jun 21, 2024
bf365b1
Merge branch 'apply-pointcloud' of github.com:wirecell/wire-cell-tool…
brettviren Jun 21, 2024
285a676
Fix uninitialized variables
brettviren Jun 21, 2024
4412e13
Make intermediate directory entries in zip file to make Bee happy and…
brettviren Jun 21, 2024
2b3be4e
Comment out the hack to make intermediate directories
brettviren Jun 21, 2024
b4e186e
Actually apply the speed and time offset settings.
brettviren Jun 21, 2024
cada3de
Merge branch 'apply-pointcloud' of github.com:WireCell/wire-cell-tool…
HaiwangYu Jun 21, 2024
ddbbbd7
Add a descendants count
brettviren Jun 21, 2024
425a5e0
Account for the non-existence of local PCs.
brettviren Jun 21, 2024
3f65d0e
Merge branch 'apply-pointcloud' of github.com:wirecell/wire-cell-tool…
brettviren Jun 21, 2024
411e62d
pt_clouds_global_indices
HaiwangYu Jun 22, 2024
520f5b4
start to change hough_transform
HaiwangYu Jun 22, 2024
7bfbb9e
external PC for hough
HaiwangYu Jun 22, 2024
6744fdb
dis, dis_dir1, dis_dir2
HaiwangYu Jun 22, 2024
fa1b13a
Connect_graph impl, simple val.
HaiwangYu Jun 24, 2024
c25e500
disable clustering_separate for speed for now
HaiwangYu Jun 24, 2024
1d745ea
JudgeSeparateDec_2 impl.
HaiwangYu Jun 25, 2024
f417536
pca impl.
HaiwangYu Jun 25, 2024
522cc25
Merge branch 'apply-pointcloud' of github.com:WireCell/wire-cell-tool…
lastgeorge Jun 26, 2024
1ac1cf9
dead outer corners
HaiwangYu Jun 27, 2024
0c0e7ae
dead-clus, rm debug
HaiwangYu Jun 28, 2024
4687943
Merge branch 'apply-pointcloud' of github.com:WireCell/wire-cell-tool…
lastgeorge Jun 28, 2024
a7ad422
fine grain debugging
lastgeorge Jun 30, 2024
68edb6b
fix live sampling
lastgeorge Jun 30, 2024
b59a126
catch up
lastgeorge Jul 1, 2024
15d451b
test
lastgeorge Jul 1, 2024
241ab64
Comment out unused variables to avoid build errors
brettviren Jul 1, 2024
c1bb2a9
fix a bug in the overlap_fast
lastgeorge Jul 1, 2024
3ed9171
update with printing command
lastgeorge Jul 2, 2024
9674a12
Merge branch 'apply-pointcloud' of github.com:wirecell/wire-cell-tool…
brettviren Jul 2, 2024
bb8582f
Merge-related fixes
brettviren Jul 2, 2024
359266d
vector to array to speed up in extreme conditions
HaiwangYu Jul 8, 2024
ce1148a
explicitly test adjacent dead, seems no effect compared to default now
HaiwangYu Jul 8, 2024
7ebace4
connect_graph speed issue, bug fixes
HaiwangYu Jul 8, 2024
dc4172c
rm debug print out
HaiwangYu Jul 8, 2024
c0273af
Remove -Werror.
brettviren Jul 12, 2024
324b3b8
Improve Bee dumper for clustering.
brettviren Jul 12, 2024
11f3d2d
Add hash to Configuration and move its testing to doctest.
brettviren Jul 12, 2024
a4d1c01
Add support for Bee "regions".
brettviren Jul 12, 2024
30d47bb
pca, quickhull, JudgeSeparateDec_1
HaiwangYu Jul 14, 2024
505424b
ascending order from Eigen, we want descending
HaiwangYu Jul 16, 2024
7605d95
do not change layer 0, 1
HaiwangYu Jul 16, 2024
5123acc
Finish refactor to use WireCell::Bee dumper
brettviren Jul 17, 2024
cc5610b
Remove the is_higher() test and resulting increment of crossing point…
brettviren Jul 17, 2024
123577d
Support searching for input root file in WIRECELL_PATH
brettviren Jul 17, 2024
c8bc3f5
Fix wrong sort order of corner points around dead regions
brettviren Jul 17, 2024
344377d
Add my take on bee-upload.
brettviren Jul 17, 2024
3a52909
Test full chain from WCP ROOT file to WCT clustering in self-containe…
brettviren Jul 17, 2024
f8602e2
init get_furthest_wcpoint, adjust_wcpoints_parallel
HaiwangYu Jul 23, 2024
9736293
build 2d pc
HaiwangYu Jul 23, 2024
b63b2aa
get_closest_2d_index
HaiwangYu Jul 23, 2024
5f393d7
compiles
HaiwangYu Jul 23, 2024
707f63b
init Multi2DPointCloud
HaiwangYu Jul 23, 2024
4a4c3ba
Updates as a side-effect of putting more docs here: https://www.phy.b…
brettviren Jul 23, 2024
cc660e8
graphviz issue
HaiwangYu Jul 24, 2024
6afc104
Merge branch 'apply-pointcloud' of github.com:WireCell/wire-cell-tool…
HaiwangYu Jul 24, 2024
819f284
smaller test
HaiwangYu Jul 24, 2024
c94c45b
order matters, boost 1.75
HaiwangYu Jul 24, 2024
8f16af3
order matter, how?
HaiwangYu Jul 24, 2024
d1840c7
compiles
HaiwangYu Jul 30, 2024
1aa10f8
stand alone test
HaiwangYu Jul 30, 2024
ea19ac9
update
HaiwangYu Jul 30, 2024
1893921
rm debug cout
HaiwangYu Jul 30, 2024
54e8396
cal_shortest_path
HaiwangYu Jul 30, 2024
afe86c9
get_closest_point_index
HaiwangYu Jul 30, 2024
4fd8d21
compiles now
HaiwangYu Jul 30, 2024
add74f8
init Separate_2
HaiwangYu Aug 1, 2024
d4dbf7b
Separate_2 compiles
HaiwangYu Aug 2, 2024
c1e2f62
use unique_ptr
HaiwangYu Aug 2, 2024
e3613bb
compiles but only gives base pointers
HaiwangYu Aug 5, 2024
3122718
only solution?
HaiwangYu Aug 5, 2024
96912fc
init translate
HaiwangYu Aug 5, 2024
f4f1c13
compiles
HaiwangYu Aug 5, 2024
c76f149
init clustering_separate
HaiwangYu Aug 5, 2024
0d09da5
runs
HaiwangYu Aug 5, 2024
6c36572
pass get_dead_winds to clustering_separate
HaiwangYu Aug 6, 2024
7f4089f
fix
HaiwangYu Aug 6, 2024
70ebb84
dead as PC
HaiwangYu Aug 6, 2024
f26507b
2D PC fix
HaiwangYu Aug 6, 2024
d00a506
fix: want dist, but knn ret is sqrt(dist)
HaiwangYu Aug 20, 2024
6799159
get_uvwt_min/max fix and debugging funcs
HaiwangYu Aug 20, 2024
8b73c4f
rm debugging
HaiwangYu Aug 20, 2024
dba1dbb
dead_winds in PCs
HaiwangYu Aug 20, 2024
e2a22b7
working but dirty version
HaiwangYu Aug 20, 2024
ec48650
clustering_separate working!
HaiwangYu Aug 20, 2024
3aa3f71
rm debug
HaiwangYu Aug 20, 2024
be2b8de
rm more cout
HaiwangYu Aug 20, 2024
1ce114c
rm unneeded code
HaiwangYu Aug 20, 2024
a4f5ea7
rm debug code
HaiwangYu Aug 20, 2024
fe6c98c
init DynamicPointCloud
HaiwangYu Aug 20, 2024
4143f0c
get_highest_lowest_points
HaiwangYu Aug 20, 2024
65b0f44
init get_2d_points_info
HaiwangYu Aug 21, 2024
6f351df
*= and /= operators
HaiwangYu Aug 22, 2024
4e6e07b
add hough_transform
HaiwangYu Aug 22, 2024
e89fe2c
init clustering_connect1, compiles
HaiwangYu Aug 22, 2024
ee3e42e
another add_points
HaiwangYu Aug 22, 2024
d9becca
add calling for clustering_connect1
HaiwangYu Aug 22, 2024
ebf4e40
add additional radius cut
HaiwangYu Aug 27, 2024
045ac76
dead channel bug fix
HaiwangYu Aug 28, 2024
7553dad
use spdlog
HaiwangYu Aug 28, 2024
b39bf2c
use debug macro
HaiwangYu Aug 28, 2024
e003ed8
deghost compiles
HaiwangYu Sep 17, 2024
603557a
still debug deghosting, examine x running.
HaiwangYu Oct 7, 2024
0f61a22
protect_overclustering implemented
HaiwangYu Oct 8, 2024
f453496
clean up
HaiwangYu Oct 11, 2024
015315f
double add bug fix; templated get_closest_points
HaiwangYu Oct 15, 2024
984cb9e
init judge_vertex
HaiwangYu Oct 15, 2024
e111531
neutrino compiles
HaiwangYu Oct 15, 2024
82eb62b
update unit test
HaiwangYu Oct 15, 2024
46f1ef6
clustering_isolated compiles
HaiwangYu Oct 17, 2024
4b97e70
add an MD
Oct 25, 2024
95a65cd
modify a file
Oct 25, 2024
053ad7d
modify a file
Oct 25, 2024
de5d33a
modify a file
Oct 25, 2024
38e0189
move the definition of JudgeSpearateDec_2 to the header file
Oct 25, 2024
b281d27
add a md file
Oct 25, 2024
54d554d
add a md file
Oct 26, 2024
9a6afaa
add a md file
Oct 26, 2024
2f93d96
add a md file
Oct 26, 2024
bf77a77
add a md file
Oct 26, 2024
86f63e9
add a md file
Oct 26, 2024
30ddcc2
add a md file
Oct 26, 2024
f40bdea
add a md file
Oct 26, 2024
36250de
add a md file
Oct 26, 2024
6257bff
add a md file
Oct 26, 2024
a5fe670
add a md file
Oct 26, 2024
3805ae3
add a md file
Oct 26, 2024
eeddab3
add a md file
Oct 26, 2024
e52e6bf
add a md file
Oct 26, 2024
e155e84
add a md file
Oct 26, 2024
b6247a2
add a md file
Oct 26, 2024
35c7746
add a md file
Oct 26, 2024
b6700d1
add a md file
Oct 26, 2024
802b9f4
add a md file
Oct 26, 2024
17f7598
add a md file
Oct 26, 2024
6e2552b
add a md file
Oct 26, 2024
cad4f29
add a md file
Oct 26, 2024
5463086
add a md file
Oct 26, 2024
ac8596e
add md files
Oct 26, 2024
6df2ae0
add md files
Oct 26, 2024
6847db5
add md files
Oct 26, 2024
e1f32d9
add md files
Oct 26, 2024
2739683
add md files
Oct 26, 2024
a8f2e90
add md files
Oct 26, 2024
f584344
add md files
Oct 26, 2024
6d2e5e9
add a md file
Oct 27, 2024
5da088a
add an md file
Oct 27, 2024
84518d2
Update GaussianDiffusion_weight.md
weihythu Oct 28, 2024
ea0fb35
Update GaussianDiffusion_weight.md
weihythu Oct 28, 2024
4790d62
init json to c++ for live-dead
HaiwangYu Nov 4, 2024
90a8a38
json2c++ part 1
HaiwangYu Nov 4, 2024
c96f14c
json2c++ compiles
HaiwangYu Nov 4, 2024
6810d47
bug fix in Cluster::separate<>()
HaiwangYu Nov 4, 2024
4becde7
update extend.md
HaiwangYu Nov 5, 2024
fbecca4
mv Separate_1; add debug for isolated
HaiwangYu Nov 14, 2024
32333c7
add summary
HaiwangYu Nov 14, 2024
676cf9d
Separate_2 does not break clusters
HaiwangYu Nov 14, 2024
7d9b62e
update this ci test
HaiwangYu Nov 14, 2024
39d139f
Merge branch 'master' into apply-pointcloud
HaiwangYu Nov 14, 2024
6fa81e1
needed for jsoncpp v1_7_7e
HaiwangYu Nov 14, 2024
fe32bee
disable dnn by default
HaiwangYu Nov 15, 2024
a3b9ebe
careful replacing
HaiwangYu Nov 18, 2024
e4bfa2b
init GeomService
HaiwangYu Nov 19, 2024
8e7bda4
renaming to ClusGeomHelper
HaiwangYu Nov 20, 2024
2f3cc3c
add GeomHelper to PTBuilding
HaiwangYu Nov 21, 2024
d93b51b
modify the jsonnet configuration to allow run/subrun/event number to …
Nov 23, 2024
693b3dc
fix bug regarding returning radius from a series get_closest function…
Nov 24, 2024
2539cd2
fix a bug in the graph creation
Nov 25, 2024
1213f17
refactor separate to a free function
HaiwangYu Nov 25, 2024
81c315b
fix another bug of separation
Nov 25, 2024
6cad5ff
finish debugging separate function
Nov 26, 2024
3e3f89e
init merge back solution
HaiwangYu Nov 26, 2024
3374728
validated connect1 function
Nov 26, 2024
5313d7f
Merge branch 'apply-pointcloud' of github.com:WireCell/wire-cell-tool…
Nov 26, 2024
32f7b15
valdiating deghosting alg
Nov 27, 2024
c95d1b2
catch up
Nov 27, 2024
6ebdb90
reduce randomness and fix a bug
Nov 28, 2024
8a98214
improve alg
Nov 28, 2024
a215239
improve the code
Nov 28, 2024
37f3422
adding sorting code
Nov 28, 2024
97e7622
adding sorting code
Nov 28, 2024
ad37e86
update
Nov 28, 2024
87768e4
revert back
Nov 28, 2024
5b95674
update the boundary cuts
Nov 28, 2024
cf95098
update code to refactor graph operations
Nov 28, 2024
e7e4cd1
catch up
Nov 28, 2024
57eae0a
fixed a bug in the protect overcustering
Nov 29, 2024
a8ab41a
hack clustering_isolate for bee display
Nov 29, 2024
60ef13c
fix the order of sorting
Nov 29, 2024
10a8226
Fix case where user requests gzip but no chunking which is not a lega…
brettviren Nov 15, 2024
c9ed823
index is zero-based per plane
HaiwangYu Nov 7, 2024
358ac50
pass through the summary
HaiwangYu Nov 8, 2024
a0695c1
add some debugging output
HaiwangYu Nov 8, 2024
048f882
add summary
ebelchio12 Nov 4, 2024
a26810a
cleanup and add cmm (why commented out?)
HaiwangYu Nov 10, 2024
497275d
pass masks through
HaiwangYu Dec 2, 2024
dfdc3d2
clus working on sbnd
HaiwangYu Dec 3, 2024
6460f91
face propagated correctly
HaiwangYu Dec 4, 2024
c7b6dcf
Set doctest active log level based on build config setting, and chang…
brettviren Dec 4, 2024
b866813
Add method to sort the children list and a new 'ordered' notification…
brettviren Dec 4, 2024
892b238
Add node and (new) facade level separate() methods.
brettviren Dec 5, 2024
5477ff5
Use logging
brettviren Dec 5, 2024
3a0df80
Integrate new separate(), purge old.
brettviren Dec 5, 2024
1ee1e08
Add NaryTree::Node::separate() and NaryTree::FacadeParent::separate()
brettviren Dec 11, 2024
6d949cd
Implement and integrate new separate() (with optional remove) and cle…
brettviren Dec 11, 2024
7eb4024
Introduce destructive remove of child facade and merge pattern in tests.
brettviren Dec 11, 2024
6066c7e
Switch to using new, explicitly-destructive version of child removal.
brettviren Dec 11, 2024
b57533f
Facade level children sort method and test
brettviren Dec 11, 2024
97c212c
Merge remote-tracking branch 'remotes/origin/master+ap' into apply-po…
HaiwangYu Dec 19, 2024
ef9ccec
summary can be not wiener, for dnn-roi imaging
HaiwangYu Dec 19, 2024
1efb392
try bv's solution
HaiwangYu Dec 19, 2024
3e451e3
pass through face info using tp
HaiwangYu Dec 19, 2024
65eb8fa
Add merge and other changes
brettviren Dec 20, 2024
ba7b3bc
Add merge and perblob PC array accessors and other changes.
brettviren Dec 20, 2024
3f131aa
Remove entry from other_clusters BEFORE it is set to nullptr.
brettviren Dec 23, 2024
94514a9
Change merge's existingID default from 0 to -1 to add symmetry betwee…
brettviren Dec 23, 2024
ca74726
Reverse and remove asserts left hanging by prior commit which itself …
brettviren Dec 23, 2024
fea950e
fixed a bug in sorting cluster length in clustering_neutrino
Dec 24, 2024
9b9219f
fix a bug
Dec 24, 2024
6b1918e
Patch in use of storing CC array in pcarray to merge_clusters().
brettviren Dec 27, 2024
ffe603e
add some documentations
lastgeorge Jan 2, 2025
9c7dc1b
update code
lastgeorge Jan 3, 2025
8eaf87c
add info
lastgeorge Jan 3, 2025
87bc524
Update porting_dictionary.md
lastgeorge Jan 3, 2025
735bf4d
Update porting_dictionary.md
lastgeorge Jan 3, 2025
9b549e3
add info
lastgeorge Jan 3, 2025
69301f1
add info
lastgeorge Jan 3, 2025
426271c
add info
lastgeorge Jan 3, 2025
7a6e92d
Remove vestigial code
brettviren Jan 6, 2025
9787b90
Ignore SSL cert problems when downloading datarepo from www.phy.bnl.gov
brettviren Jan 6, 2025
5f859f1
Fix infinite loop that's been in a test approximately forever.
brettviren Jan 6, 2025
67250d4
Merge branch 'apply-pointcloud' of github.com:WireCell/wire-cell-tool…
brettviren Jan 6, 2025
108dd5c
Some cleanups of tests. Many more to do, but not for the merge. See…
brettviren Jan 6, 2025
6bcfe99
Quell compiler warning about unused variables.
brettviren Jan 8, 2025
3d2b36c
Require a valid Xregion
brettviren Jan 8, 2025
01416db
Merge master
brettviren Jan 8, 2025
e19a26c
We now allow more than one fiels file from detectors.jsonnet.
brettviren Jan 8, 2025
2c3089a
Fix various test regressions
brettviren Jan 8, 2025
54b5159
Fix size wrongness
brettviren Jan 8, 2025
c1ac390
Rename so we do not try to compile the jsonnet as a test file itself
brettviren Jan 8, 2025
29e7f4a
Prune which files are checked for being not empty with pos sigproc le…
brettviren Jan 8, 2025
82ca096
Initial release testing steps
brettviren Jan 8, 2025
e81e4d6
Remove unused variables
brettviren Jan 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,7 @@ configure
styles
*.heap
*.prof
*.debug
*.svg
AutoDict_*
spng
5 changes: 5 additions & 0 deletions apps/inc/WireCellApps/Main.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ namespace WireCell {
/// Add a log sink, reserved names 'stdout' and 'stderr' or a filename.
void add_logsink(const std::string& log, const std::string& level = "");

void apply_log_config();

/// Set a minimum level to emit a message for a given
/// log. (levels: critical, error, warn, info, debug, trace).
void set_loglevel(const std::string& log, const std::string& level = "");
Expand All @@ -107,6 +109,9 @@ namespace WireCell {
// Limit number of threads. 0 means set no limit. This is
// only relevant if we are built with TBB support
int m_threads{0};

std::unordered_map<std::string, std::string> m_log_levels;

};

} // namespace WireCell
Expand Down
17 changes: 13 additions & 4 deletions apps/src/Main.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,14 @@ void Main::add_logsink(const std::string& log, const std::string& level)
}
void Main::set_loglevel(const std::string& log, const std::string& level)
{
// std::cerr << "Set log \""<<log<<"\" to level \"" << level << "\"\n";
Log::set_level(level, log);
m_log_levels[log] = level;
// Log::set_level(level, log);
}
void Main::apply_log_config()
{
for (const auto& [log,level] : m_log_levels) {
Log::set_level(level, log);
}
}
void Main::add_config(const std::string& filename) { m_cfgfiles.push_back(filename); }

Expand All @@ -251,8 +257,7 @@ void Main::initialize()
Log::set_pattern("[%H:%M:%S.%03e] %L [%^%=8n%$] %v");
log = Log::logger("main");
log->set_pattern("[%H:%M:%S.%03e] %L [ main ] %v");
set_loglevel("", "debug");
// log->debug("logging to \"main\"");
log->debug("logging to \"main\"");

// Load configuration files
for (auto filename : m_cfgfiles) {
Expand Down Expand Up @@ -328,6 +333,10 @@ void Main::initialize()
namobj->set_name(name);
}

// We do this after setting names as INamed may have created a logger.
apply_log_config();
Log::fill_levels();

// Finally, ask any configurables for their default, merge with
// user config and give back.
for (auto c : m_cfgmgr.all()) {
Expand Down
6 changes: 6 additions & 0 deletions aux/docs/ClusterArrays.org
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,9 @@ The implementation landscape for persisting ~ICluster~ is illustrated:

Solid thick black edges represent exchange of data between WCT data flow graph nodes. Solid thin lines represent code dependency. Thick dashed edges represent file I/O. Note ~ClusterFile{Source,Sink}~ directly convert ~ICluster~ while ~TensorFile{Source,Sink}~ are general and the conversion to ~ITensor~ is performed by ~TensorCluster~ and ~ClusterTensor~.

* Meta :noexport:


#+begin_src sh :results none :output none
scp -r ClusterArrays.html ClusterArrays.pdf hierocles.bnl:public_html/wire-cell/docs/
#+end_src
7 changes: 7 additions & 0 deletions aux/docs/cluster-shadow.org
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,10 @@ each edge endpoint and then perform pair-wise set-theoretic operations
on the ~Rectangles~ object from each.

Examples and/or pointers to tests t.b.d.

* Meta :noexport:


#+begin_src sh :results none :output none
scp -r cluster-shadow.html cluster-shadow.pdf hierocles.bnl:public_html/wire-cell/docs/
#+end_src
6 changes: 6 additions & 0 deletions aux/docs/frame-files.org
Original file line number Diff line number Diff line change
Expand Up @@ -242,3 +242,9 @@ additional metadata:
- ~tag="tag"~ :: the associated index trace tag.
Note, it is undefined behavior if no matching index tensor exists.

* Meta :noexport:


#+begin_src sh :results none :output none
scp -r frame-files.html frame-files.pdf hierocles.bnl:public_html/wire-cell/docs/
#+end_src
6 changes: 6 additions & 0 deletions aux/docs/frame-tensor.org
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,9 @@ additional metadata:

Note, it is undefined behavior if no matching index tensor exists.

* Meta :noexport:


#+begin_src sh :results none :output none
scp -r frame-tensor.html frame-tensor.pdf hierocles.bnl:public_html/wire-cell/docs/
#+end_src
7 changes: 7 additions & 0 deletions aux/docs/noise.org
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#+title: WCT Noise Modeling
#+include: ../../docs/include-topic.org
#+export_file_name: noise-aux

* Overview

Expand Down Expand Up @@ -209,3 +210,9 @@ Or, run it all together as:
#+begin_example
aux/test/test-noise-roundtrip.sh
#+end_example

* Meta :noexport:

#+begin_src sh :results none :output none
scp -r noise-aux.html noise-aux.pdf hierocles.bnl:public_html/wire-cell/docs/
#+end_src
Binary file modified aux/docs/noise.pdf
Binary file not shown.
5 changes: 5 additions & 0 deletions aux/docs/talks/noise-presentation.org
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,11 @@ Interpolate so $n' \to n'' = \frac{N_2}{2} \triangleq \frac{N''_1}{2R_{21}},\ N_
If $N''_1 > N_2$ we may alias by pretending same periods.


* Meta :noexport:

#+begin_src sh :results none :output none
scp -r noise-presentation.pdf hierocles.bnl:public_html/wire-cell/docs/
#+end_src



Expand Down
5 changes: 5 additions & 0 deletions aux/docs/tensor-data-model.org
Original file line number Diff line number Diff line change
Expand Up @@ -368,3 +368,8 @@ ITensor::vector as_tensors(<concrete types>);
<concrete types> as_<concrete name>(<ITensor types>);
#+end_example

* Meta :noexport:

#+begin_src sh :results none :output none
scp -r tensor-data-model.html tensor-data-model.pdf hierocles.bnl:public_html/wire-cell/docs/
#+end_src
23 changes: 23 additions & 0 deletions aux/inc/WireCellAux/Bee.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// An API to interface with Bee that deals in IData.

#ifndef WIRECELLAUX_BEE
#define WIRECELLAUX_BEE

#include "WireCellUtil/Bee.h"
#include "WireCellIface/IBlobSet.h"
#include "WireCellIface/IBlobSampler.h"

namespace WireCell::Aux::Bee {

using WireCell::Bee::Points;

// Convert a blob set to a Bee Points object by applying the sampler. The
// sampler is expected to produce point cloud arrays named: "x", "y", "z"
// for point positions and may produce "charge_val" for a charge measure.
Points dump(IBlobSet::pointer bs, IBlobSampler::pointer sampler);
Points dump(const IBlob::vector& blobs, IBlobSampler::pointer sampler);

}


#endif
12 changes: 12 additions & 0 deletions aux/inc/WireCellAux/BeeTools.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// An API to interface with Bee that deals in IData.

#ifndef WIRECELLAUX_BEETOOLS
#define WIRECELLAUX_BEETOOLS

namespace WireCell::Aux::Bee {


}


#endif
5 changes: 4 additions & 1 deletion aux/inc/WireCellAux/BlobTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#ifndef WIRECELLAUX_BLOBTOOLS
#define WIRECELLAUX_BLOBTOOLS

#include "WireCellIface/IBlobSampler.h"
#include "WireCellIface/IBlobSet.h"

namespace WireCell::Aux {

Expand Down Expand Up @@ -54,5 +54,8 @@ namespace WireCell::Aux {
}
};

// Dump a summary of a cluster graph. If fingerprint, include more verbosity of channel-level info.
std::string dumps(const IBlobSet::pointer& bs);

}
#endif
3 changes: 2 additions & 1 deletion aux/inc/WireCellAux/ClusterHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

namespace WireCell::Aux {

std::string dumps(const cluster_graph_t& cgraph);
// Dump a summary of a cluster graph. If fingerprint, include more verbosity of channel-level info.
std::string dumps(const cluster_graph_t& cgraph, bool fingerprint=false);

/// Return JSON representation of the cluster.
Json::Value jsonify(const cluster_graph_t& cgraph);
Expand Down
9 changes: 9 additions & 0 deletions aux/inc/WireCellAux/SimpleBlob.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ namespace WireCell::Aux {
, m_blobs(blobs)
{
}
// Leaky abstraction: a blob set may span multiple slices
SimpleBlobSet(int ident, const IBlob::vector& blobs)
: m_ident(ident)
, m_slice(nullptr)
, m_blobs(blobs)
{
}
virtual ~SimpleBlobSet();

virtual int ident() const { return m_ident; }
Expand All @@ -64,6 +71,8 @@ namespace WireCell::Aux {

virtual IBlob::vector blobs() const { return m_blobs; }

void insert(const IBlob::pointer& blob) { m_blobs.push_back(blob); }

int m_ident;
ISlice::pointer m_slice;
IBlob::vector m_blobs;
Expand Down
5 changes: 5 additions & 0 deletions aux/inc/WireCellAux/SimpleSlice.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ namespace WireCell::Aux {
SimpleSlice(IFrame::pointer frame, int ident, double start, double span, const ISlice::map_t& activity)
: m_frame(frame), m_ident(ident), m_start(start), m_span(span), m_activity(activity) { }

// Construct with no activity, user must fill in after construction.
SimpleSlice(IFrame::pointer frame, int ident, double start, double span)
: m_frame(frame), m_ident(ident), m_start(start), m_span(span) { }

virtual ~SimpleSlice() {}

// ISlice interface
Expand All @@ -22,6 +26,7 @@ namespace WireCell::Aux {
double start() const { return m_start; }
double span() const { return m_span; }
map_t activity() const { return m_activity; }
map_t& activity() { return m_activity; }
};
}

Expand Down
2 changes: 1 addition & 1 deletion aux/inc/WireCellAux/Util.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ namespace WireCell {
return ITensor::pointer(st);
}

}; // namespace Aux
} // namespace Aux
} // namespace WireCell

#endif // WIRECELLSIG_UTIL
36 changes: 36 additions & 0 deletions aux/src/Bee.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#include "WireCellAux/Bee.h"
#include "WireCellUtil/RaySamplers.h"

using namespace WireCell;

Aux::Bee::Points Aux::Bee::dump(IBlobSet::pointer bs, IBlobSampler::pointer sampler)
{
return dump(bs->blobs(), sampler);
}

Aux::Bee::Points Aux::Bee::dump(const IBlob::vector& blobs, IBlobSampler::pointer sampler)
{
Aux::Bee::Points bee;

for (const auto& iblob : blobs) {
auto [pc, aux] = sampler->sample_blob(iblob, iblob->ident());
auto x = pc.get("x")->elements<double>();
auto y = pc.get("y")->elements<double>();
auto z = pc.get("z")->elements<double>();
PointCloud::Array::span_t<double> q;
auto qarr = pc.get("charge_val");
if (qarr) {
q = qarr->elements<double>();
}

const size_t npts = x.size();
for (size_t ind=0; ind<npts; ++ind) {
double charge = 0;
if (q.size()) {
charge = q[ind];
}
bee.append({x[ind], y[ind], z[ind]}, charge);
}
}
return bee;
}
36 changes: 36 additions & 0 deletions aux/src/BlobTools.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "WireCellAux/BlobTools.h"
#include "WireCellUtil/Units.h"

using namespace WireCell;

Expand Down Expand Up @@ -33,3 +34,38 @@ Aux::BlobCategory::BlobCategory(const IBlob::pointer& iblob)
}
stat = Status::okay;
}


#include <unordered_set>
std::string Aux::dumps(const IBlobSet::pointer& bs)
{
std::stringstream ss;

const size_t nbcats = BlobCategory::size();
std::vector<size_t> blob_cats(nbcats, 0);
std::unordered_set<ISlice::pointer> slices;

for (auto iblob: bs->blobs()) {
Aux::BlobCategory bcat(iblob);
++blob_cats[bcat.num()];
slices.insert(iblob->slice());
}

ss << "Blobset ident:" << bs->ident()
<< " spans " << slices.size() << " slices, main slice:";
auto islice = bs->slice();
if (islice) {
ss << islice->ident() << " with " << islice->activity().size() << " activities, span="
<< islice->start()/units::us << "+" << islice->span()/units::us << " us";

}
else {
ss << "(none)";
}
ss << " bcats:[";
for (size_t icat=0; icat < nbcats; ++icat) {
ss << " " << BlobCategory::to_str(icat) << "=" << blob_cats[icat];
}
ss << " ]";
return ss.str();
}
Loading