Mercurial > hg > jslab
comparison src/scheme/joints.scm @ 0:bf79fb79ee13
Initial Mercurial check in.
author | samer |
---|---|
date | Tue, 17 Jan 2012 17:50:20 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:bf79fb79ee13 |
---|---|
1 | |
2 (define (joints x min max) | |
3 (define nd (.getNode x)) | |
4 (define dir (java.io.File. (.getName nd))) | |
5 | |
6 (Shell.push nd) | |
7 | |
8 ; could just make a map and put it | |
9 (put "joint.histogram.map.symmetric" #f) | |
10 (put "joint.histogram.map.maximum" max) | |
11 (put "joint.histogram.map.minimum" min) | |
12 (put "joint.histogram.vector" x) | |
13 (put "joint.histogram.bins.dir" dir) | |
14 ) | |
15 | |
16 (define (joint a b) | |
17 ; need to set: | |
18 ; map domain | |
19 ; filename for saved histogram | |
20 ; node for this histogram | |
21 | |
22 (define x (get "joint.histogram.vector")) | |
23 (define dir (get "joint.histogram.bins.dir")) | |
24 (define name (string-append "j" (.toString a) "v" (.toString b))) | |
25 (.mkdirs dir) | |
26 (put "joint.histogram.bins.file" (java.io.File. dir name)) | |
27 (addtask | |
28 ; (node name | |
29 (JointHistogram. x 128 a b) | |
30 ; ) | |
31 ) | |
32 ) | |
33 | |
34 | |
35 (define s (.output ica)) | |
36 (define e (viewable "prior.e")) | |
37 (define log_s (vecfn s (LogAbs.) "log_s")) | |
38 (define energy (vecfn s (Square.) "energy")) | |
39 | |
40 (joints s -60 60) | |
41 (joint 79 229) | |
42 (joint 237 229) | |
43 (Shell.pop) | |
44 | |
45 (joints e 0 12) ; was 10 | |
46 (joint 79 229) | |
47 (joint 237 229) | |
48 ;(Shell.pop) | |
49 | |
50 (joints log_s -8 8) ; was -6 8 i think | |
51 (joint 79 229) | |
52 (joint 237 229) | |
53 ;(Shell.pop) | |
54 | |
55 (joints energy 0 3600) | |
56 (joint 79 229) | |
57 (joint 237 229) | |
58 (Shell.pop) |