annotate src/scheme/joints.scm @ 8:5e3cbbf173aa tip

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