***************************************************************** Do not modify this file. This is not a working expriment. ** Rather it's an utility that can be used by other experiments.***************************************************************** Before INCLUDEing this file, you should define EXPT-STEPS to run some number of STEPS (for each data-point), EXPT-DELTA to perform the STEPS (time correlation) and/or SHIFTS (space correlation) that will only be allowed to affect CAM-B, and INIT-CONFIG to perform any necessary preprocessing of the initial configuration. You should also CREATE-FILE a data file to hold the accumulated data points, and OPEN-DATA this file, again before INCLUDEing this file; and define a color map so that its >INTEN output is the signal that you wish to count. See HPP-CORR.EXP for eg. \ Autocorrelation extensions (see screen 0) 30Mar89nhm BASE @ HEX : POINT# ( -- n ) DATA-PTR 2@ DROP 4 / ; : END-POINT ( -- n ) [ DOS ] ?DATA MAXREC# @ 1+ 20 * ; : CLEAR-AUTODATA REWIND END-POINT 100 / 0 DO 400 DATA-ADDR 400 ERASE UPDATE LOOP REWIND CLOSE-DATA ; \ Autocorrelation extensions -- INCLUDE in EXP 11Mar89nhm CR .( Put initial PAT on planes 0 and 1, then use Alt-X to start the experiment.) CR .( When running, press any key to end: expt will finish current point and stop.) B=A : RUN-EXPT WHOLE-AREA 0 PL>PB 1 PL>PB BEGIN NEW-EVENTS EXPT-STEPS IDLE EVENT-TOT 2DROP PUT-DATA PUT-DATA 0 PL>PB 1 PL>PB EXPT-DELTA IDLE 0 PB>PL 1 PB>PL ASCII . EMIT POINT# END-POINT = PEEK OR UNTIL CLOSE-DATA POINT# . ; \ Autocorrelation extensions -- INCLUDE in EXP 11Mar89nhm : Run.correlation.expt ARG? IF ARG 4* 0 DATA-PTR 2! THEN INIT-CONFIG DATA-PTR 2@ OR 0= IF CLEAR-AUTODATA 0 PL>TEMP 2 TEMP>PL 1 PL>TEMP 3 TEMP>PL THEN RUN-EXPT CR CLOSE-DATA ; ALIAS X .( [Optional arg. is restart point.]) : Print.autocorr.data BASE =ARG DATA-PTR 2@ REWIND CR BEGIN POINT# 6 .R GET-DATA GET-DATA SWAP C UD.R CR POINT# END-POINT = PEEK OR UNTIL DATA-PTR 2! ; ALIAS A .( [Arg is BASE; hit a key to stop print.]) CR .( The next three keys are defined for testing purposes:) : Initialize.for.test INIT-CONFIG 1 0 1 0 PERMUTE ; ALIAS I .( [PAT on 0&1, then press this.]) : Clear.EVENT-TOT NEW-EVENTS ; ALIAS Z .( [Use before running some steps.]) : Print.EVENT-TOT BASE =ARG IDLE EVENT-TOT 2DROP UD. ; ALIAS P .( [Arg is BASE; use after running.]) BASE !