Commit baca3405 authored by CD's avatar CD
Browse files

update to ans-log recording (within the dm-noise hook) so th

at it only records every 5 seconds
parent 3f631736
# Port settings for ACT-R server started at 15:58:58 10/31/2020 # Port settings for ACT-R server started at 15:17:59 11/01/2020
set actr_port 2650 set actr_port 2651
set actr_address "192.168.1.118" set actr_address "192.168.1.118"
...@@ -84,17 +84,20 @@ ...@@ -84,17 +84,20 @@
(if (<= arous-dm-noise arous-mid) (if (<= arous-dm-noise arous-mid)
(progn (progn
(setf noise-val (/ (+ (* arous-dm-noise (AA-nom-dm-noise aa)) (* (- arous-mid arous-dm-noise) (AA-max-dm-noise aa))) arous-mid)) (setf noise-val (/ (+ (* arous-dm-noise (AA-nom-dm-noise aa)) (* (- arous-mid arous-dm-noise) (AA-max-dm-noise aa))) arous-mid))
(with-open-file ;We only record every 5 seconds
(n-stream "ans-log.txt" :direction :output :if-exists :append :if-does-not-exist :create) (when (eq (mod (mp-time-ms) 5000) 0)
(format n-stream "~a~T~10$~&" (mp-time) noise-val)) (with-open-file
(n-stream (format nil "Phys-data/ans-log~a.txt" (phys-module-pipeID (get-module physio))) :direction :output :if-exists :append :if-does-not-exist :create)
(format n-stream "~5$,~10$~&" (mp-time-ms) noise-val)))
(setf noise-val (act-r-noise noise-val)) (setf noise-val (act-r-noise noise-val))
noise-val) noise-val)
(progn (progn
(setf noise-val (/ (+ (* (- (AA-max-arous aa) arous-dm-noise) (AA-nom-dm-noise aa)) (* (- arous-dm-noise arous-mid) (AA-max-dm-noise aa))) arous-mid)) (setf noise-val (/ (+ (* (- (AA-max-arous aa) arous-dm-noise) (AA-nom-dm-noise aa)) (* (- arous-dm-noise arous-mid) (AA-max-dm-noise aa))) arous-mid))
;(when (and (>= (mod (mp-time) 5) 0) (<= (mod (mp-time) 5) 1)) ;(when (and (>= (mod (mp-time) 5) 0) (<= (mod (mp-time) 5) 1))
(with-open-file (when (eq (mod (mp-time-ms) 5000) 0)
(n-stream "ans-log.txt" :direction :output :if-exists :append :if-does-not-exist :create) (with-open-file
(format n-stream "~5$~T~10$~&" (mp-time) noise-val)) (n-stream (format nil "Phys-data/ans-log~a.txt" (phys-module-pipeID (get-module physio))) :direction :output :if-exists :append :if-does-not-exist :create)
(format n-stream "~5$,~10$~&" (mp-time-ms) noise-val)))
(setf noise-val (act-r-noise noise-val)) (setf noise-val (act-r-noise noise-val))
noise-val)))) noise-val))))
......
<ini> <ini>
<windowtop> 859 </windowtop> <windowtop> 996 </windowtop>
<windowleft> 1182 </windowleft> <windowleft> 2126 </windowleft>
<windowhigh> 189 </windowhigh> <windowhigh> 189 </windowhigh>
<windowwide> 377 </windowwide> <windowwide> 377 </windowwide>
<windowstate> 0 </windowstate> <windowstate> 0 </windowstate>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment