Summary Documentation The Runtime and Summary programs complement but do not communicate with one another. On-line data analysis is performed by the Runtime program (forth.com) which is a compiled program (except for setting parameters in the menus.scr file) whereas off-line data analysis is performed by the Summary program (summary.scr) which is a collection of routines that are compiled as needed. The Summary program was designed to be compiled on demand because it was envisioned that off-line analysis would allow for greater flexibility to analyze the data in alternative ways. For example, the Runtime normally defines a conditioned stimulus as any movement of 0.5 mm or greater in the CS period, whereas the experimenter could decide to reanalyze the data using another criterion as we did in our experiments trying to replicate other's results (1.0 mm criterion) or when looking for the elusive conditioned response that supposedly survived a cerebellar lesion (0.2 mm cirterion). The reanalysis requires changing only one parameter, but the differences between the Runtime and Summary analyses can be fundamentally different. For example, the Summary program calculates trials-to-criterion, including conditioned responses in the US period on tone alone trials, which the Runtime program does not. The three routines for data analysis (analysis from data disk, from library disk, from RAM) are the most commonly used Summary programs. The most commonly used Summary routine reports the analysis done by the Runtime program (menu option 3, analysis from RAM if the Runtime). The least used routine uses a previous analysis that has been saved on a "library" disk (menu option 2, analysis from statistics saved on a library disk). Both of these routines use the preliminary analysis done by the Runtime program. It is assumed that the parameters match in both the Runtime and Summary programs. The parameters are in menus.scr for the Runtime, and on the last screen of the Summary file (summary.scr). If for some reason these parameters do not match then the final numbers will not make sense. This stresses the importance of checking the results of the analysis. In most instances both the Runtime and Summary programs would be set to analyze the data in the same way using RAM. To reanalyze the data using different parameters, the Summary routine reexamines the originally collected data (menu option 1, analysis from data disk). A word is in order about the disks and files commonly used by our Forth system. The programs (forth.com and summary.scr) are found on the storage device called programdrive. Normally, programdrive is set to be the A (floppy) or C (hard) drives. The program drive can be changed to D, for example, with the Forth command " d" programdrive s!<return> in MasterForth (remember that spaces are important in Forth). Data is normally stored in a file called data.scr that is found on datadrive. Normally, datadrive is set to be B (floppy). The datadrive can be changed to the hard drive C with " c" datadrive s!<return> . Since data.scr is the default file used by Runtime to store data, to prevent writing over the data the file is renamed using either Forth or DOS or Windows. In MasterForth data.scr can be rename to animal6.t1 with renaming data.scr,animal6.t1<return>. Finally, the statistics for each trial that have been calculated by the Runtime or Summary programs can be saved in the extensible file library.scr found on librarydrive. As with the program and data drives, the library drive can be changed to the hard drive C with " c" librarydrive s!<return>. The program, data and library drives can all be made to be the same device if desired; the functions will be kept separate because they operate on different file names (forth.com, data.scr and library.scr). The Summary program also has other routines for data analysis. The most commonly used is the 'review' program which gives a graphical display of all the trials. There are two review programs, one which allows trial data to be averaged (menu option 8), the other having the additional feature of allowing cross-correlations (menu option 13). The review programs (particularly option 8) are useful for examining the data to make sure that subsequent Summary analyses are correct: an incorrect picture of the data is a big clue that the parameters for analysis are not set correctly. The review program pictures have been used extensively in the figures used in this handbook. The review program with cross-correlations (menu option 13) automatically loads the file cross.scr. After the review programs the next most common Summary program is analysis of z-scores (menu option 14). The menu and parameters for z-score analysis are found in the Summary program, but the actual code for z-score analysis is loaded from the file z.scr which is called by Summary. As can be surmised, many of the analysis routines in the Summary program require the same code. Rather than creating separate files for each of the routines causing enormous redundancy, and the possibility of introducing errors when different routines might vary in parameters and coding, the analysis routines in the Summary program share common coding whenever possible. For examples: the variable, constants and array names and their functions are the same in all the routines that use them; all scaling of the data is the same; all programs that add events up during the trial use the same routine; all references to the time of the event (the bin number) are the same; etc. Beyond the simple concept of economy of programming, this strategy ensures that the programs are internally consistent and predictable. In the following, we have edited out comments and code (e.g., works-in-progress) that might be confusing. We also have the luxury of adding extensive comments and formatting the definitions in ways that more readily document their functions. This program is written entirely in Forth but, as we have mentioned previously, all programming shares common structures that make translating this code into another programming language fairly easy. Because this is a menu-driven program, Summary uses commands to compile single (load) or a range (thru) of screens. As with the other programs in this appendix, the screen numbers are included. The last screen of the summary.scr file (screen 84) deserves special comment: it is used to hold common parameters used for analysis. The timing parameters are given in terms of milliseconds because these are more familiar to the user. For the Summary program to analyze the data in the same way as the Runtime program, these parameters must match in the two programs (the parameters are found in the menus.scr file for the Runtime). Both the Summary and Runtime programs convert these times into the bin numbers of the events. These parameters are always on the very last screen of the summary.scr file even if the file size shrinks by cutting programs or expands with new programs, therefore it is not always necessarily screen 84. The proper generic way of finding this screen is to find the end of the file using the command size 1-. (The end is one less than size because Forth counts the first screen as 0 [zero], therefore the last screen is one less than the size.) Instead of using option 9 in the Summary program for changing the parameters here, we use the Forth editor and the command size 1edit<return>. \ screen 0 \ SUMMARY file \ THIS PROGRAM IS AN UNPUBLISHED WORK FULLY PROTECTED BY THE \ UNITED STATES COPYRIGHT LAWS AND IS CONSIDERED A TRADE SECRET \ BELONGING TO THE COPYRIGHT HOLDERS. \ \ COPYRIGHT (C) 1985-2000, J.E. Steinmetz and D.G. Lavond. \ All rights reserved. \ screen 1 \ this screen controls all loading of the Summary routines NEED HEATH NEED SUMMARY NOT \IF FORGET HEATH NOT \IF FORGET SUMMARY CREATE SUMMARY \ this word marks the beginning of the summary program. variable acq/ext acq/ext on \ on=acquisition,off=extinction \ this switch determines whether CRs (acquisition) or \ nonCRs (extinction) are used for analysis. variable auto auto off \ on=assume default parameters, \ off=user will be asked to enter training parameters. \ this selects between manual or automatic analysis variable tsr tsr on \ tsr stands for Terminate Stay Resident. \ on=load routine & quit; allows manual analysis \ off=load, analyze, return to menu variable tonealonecrsinusperiod tonealonecrsinusperiod on \ on=count CRs on tone alone trials if fall in CS or US period \ off=count CRs on tone alone trials only if in CS period NEED AUXILLIARY \IF 0 CONSTANT AUXILLIARY NEED PRINTING printing off \IF VARIABLE PRINTING NEED DEFAULT' \IF 0 VALUE DEFAULT' 0 VALUE DEFAULT'' need badunits \if variable badunits WARNING ON \ a compiler command that give warning during compilation that \ same word has more than one definition. 2 LOAD 3 LOAD 4 LOAD NEED SUMMARY \ summary extensions \ text for selection \ run summary option NOT \IF FORGET SUMMARY \ scrren 2 \ extensions : INP ( adr--) \ used to input selection from summary menu. RAM DROP 10 EXPECT SPAN @ IF RAM DROP SPAN @ VAL 2DROP SWAP ! ELSE ( return is no change) DROP THEN ; VARIABLE SELECTION \ holds user response for menu option. \ following are shorthand defiitions used for loading programs by function ... \ the numbers refer to screen numbers. : VBLS 5 6 THRU ; \ most basic variables. : VARS 5 9 THRU ; \ more extensive variables. : ZZ ( 10 EDIT) 10 11 THRU ; \ z-score routine. : REV 12 24 THRU ; \ basic review routine. : +rev 77 load ( extra words) ; \ additional review routine definitions. : TBL 73 75 THRU ; \ routine to create trial sequence. : PRNTR 25 LOAD ; \ Epson and HP printer commands. : DEFAULTS 26 28 THRU ; \ routine to load & convert parameters on screen 84. : REV/CROSS 76 LOAD ; \ review with cross-correlation routine. : ANAL 29 47 THRU ; \ common analysis routines. : A>L 48 50 THRU ; \ auxilliary memory to library transfer routine. : .LIB 52 LOAD ; \ routine to print contents of library disk. : L>A 51 LOAD ; \ library to auxilliary memory transfer routine. : TESTS 54 64 THRU ; \ test using trials-to-criterion routine. : CRIT 55 60 THRU ; \ main trials-to-criterion routine. : MEAS 64 LOAD ; \ common trial measurement routine. : LSR " LASER" INCLUDE ; \ routine to print graphics screen to HP laser printer. : good/evil 29 40 thru ; \ routine to determine good vs. bad trials. : askiing " askiing" include ; \ routine to export data disk as an ASCII file. \ screen 3 \ this is the menu that is displayed on the monitor DARK .( Select analysis from this list: ) CR CR CR .( 1. Analysis from raw data stored on a DATA disk ) CR .( 2. Analysis from data stored on a LIBRARY disk ) CR .( 3. Analysis from data stored in RAM ) CR .( 4. Analyse data, store in LIBRARY, no printout ) CR .( 5. Create a new trial type table ) CR .( 6. Display contents of a LIBRARY disk ) CR .( 7. Move data from LIBRARY disk to RAM ) CR .( 8. Graphics review of a DATA disk ) CR .( 9. Reset system and summary parameters ) CR .( 10. Move data from RAM to a LIBRARY disk ) CR .( 11. unused ) CR .( 12. Convert data file to ascii for spreadsheets ) CR .( 13. Graphics review with correlations of DATA disk ) CR .( 14. Standard Z-scores anaysis of DATA disk ) CR CR CR .( Enter Selection Number: ) SELECTION INP DARK \ screen 4 : SELECTING ( --) \ handle selection from menu. SELECTION @ ( n) DUP 0 = IF DROP abort THEN DUP 1 = IF VARS PRNTR MEAS CRIT ANAL A>L THEN DUP 2 = IF VARS PRNTR L>A CRIT ANAL THEN DUP 3 = IF VARS PRNTR CRIT ANAL A>L THEN DUP 4 = IF VARS MEAS A>L THEN DUP 5 = IF TBL THEN DUP 6 = IF PRNTR .LIB THEN DUP 7 = IF VARS PRNTR L>A THEN DUP 8 = IF VARS LSR REV +rev THEN DUP 9 = IF SIZE 1- EDIT THEN DUP 10 = IF VBLS A>L THEN DUP 11 = IF SRL THEN DUP 12 = IF askiing THEN DUP 13 = IF VARS REV/CROSS REV +rev THEN ( n) 14 = IF VARS crit good/evil ZZ THEN ; SELECTING \ screen 5 \ VARS, VBLS: initialization of 16-bit variables DARK .( INITIALIZING VARIABLES) variable TYPES variable TRIALDUR variable DACHAN variable CHANCHK variable CS1ON variable CS1OFF variable CS2ON variable USON variable GDTRLS variable BASA variable BLKMK variable BDTRLMK variable CRCHK variable TRLTYPE variable TTBLKS variable TTTPB variable TTSER variable LIBSCN variable LIBCNT variable LIBSTART \ number of different types of trials, e.g., cs, us, cs-us ... \ duration of trial in milliseconds. \ number of data channels. \ channel check. \ time of cs1 (e.g., tone) onset in milliseconds. \ time of cs1 (e.g., tone) offset in milliseconds. \ time of cs2 (e.g., light) onset in milliseconds. \ time of us (i.e., air arrival or shock) onset in milliseconds. \ number of good trials. \ baseline amplitude? \ marker for current block \ bad trial mark. \ flag for cr check. \ current trial type under analysis or review. \ total number of blocks (trials)? \ total number of trial types per block? \ number of trial type series being used. \ library screen. \ count of library screens. \ start number of library screen for analysis. CREATE CHANARR MAX#A/D 2* ALLOT \ array for keeping track of a/d channel. variable UN1 variable UN2 \ unit 1. \ unit 2. \ variable CRITLEVEL ( criterion for CR * 0.1 mm) -- already defined in runtime program. 12 string data$ \ string to hold ascii representation of a number. see defaults. \ screen 6 \ VARS, VBLS: default parameters : OFFSET ( -- n) \ offset within BIG array for channel. #TRLS @ AREA * CHANCHK @ * + ; \ arrays - creation and zeroing ... CREATE BIG HERE 32 DUP ALLOT ERASE BIG 0 + CONSTANT BAS \ average baseline amplitude. BIG 2 + CONSTANT BTRL \ baseline +/- deviation preceding cs onset by \ time set in BASELN. BIG 4 + CONSTANT CRAMP \ peak positive deviation of behavior in cs period. BIG 6 + CONSTANT CRAREA \ cumulative positive area of behavior in cs period. BIG 8 + CONSTANT CRPEAK \ latency of cramp. BIG 10 + CONSTANT URAMP \ peak positive deviation of behavior in ucs period. BIG 12 + CONSTANT URAREA \ cumulative positive area of behavior in ucs period. BIG 14 + CONSTANT URPEAK \ latency of uramp. BIG 16 + CONSTANT ONSET \ latency to 1/2 mm response (= cr or ur onset). BIG 18 + CONSTANT PCSU1 \ count of unit 1 in preCS (baseline) period. BIG 20 + CONSTANT CSU1 \ count of unit 1 in CS period. BIG 22 + CONSTANT USU1 \ count of unit 1 in US period. BIG 24 + CONSTANT PCSU2 \ count of unit 2 in preCS (baseline) period. BIG 26 + CONSTANT CSU2 \ count of unit 2 in CS period. BIG 28 + CONSTANT USU2 \ count of unit 2 in US period. ( BIG 30 + CONSTANT UNNAMED -- not used, originally PCS positive area) CREATE TTARR 256 ALLOT \ trial type array holds trial sequence. : round ( bin/100 timeinmsec -- bin/100 #binsrounded) \ routine to do division and round to nearest whole number based on the size of the remaining fraction. over >r 10 um* r@ um/mod swap r@ 2/ + r@ / + r> drop ; DEFAULTS \ load in default parameters from last screen, converting ascii numbers to binary. \ screens 7 and 8 \ VARS: arrays for session and block summaries \ double number (32-bit) arrays ... CREATE CRAMPA TYPES @ CREATE CRAREAA TYPES @ CREATE CRPEAKA TYPES @ CREATE URAMPA TYPES @ CREATE URAREAA TYPES @ CREATE URPEAKA TYPES @ CREATE ONSETA TYPES @ CREATE CRCNTA TYPES @ 4 * ALLOT 4 * ALLOT 4 * ALLOT 4 * ALLOT 4 * ALLOT 4 * ALLOT 4 * ALLOT 4 * ALLOT \ cr amplitude array. \ cr area under the curve array. \ cr peak latency array. \ ur amplitude array. \ ur area under the curve array. \ ur peak latency array. \ onset 0.5 mm array or maximum trial time. \ cr count array. \ integer (16-bit) arrays ... CREATE BDTRLA TYPES @ CREATE GDTRLA TYPES @ 2* ALLOT 2* ALLOT \ bad trial array. \ good trial array. \ byte (8-bit) arrays ... CREATE CRTARR CREATE BDTARR create extarr #TRLS @ #TRLS @ #trls @ \ word length (16-bit) arrays ... CREATE PCSUA1 TYPES @ CREATE CSUA1 TYPES @ CREATE USUA1 TYPES @ CREATE PCSUA2 TYPES @ CREATE CSUA2 TYPES @ CREATE USUA2 TYPES @ ALLOT ALLOT allot \ cr trial array. \ bad trial array. \ extinction trial array. 2* ALLOT 2* ALLOT 2* ALLOT 2* ALLOT 2* ALLOT 2* ALLOT \ preCS unit 1 count array. \ CS unit 1 count array. \ US unit 1 count array. \ preCS unit 2 count array. \ CS unit 2 count array. \ US unit 2 count array \ the following use TRLTYPE @ as the base for indexing into the arrays defined above ... : WALK ( adr -- adr+offset) \ use for 16-bit numbers. TRLTYPE @ 2* + ; : HOP ( adr -- adr+offset) \ use for 32-bit numbers. TRLTYPE @ 4 * + ; \ screen 9 \ VARS: trial type series display : DSPTTS ( --) \ display descriptions of trial type choices. types @ DUP 2 = IF ( 2 trial types) SIZE 1- 5 - BLOCK PAD 1+ 256 CMOVE THEN DUP 3 = IF ( 3 trial types) SIZE 1- 5 - BLOCK 256 + PAD 1+ 256 CMOVE THEN 4= IF ( 4 trial types) SIZE 1- 5 - BLOCK 512 + PAD 1+ 256 CMOVE THEN 40 DO ASCII 1 I + EMIT ." )" PAD 1+ 64 I * + 64 TYPE CR LOOP ; : LOADTT ( --) \ choose then load trial type array into ttarr. DARK CR ." WHICH TRIAL TYPE SERIES ? " CR CR DSPTTS CR CR ." SELECT ONE: " auto @ if 1 ttser ! ( default trial type series is the first choice) else bell ttser inp then TTARR 256 BL FILL types @ SIZE 1- 5 - + BLOCK TTSER @ 1- 256 * + ( fr) TTARR ( to) 256 ( #) CMOVE ; : LOADTTC ( --) \ execution word for displaying, selecting and loading trial type for analysis. types @ 1 > IF LOADTT ELSE TTARR 256 ASCII 1 FILL THEN CR CR ." TRIAL TYPE TABLE: " CR TTARR #TRLS @ TYPE ; LOADTTC FORGET DSPTTS \ flow control for selecting parameters automatically or manually ... auto @ not \if CR CR .( Hit a key to continue ) bell KEY DROP ( ***) \ screens 10 and 11 \ z- score analysis, enter ranges variable #periods : 3rd ( -- n) \ divide CS period into thirds to define epoch size. 3 #periods ! toneon 3 / ; 4 constant d#bytes create ranges 0 , 0 , here ( will hold #ranges = ranges @ ) \ this array defines the epochs used for z-score analysis. toneon dup 3rd - swap , , \ e.g., PCS3/3 = SD,mean shkon 3rd - 3rd dup 3rd - swap , , \ e.g., CS1/3 shkon 3rd dup 3rd - swap , , \ e.g., CS2/3 shkon dup 3rd - swap , , \ e.g., CS3/3 shkon dup 3rd + ,, \ e.g., UCS1/3 shkon 3rd + dup 3rd + ,, \ e.g., UCS2/3 shkon 3rd + 3rd + dup 3rd + ,, \ e.g., UCS3/3 here swap - d#bytes u/ ranges ! \ store number of ranges in place of 0 0; e.g. 7 \ Instructions: \ Make certain the differences for each range are the same. \ including z.scr including z.blk \ original Thompson et al. 1976 z-score analysis \ original and analysis for zscores by block short \ the following are reminding instructions printed to the monitor screen ... dark .( Type FLUSH <return>, PRINTING ON <return>, ) cr .( then open data file [e.g., USING B:DATA.SCR <return>],) cr .( and then type RUN <return> to start analysis) cr defined z.blk nip \| .( or type BLKRUN <return> for cooling.) cr | .( Use LONG or SHORT to vary amount of printout.) cr .( Set #a/d and #units.) cr roadrunner \ warning sound aka beep-beep. ABORT \ screens 12 - 24 \ graphics review routines. : GET ( n--) \ get trial n from the open data file. DUP TRL# ! TTARR TRL# @ 1- + C@ ASCII 0 - TYPETABLE + C@ DUP TYPE# ! BLOCKTYPE# C! ( n) BLOCK ( adr) DUP ALLOCATE ( adr=fr) RAM DROP 1K + ( to) 1K ( #) CMOVE PRESERVE ; : DRAWING ( --) \ measure and display trial from data file. \ use: 1 get drawing<return> shows trial 1 on the screen from the open data file. dark MEASURE DRAW ; : EXTENT ( fr to--) \ add trials through the range to-fr. \ accumulates but does not average. \ used to prepare for averaging trials. ." Adding trial #: " 1+ SWAP DO 16 21 AT I 0 4 D.R I GET +GRAPH NUF? IF LEAVE THEN LOOP ; : INIT ( --) \ zero the number of trials accumulated/averaged. WIPE 0 COUNTER ! ; NEED WIPEOUT \; : WIPEOUT ( --) 20 22 ERADICATE 0 21 AT ; : WAIT ( --) 0 23 AT ." Press any KEY to continue" KEY DROP WIPEOUT ; NEED MIRAGE \; : MIRAGE WIPEOUT ." Laser not loaded" CR WAIT DARK USED ; : GRAPHS ( fr to--) \ accumulate and average trials over the range to-fr. INIT EXTENT /GRAPHS BLOCKMEASUREMENTS BLOCKDISPLAY ; variable station \ determines which set of data to display. : READING ( --) \ display statistics for trial. 0 22 AT INFO STATION @ 1- AREA * + 32 BOUNDS DO I @ S>D I INFO 6 + = I INFO 12 + = OR IF 6 ELSE 4 THEN D.R 2 +LOOP ; : DIRECTORY ( --) \ displays directory then accepts filename. DARK DIR 0 23 AT " New DATA directory or ESC: " DIALOG OVER C@ ESC# = OVER EOL# = OR IF 2DROP ELSE CD THEN ; 2VARIABLE CONTINUOUS 0 0 CONTINUOUS 2! \ controls manual or automatic advance of display through trials. : CONVERSE ( -- fr to) \ enter start and end trials for averaging. WIPEOUT ." Enter Beginning Trial # " GET# D>S WIPEOUT ." Enter Ending Trial # " GET# D>S WIPEOUT ; : ADDER ( --) \ add trials through queried range. CONVERSE EXTENT WIPEOUT ." X again, or /B to display" ; : AVERAGE ( --) \ average trials through queried range. CONVERSE GRAPHS WIPEOUT READING ; : INFORMATION ( --) \ show notes entered about averaged data stored on graphics disk. INFO 65 BLANK 0 BLOCK WIPEOUT ." Enter Line# (0-15) " GET# DROP 15 MIN 0 MAX 64 * + WIPEOUT ." Enter Line Info (<64) " INFO 64 EXPECT INFO SWAP SPAN @ CMOVE UPDATE WIPEOUT ; VLU G-DISK VLU D-DISK \ temporary graphics.scr disk marker. \ temporary data.scr disk marker. : BLOCKOFFSET ( --o) \ select a subregion with a block. CR ." Enter Block Offset " GET$ VAL 2DROP TOTALPTS * DUP TOTALPTS + 1K 4 - > IF R> DROP BEEP WIPEOUT ." Offset ERROR " D-DISK IS DEFAULT WAIT DROP EXIT THEN ; : SAVE ( --) \ store average to graphics.scr disk. WIPEOUT FILENAME TYPE CR G-DISK IS DEFAULT ." Enter Destination Block " GET# DROP ( n) BLOCKOFFSET SWAP ( o n) BLOCK DUP ( o adr adr) ALLOCATE + ( adr+o=to) EASEL ( fr) SWAP TOTALPTS ( #) CMOVE UPDATE SAVE-BUFFERS WIPEOUT ." Press 0 (ZERO) to Initialize or any KEY to Continue " KEY ASCII 0 = IF INIT THEN WIPEOUT D-DISK IS DEFAULT ; : RECALL ( --) \ get average stored on graphics.scr disk and display. \ can be used to 'average several averages' together. WIPEOUT FILENAME TYPE CR G-DISK IS DEFAULT ." Enter Source Block " GET# DROP ( n) BLOCKOFFSET ( n o) SWAP BLOCK + ( adr+o=fr) ADDRESS ( to) TOTALPTS ( #) CMOVE WIPEOUT PRESERVE DRAWING WIPEOUT FILENAME TYPE READING 0 23 AT ." Use + or -, or any KEY to continue" KEY ( key) DUP ASCII + = IF +GRAPH THEN ( key) ASCII - = IF -GRAPH THEN WIPEOUT D-DISK IS DEFAULT ; : HELP ( --) \ display a list of commands available in the review option. \ accessed by pressing ? in review program. TX ." Partial list of REVIEW options " CR CR ." LEFT ARROW stops picture" CR ." END go to last trial" CR ." UP ARROW go backwards" CR ." PGUP skip backwards" CR ." DOWN ARROW go forwards" CR ." PGDN skip forwards" CR ." HOME go to first trial" CR ." J jump to trial #" CR ." 1,2,3,4 for NM channels" CR ." K to change speed" CR ." L list screen 0 of graphics disk" CR ." S save picture to graphics disk" CR ." R recall picture from graphics disk" CR ." ESC for interpretter" CR ." + to add picture" CR ." - to subtract picture" CR ." / to divide pictures" CR ." 0 to reset picture" CR ." X to add range of trials and use 8 to average range of trials " CR ." ? help" CR ." B to see blockdisplay" WAIT GR WIPEOUT ; : CAT ( --) \ edit the catalog for the graphics.scr disk. DEFAULT ( n) G-DISK IS DEFAULT TX 0 EDIT ( n) IS DEFAULT GR ; : THEEND ( --) \ leave the review program. FLUSH TX PROGRAMDRIVE DV ABORT ; : IF( ( n f--) \ a new compile structure used with )THEN. \ when a key matches the if-statement that code is executed and \ control exits without having to check for a match with other keys. COMPILE OVER COMPILE = [COMPILE] IF COMPILE DROP ; IMMEDIATE : )THEN ( --) \ a new compile structure used with IF(. \ when a key matches the if-statement that code is executed and \ control exits without having to check for a match with other keys. COMPILE EXIT [COMPILE] THEN ; IMMEDIATE VARIABLE COURSE VARIABLE WIND \ -1,0,+1... for direction of trials displayed. \ determines speed of displays in continuous mode. NEED LEFT \| \ cursor control keys ... 19200 CONSTANT LEFT 19712 CONSTANT RIGHT 18432 CONSTANT UP 20480 CONSTANT DOWN 18688 CONSTANT PGUP 20736 CONSTANT PGDN 20224 CONSTANT END 18176 CONSTANT HOME | : CHANNEL ( n --) \ select A/D channel for display. DUP STATION @ OVER <> SWAP #A/D @ 1+ < AND IF STATION ! USED ELSE DROP THEN ; : TRIM ( --) \ enter speed for showing display of trials in continuous mode. WIPEOUT ." Enter Speed for Displays (0-65535) (fast-slow) " GET# D>S WIND ! WIPEOUT ; : KNOTS ( --) \ show speed for display of trials in continuous mode. WIND @ 0 ?DO 60 23 AT ." Timing Value:" I S>D 6 D.R KEY? IF LEAVE THEN LOOP ; : FILECHECK ( str--str|abort) \ check if filename is available. DIALOG OVER C@ ESC# = IF FLUSH ABORT THEN ; : .CONTINUOUS ( --) \ toggle between continuous and single display mode. \ single display requires pressing a key to see next trial. \ continuous display shows trial after trial after only one key press. 0 23 AT ." Continuous " CONTINUOUS @ IF ." ON " ELSE ." OFF" THEN CONTINUOUS @ CONTINUOUS 2+ ! ; NEED CROSSCHECK \IF VARIABLE CROSSCHECK NEED CROSSCORRELATION \; : CROSSCORRELATION WIPEOUT ." Correlation programs not loaded" ; : SETUP ( --) \ prepare for reviewing trials. CROSSCHECK ON PRINTING OFF PICTURE ON 1 STATION ! 0 COURSE ! USED 0 WIND ! GR PROGRAMDRIVE DV DIR WIPEOUT ." Enter name for Graphics file or" CR " RETURN for default GRAPHICS.SCR file > " bell FILECHECK dup IF FILE ELSE 2DROP " GRAPHICS" FILE THEN DEFAULT IS G-DISK DARK DATADRIVE DV DIR WIPEOUT ." Enter name for Data file or" CR " RETURN for default DATA.SCR file > " bell FILECHECK DUP IF FILE ELSE 2DROP " DATA" FILE THEN DEFAULT IS D-DISK WIPEOUT PRESERVE ; : CKEY ( c -- c|c') \ check key is in range. ASCII a 1- OVER U< >R ASCII z 1+ OVER SWAP U< R> AND IF BL NOT AND THEN ; : TACK ( --) \ accept and execute key commands during review. KEY? IF KEY CKEY ASCII C IF( CONTINUOUS DUP @ DUP CONTINUOUS 2+ ! 0= IF ON ELSE OFF THEN )THEN ASCII D IF( DIRECTORY WIPEOUT WAIT USED )THEN PGUP IF( #T/BLK @ NEGATE COURSE ! )THEN PGDN IF( #T/BLK @ COURSE ! )THEN LEFT IF( 0 COURSE ! )THEN DOWN IF( 1 COURSE ! )THEN UP IF( -1 COURSE ! )THEN HOME IF( DROP 1 USED )THEN END IF( DROP #TRLS @ USED )THEN ASCII 0 IF( INIT 79 21 AT ASCII 0 EMIT )THEN ASCII 1 IF( 1 CHANNEL )THEN ASCII 2 IF( 2 CHANNEL )THEN ASCII 3 IF( 3 CHANNEL )THEN ASCII 4 IF( 4 CHANNEL )THEN ASCII + IF( +GRAPH 79 21 AT ASCII + EMIT ( 1 COURSE !) )THEN ASCII IF( -GRAPH 79 21 AT ASCII - EMIT ( -1 COURSE !) )THEN ASCII K IF( TRIM USED )THEN ASCII P IF( 79 21 AT ASCII P EMIT MIRAGE 79 21 AT BL EMIT )THEN ASCII / IF( /GRAPHS 79 21 AT ASCII / EMIT )THEN ASCII S IF( SAVE USED )THEN ASCII R IF( RECALL USED )THEN ASCII B IF( BLOCKMEASUREMENTS BLOCKDISPLAY WIPEOUT FILENAME TYPE READING WAIT USED )THEN ASCII 8 IF( AVERAGE WAIT USED )THEN ASCII X IF( ADDER )THEN ASCII J IF( DROP WIPEOUT ." JUMP TO TRIAL #: " GET# DROP 1 MAX SIZE 1- MIN USED )THEN ESC# IF( INTERPRETER DARK USED )THEN ASCII ? F( HELP USED )THEN BL IF( WIPEOUT )THEN ASCII L IF( CAT USED )THEN ASCII E IF( THEEND )THEN ASCII 7 IF( CROSSCORRELATION CR WAIT DARK USED )THEN DROP BELL 0 23 AT ." Type ? for HELP " THEN ; : COMPASS ( n--n) \ keep 1 <= n <= size 1- by setting course. DUP COURSE @ + 1 < ( less than trial # 1?) OVER COURSE @ + #TRLS @ > OR ( n f) ( more than #trials?) IF ( n) DUP #TRLS @ > OVER SIZE 1- < AND NOT \ n = trial # IF 0 COURSE ! roadrunner THEN THEN ; : INDICATOR ( n--n) \ prints trial/block numbers right justified. WIPEOUT ." Reviewing Trial # " dup 1- #t/blk @ /mod 1+ 0 2 d.r ." , " 1+ u. ( .trial & .blk) ascii ( pad c! dup 0 <# #s #> tuck pad 1+ swap cmove ascii ) over pad + 1+ c! pad swap 2+ type 3 spaces ." Stats for a/d #" station @ 0 3 d.r 80 at? drop - 2- spaces filename dup at? rot rot swap - swap at type ; : BINWIDTH ( usec --) \ handy way to quickly change binwidth and adjust parameters if review display shows that \ parameters are not set correctly. DUP BIN ! 100 / TRIALDUR @ round IS PTS CS1ON @ baseln @ - round BDTRLMK ! CS1ON @ round IS TONEON CS2ON @ round IS LTON USON @ round IS SHKON drop ; : UNITS ( # --) \ handy way to set number of units to display in review program without having to type # and ! signs. DUP #UNITS ! UN1 ! ; : REVIEW ( --) \ main execution word to review data on disk. \ user asked to enter data filename (it used to be assumed it was named data.scr). SETUP 1 BEGIN TACK COMPASS CONTINUOUS 2@ <> IF .CONTINUOUS THEN COURSE @ 0<> USE @ OR IF UNUSED COURSE @ + CONTINUOUS @ NOT IF 0 COURSE ! THEN DUP GET DRAWING indicator READING .CONTINUOUS KNOTS THEN AGAIN ; HEX : IMAGE ( name-string --) \ I think this puts display to disk. DATA MAKE ACTIVE DEFAULT IS OUTPUT FD PAD C! B800 PAD 1+ ! 0 PAD 3 + ! 4000 pad 5 + ! ( header) PAD 7 PUTDATA F0 DO 0 I 1K * + B800 ( offset segment) ( dfrom) RAM DROP 600 ( o s o s) ( dto) 1K 0 ( d#) DMOVE RAM DROP 1K PUTDATA LOOP OUTPUT CLOSE ; DECIMAL roadrunner DARK .( Type FLUSH <return> then REVIEW <return> to begin) CR \ .( Turn DOTS ON or OFF; turn DATADOTS ON or OFF) cr bin @ 1000 mod 0<> \if datadots off dots off \ adjusts display options. ABORT this prevents summary program from continuing. \ screen 25 \ printer words \ EPSON printer words ... \ : +CONDENSED 15 EMIT ; \ : -CONDENSED 18 EMIT ; \ HP Laserjet II printer words ... : +CONDENSED ( --) esc# emit " (s16.66h8.5v0T" type ; : -CONDENSED ( --) esc# emit " (s12h10v3T" type ; \ the following printer words are from Micromotion's printer.scr file ... CREATE PWINDOW 0 , 0 , 79 , 65 , 0 , 0 , 79 , 65 , 0 VALUE AWINDOW : +PRINTER ( --) \ activate printer. PRINTER @ 0= IF PRINTER ON WINDOW IS AWINDOW PWINDOW IS WINDOW THEN ; : -PRINTER ( --) \ inactivate printer. PRINTER @ IF PRINTER OFF AWINDOW IS WINDOW THEN ; \ screens 26 - 28 \ DEFAULTS: ascii-number conversions CREATE DUMMY \ a marker which can be easily forgotten when finished with routine. INFO 64 ERASE : DEFAULT>INFO ( --) \ moves 1st 48 bytes on last blk to info SIZE 1- BLOCK ( a1) 48 ( to) 0 ( fr) DO DUP ( a1 a1) I 4 * + 8 VAL 2DROP ( a1 n1) INFO I + ( a1 n a2) ! 2 +LOOP DROP ; : INFO>DEFAULT ( --) \ converts info to ascii and stores at last blk. SIZE 1- BLOCK ( a) 48 ( to) 0 ( fr) DO DUP ( a a) I 4 * + ( to) DUP 8 BLANK INFO I + @ 0 <# #s #> ( fr #) ROT SWAP ( fr to #) CMOVE 2 +LOOP DROP ; DEFAULT>INFO \ DEFAULTS: INFO INFO 2 + ( INFO 4 + INFO 6 + ( INFO 8 + INFO 10 + INFO 14 + INFO 16 + INFO 18 + INFO 20 + INFO 22 + INFO 24 + @ @ @ @ @ @ @ @ @ @ @ @ TRIALDUR CS1ON ! ! CS2ON ! USON BIN IS UNIT1X IS UNIT2X BADTIME baseln #A/D ! ! ) ) ! ! ! INFO 26 + @ #UNITS INFO 28 + @ BADA/D INFO 30 + @ CRITLEVEL INFO 32 + CHANARR 8 CMOVE INFO 40 + @ UN1 INFO 42 + @ UN2 INFO 44 + @ BADUNITS INFO 46 + @ maxeye ! ! ! ! ! ! ! INFO 64 ERASE auto @ \if 108 #trls ! 12 #blks ! 3 types ! ( ***) auto @ not \| DARK .( Enter the following:) bell CR CR .( How many trials? ) GET# DROP #TRLS ! CR .( How many blocks? ) GET# DROP #BLKS ! CR .( How many trial types? ) GET# DROP TYPES ! | DARK \ timing calculations ... #TRLS @ #BLKS @ / #T/BLK ! bin @ 100 / TRIALDUR @ round IS PTS CS1ON @ baseln @ - round BDTRLMK ! \ baseln @ round baseln ! RUNTIME requires that this NOT be done \ and SUMMARY never uses baseln directly. CS1ON @ round IS TONEON USON @ round IS SHKON drop \ screen 29 \ ANAL: zero arrays for block summary need it not \if forget it \ a debugging tool. create it \ : ed " flush drive e using summary.ext scr @ edit" eval ; \ a debugging tool. DARK .( Loading session SUMMARY and printout routines ) : RUBOUT ( --) \ erase trialtype arrays. DEPTH >R CRCNTA BDTRLA GDTRLA PCSUA1 CSUA1 USUA1 PCSUA2 CSUA2 USUA2 DEPTH R> ?DO TYPES @ 2* ERASE LOOP ; : ERASER ( --) \ erase temp arrays. RUBOUT DEPTH >R CRAMPA CRAREAA CRPEAKA URAMPA URAREAA URPEAKA ONSETA DEPTH R> ?DO TYPES @ 4 * ERASE LOOP ; \ screen 30 \ ANAL: set cr trail array for acquisition vs. extinction : ZERO ( --) \ erase most arrays/variables. RUBOUT CRTARR #TRLS @ ERASE BDTARR #TRLS @ ERASE extarr #trls @ erase ; \ var acq/ext defined on scr#1 : ext ( --) \ set switch for extinction analysis. false acq/ext ! ; : acq ( --) \ set switch for acquisition analysis. true acq/ext ! ; \ screen 31 \ ANAL: unused \ screen 32 \ ANAL: sum the dependent variables \ reminder: HOP is used to index into arrays. \ the definition is : HOP ( adr -- adr+trltype-by-32-bits) TRLTYPE @ 4 * + ; \ essentially this definition breaks down to: cramp @ crampa @ + crampa ! (by trialtype) \ or cramp @ s>d crampa hop 2+! : AMPCR ( --) \ analyze CR amplitude. CRAMP @ S>D CRAMPA HOP 2@ D+ CRAMPA HOP 2! ; : AREACR ( --) \ analyze CR area. CRAREA @ S>D CRAREAA HOP 2@ D+ CRAREAA HOP 2! ; : PEAKCR ( --) \ analyze CR peak latency. CRPEAK @ S>D CRPEAKA HOP 2@ D+ CRPEAKA HOP 2! ; : AMPUR ( --) \ analyze UR amplitude. URAMP @ S>D URAMPA HOP 2@ D+ URAMPA HOP 2! ; : AREAUR ( --) \ analyze UR area. URAREA @ S>D URAREAA HOP 2@ D+ URAREAA HOP 2! ; : PEAKUR ( --) \ analyze UR peak latency. URPEAK @ S>D URPEAKA HOP 2@ D+ URPEAKA HOP 2! ; : ONSETOF ( --) \ analyze latency to 0.5 mm or end of trial. ONSET @ S>D ONSETA HOP 2@ D+ ONSETA HOP 2! ; : MOVEDATA ( --) \ move data from aux to BIG using TRL# @ 164 AREA TRL# @ 1- * + OFFSET ( fr) BIG ( to) AREA ( #) A> ; \ screen 33 \ ANAL: figure out crs for nm : NMCRCHECK ( --) \ check if a conditioned response occurred in trial and analyze data for trial. ONSET @ 0 2DUP = -ROT < OR ( <=) IF PTS BIN @ 1000 */ CS1ON @ - ONSET ! THEN CRAMP @ CRITLEVEL @ rescale u< not ( true if cr) tonealonecrsinusperiod @ trltype @ 0= and if uramp @ critlevel @ rescale u< not or then ( flag ) if ( true if cr and acq) 1 CRCNTA WALK +! 1 crtarr trl# @ 1- + c! AMPCR AREACR else ( false if not cr == false if extinction trial) acq/ext @ false = ttarr trl# @ 1- + c@ 1+ ascii 0 - ( converts ascii) 3 = and if ( tf=ext+notUSalone) 1 extarr trl# @ 1- + c! then PTS BIN @ 1000 */ CS1ON @ - CRPEAK ! then PEAKCR AMPUR AREAUR PEAKUR ONSETOF ; \ screen 34 \ ANAL: figure out crs for units : CHK ( flag --) \ common routine for entering conditioned response into trial array based on unit data. IF 1 CRCNTA WALK +! 1 CRTARR TRL# @ 1- + C! THEN ; : U1CS ( --) CSU1 @ CHK ; : U1CS>PCS ( --) PCSU1 @ CSU1 @ U< CHK ; : U2CS ( --) CSU2 @ CHK ; : U2CS>PCS ( --) PCSU2 @ CSU2 @ U< CHK ; \ screen 35 \ ANAL: all flags on this screen are true if it is a bad trial : NMFLAG ( -- flag) \ nictitating membrane (a/d data) flag. ONSET @ BADTIME @ U< ONSET @ 0> AND BADA/D @ rescale btrl @ 2dup = -rot u< or ( U<=) OR ; : nmflag' ( -- flag) \ nictitating membrane (a/d data) flag. \ cr statistics only if cr occurred. nmflag cramp @ critlevel @ u< or ; variable critur 1 critur ! : nmflag'' ( -- flag) \ nictitating membrane (a/d data) flag. \ cr & ur statistics only if cr or ur. nmflag critlevel @ cramp @ u< or uramp @ critur @ u< or ; : UNFLAG ( -- flag) \ unit flag. \ true if a bad trial. BADUNITS @ PCSU1 @ U< BADUNITS @ PCSU2 @ U< OR ; : NM/UNFLAG ( -- flag) \ combined nictitating membrane and unit flag. NMFLAG UNFLAG OR ; : christy ( -- flag) \ routine for analysis used by Christy Logan. nmflag' UNFLAG OR ; : dragana ( -- flag) \ routine for analysis used by Dragana Ivkovich. nmflag'' UNFLAG OR ; \ screen 36 \ ANAL: sesinfo \ revolve nm/unflag, christy or dragana as badflag in .summary. DEFER CRCHECK \ resolve nmcrcheck or uncrcheck in .summary DEFER BADFLAG \ resolve nmflag or unflag in unitsum : SESINFO ( --) \ initial analysis of the session information. 1 ( fr) #TRLS @ ( #) bounds ( figure good versus bad trials) DO I TRL# ! TTARR I 1- + C@ ASCII 1 - ( converts ascii) TRLTYPE ! MOVEDATA BADFLAG IF 1 BDTRLA WALK +! 1 BDTARR TRL# @ 1- + C! ELSE 1 GDTRLA WALK +! CRCHECK THEN LOOP TYPES @ 0 ( count # good trials for each type) DO GDTRLA I 2* + @ 0= IF 1 GDTRLA I 2* + ! THEN \ force 0 to 1 prevents div by 0. LOOP ; \ screen 37 \ ANAL: average dependent variables : RM/ ( dn n1 -- n2) \ rounded modulo division. >R R@ UM/MOD SWAP 2* R> / + ; : MEAN ( i array --) \ given index into array, calculate the rounded. 2DUP OVER >R >R >R SWAP 4 * + 2@ R> 2* GDTRLA + @ RM/ S>D R> R> 4 * + 2! ; : AVERAGE ( --) \ essentially: cramp @ gdtrls @ / cramp ! for trialtypes. \ used by .SESSUM and by .BLKSUM. TYPES @ 0 DO I CRAMPA MEAN I CRAREAA MEAN I CRPEAKA MEAN I URAMPA MEAN I URAREAA MEAN I URPEAKA MEAN I ONSETA MEAN LOOP ; \ screen 38 \ ANAL: report session summary good and bad trials : .MESSAGE ( --) \ print analysis message. CR SELECTION @ 0> SELECTION @ 4 < AND IF AUXILLIARY ( fr) INFO ( to) 64 ( #) A> ( move header) INFO 64 -TRAILING 2DUP BOUNDS SWAP ?DO I C@ EOL# = ?LEAVE I C@ BL < IF 1- THEN -1 +LOOP 1+ bounds ?do i c@ 32 u< 126 1+ i c@ u< or if ." Sorry, nonASCII character in header or header not properly transfered." leave else i c@ emit then ( type header) loop THEN ; : .SESHDR ( --) \ print session header. CR ." CHANNEL = " CHANCHK @ 1+ U. CR ." TRIALS = " #TRLS @ U. 6 SPACES ." BLOCKS = " #BLKS @ U. 6 SPACES ." TRIAL TYPES = " TYPES @ U. CR ; \ screen 39 \ ANAL: limits for printing lines; print messages var items 25 items ! \ needed for HP laser printer. \ items is used to cause carriage return before line falls off right edge. : ret ( n i -- n') \ cause carriage return before end of line. u. space 1+ dup items @ mod 0= if cr then ; : .BAD ( --) \ print bad trials. CR ." BAD TRIALS: " 0 1 ( fr) #TRLS @ ( #) BOUNDS DO BDTARR I 1- + C@ 0<> IF I ret THEN LOOP drop CR ; : .GOOD ( --) \ print good trials. CR acq/ext @ true = if ." CR TRIALS: " 0 1 ( fr) #trls @ ( #) bounds do crtarr i 1- + c@ 0<> if i ret then loop drop cr cr else ." EXT TRIALS: " 0 1 ( fr) #trls @ ( #) bounds do extarr I 1- + c@ 0<> if i ret then loop drop cr cr then ; \ screen 40 \ ANAL: report averages : .ttarr ( --) \ print trial type array. cr ." Trl order: " 0 1 ( fr) #trls @ ( #) bounds do ttarr i 1- + c@ ascii 0 - 0<> if ttarr i 1- + c@ ascii 0 - ret then loop drop cr ; : .HEADING \ print heading. ." TYPE CR/TRIALS ." mp CRarea CRpeak ." nset " CR CR ; % CRa" URamp URarea URpeak O" : .SESSUMHDR ( --) \ print session sum header. 11 SPACES .HEADING ; VARIABLE FIELD 7 FIELD ! : D.TENTHS ( d --) <# # ASCII . HOLD #S #> FIELD @ OVER - SPACES TYPE ; : .TENTHS ( n --) S>D D.TENTHS ; \ screen 41 \ ANAL: print line of numbers : .BLKHDR ( --) \ print block header. ." BLOCK " .HEADING ; : .% ( --) \ print percentage. 4 SPACES CRCNTA WALK @ S>D 3 D.R ( .#crs) ." /" GDTRLA WALK @ S>D 3 D.R ( .outof#goodtrials) ." = " 1000 CRCNTA WALK @ UM* GDTRLA WALK @ RM/ .TENTHS ; : .NUMBERS ( --) \ print numbers. \ assumes trltype = i. TRLTYPE @ 1+ S>D 2 D.R ( .trltype#) 5 SPACES .% CRAMPA HOP 2@ D.TENTHS CRAREAA HOP 2@ D.TENTHS CRPEAKA HOP 2@ FIELD @ D.R 5 SPACES URAMPA HOP 2@ D.TENTHS URAREAA HOP 2@ D.TENTHS URPEAKA HOP 2@ FIELD @ D.R 5 SPACES ONSETA HOP 2@ FIELD @ D.R trltype @ 1+ types @ = if ascii < emit then cr ; \ screen 42 \ ANAL: averages : .SESSUM ( --) \ print session sums. TYPES @ 0 DO 13 SPACES I TRLTYPE ! .NUMBERS LOOP CR ; : .BLKSUM ( --) \ print block sums. AVERAGE TYPES @ 0 DO NUF? IF PRINTING @ IF -PRINTER THEN 1 ABORT" ABORTED" THEN 5 SPACES BLKMK @ S>D 2 D.R ( .blk#) 6 SPACES I TRLTYPE ! .NUMBERS LOOP ( CR) ; \ screen 43 \ ANAL: routines to summarize blockaverages : BLKINFO ( --) \ print block information. 1 TRL# ! 0 BLKMK ! .BLKHDR #BLKS @ ( to) 0 ( fr) DO 1 BLKMK +! ERASER #T/BLK @ 0 DO TTARR TRL# @ 1- + C@ ASCII 1 - TRLTYPE ! MOVEDATA BADFLAG IF 1 BDTRLA WALK +! ELSE 1 GDTRLA WALK +! NMCRCHECK THEN 1 TRL# +! LOOP TYPES @ 0 DO GDTRLA I 2* + @ 0= IF 1 GDTRLA I 2* + ! THEN LOOP .BLKSUM LOOP ; \ screen 44 \ ANAL: unit summary routines : .UHDR ( --) \ print unit header. ." SUMMARY OF UNITS" CR CR ." BLOCK CHANNEL TYPE PRE-CS PERIOD ." CS PERIOD US PERIOD" CR CR ; : .USUM1 ( --) \ print unit sum 1. 1 DACHAN ! TYPES @ 0 DO 2 SPACES BLKMK @ U. 9 SPACES DACHAN @ U. 10 SPACES I 1+ U. ( .%) 12 SPACES PCSUA1 I 2* + @ U. 14 SPACES CSUA1 I 2* + @ U. 12 SPACES USUA1 I 2* + @ U. CR LOOP ; : .USUM2 ( --) \ print unit sum 2. 2 DACHAN ! TYPES @ 0 DO 2 SPACES BLKMK @ U. 9 SPACES DACHAN @ U. 10 SPACES I 1+ U. ( .%) 12 SPACES PCSUA2 I 2* + @ U. " 14 SPACES CSUA2 I 2* + @ U. 12 SPACES USUA2 I 2* + @ U. CR LOOP ; \ screen 45 \ ANAL: summary of units : UNITCOLLECT ( --) \ analyze units. #UNITS @ 0> IF PCSU1 @ PCSUA1 WALK @ + PCSUA1 WALK ! CSU1 @ CSUA1 WALK @ + CSUA1 WALK ! USU1 @ USUA1 WALK @ + USUA1 WALK ! THEN #UNITS @ 1 > IF PCSU2 @ PCSUA2 WALK @ + PCSUA2 WALK ! CSU2 @ CSUA2 WALK @ + CSUA2 WALK ! USU2 @ USUA2 WALK @ + USUA2 WALK ! THEN ; : PO ( string --) \ print out string. ZERO ERASER ( ['] UNFLAG IS BADFLAG) SESINFO .BAD .GOOD TYPE ." ..." CR ['] .UNLEVEL IS .CRITERIA CRITERION KEY? IF KEY DROP KEY DROP THEN ; \ screen 46 \ ANAL: summary of units : UNITSUM ( --) \ calculate unit sums. CR CR .MESSAGE CR CR ." For any CS unit activity ..." CR UN1 @ 1 = IF ['] U1CS IS CRCHECK " Unit 1" PO THEN UN2 @ 1 = IF ['] U2CS IS CRCHECK " Unit 2" PO THEN .SESSUMHDR .SESSUM CR ." For any CS unit activity > than PCS activity ..." CR UN1 @ 1 = IF ['] U1CS>PCS IS CRCHECK " Unit 1" PO THEN UN2 @ 1 = IF ['] U2CS>PCS IS CRCHECK " Unit 2" PO THEN .SESSUMHDR .SESSUM PAGE .MESSAGE CR CR 0 BLKMK ! 1 TRL# ! .UHDR #BLKS @ ( to) 0 ( fr) DO 1 BLKMK +! ERASER #T/BLK @ ( to) 0 ( fr) DO TTARR TRL# @ 1- + C@ ASCII 1 - TRLTYPE ! BDTARR TRL# @ 1- + C@ 0= IF MOVEDATA UNITCOLLECT THEN 1 TRL# +! LOOP UN1 @ 1 = IF .USUM1 THEN UN2 @ 1 = IF .USUM2 THEN CR CR NUF? ?LEAVE LOOP ; \ screen 47 \ ANAL: session printout : .SUMMARY ( --) \ print summary. \ this is the main word used to print out the data that has been analyzed. PRINTING @ IF +PRINTER +CONDENSED THEN ['] nm/unflag IS BADFLAG MAX#A/D 0 ?DO CHANARR I 2* + @ 1 = IF I CHANCHK ! zero ERASER ['] NMCRCHECK IS CRCHECK SESINFO AVERAGE .MESSAGE .SESHDR .BAD .GOOD #units @ 0= if ['] .NMLEVEL else ['] .nm/unlevel then IS .CRITERIA CRITERION cr .SESSUMHDR .SESSUM acq/ext @ true = if BLKINFO then PRINTING @ IF PAGE THEN THEN LOOP 0 CHANCHK ! \ #UNITS @ 0> IF UNITSUM PAGE THEN \ do not print out unit data PRINTING @ IF -CONDENSED -PRINTER THEN NOOP ; tsr @ \if : .results ( --) recalc .summary ; printing on tsr @ \if printing off beep 1 delay beep abort .SUMMARY \ OR resolve ' christy is badflag OR ' dragana is badflag \ screens 48, 49 and 50 \ A>L: transfer summarized trials from auxilliary memory to library storage disk DARK .( Loading LIBRARY storage routines) : GET-LIBRARY-DISK ( -- flag) BEGIN ." Place LIBRARY disk in drive " librarydrive type space bell key control C = if exit then " librarydrive dv dir " eval bell cr " Enter data file or RETURN for LIBRARY.SCR > " dialog over c@ esc# = if flush abort then dup if file else 2drop " library" file then 0 BLOCK 1+ C@ BL = IF 1 ELSE 0 BLOCK @ THEN DUP LIBCNT ! LIBSCN @ + 315 > WHILE CR ." No room, try another LIBRARY disk " DEFAULT CLOSE REPEAT 1 ( flag) ; : TRANSFER ( --) #TRLS @ 1K 32 / /MOD 0 \ transfer full blocks. ?DO 0 64 + 1K I * + OFFSET ( fr) LIBCNT @ 1+ I + BUFFER ( to) 1K A> UPDATE LOOP ?DUP IF \ transfer remaining trials. DUP #TRLS @ SWAP - 32 * 0 64 + + OFFSET ( fr) LIBCNT @ LIBSCN @ 1- + BUFFER ( to) ROT 32 * ( #) A> UPDATE SAVE-BUFFERS THEN ; : IDENTIFY ( --) SELECTION @ DUP 3 = SWAP 10 = OR \ hdr>lib. IF 0 INFO 64 A> ( hdr fr aux) ELSE DEFAULT ( n) datadrive dv data$ FILE 0 BLOCK 64 + ( hdr fr disk) INFO 64 CMOVE DEFAULT CLOSE ( n) IS DEFAULT THEN INFO LIBCNT @ BLOCK TUCK 64 CMOVE 65 + BL SWAP C! UPDATE ; : LIBRARY ( --) \ save aux to lib disk. \ this is the execution word to transfer RAM memory to library disk. MAX#A/D 0 ?DO CHANARR I 2* + @ 1 = IF I CHANCHK ! DARK DEFAULT is DEFAULT' ( save default) #TRLS @ 1K 32 / /MOD SWAP 0> - 1+ LIBSCN ! ( scrns needed) GET-LIBRARY-DISK ( flag) IF CR ." Please wait " CR LIBCNT @ LIBSCN @ + DUP 0 BLOCK ! UPDATE ( lib scr used) IDENTIFY ( move header) TRANSFER ( move the data) DEFAULT CLOSE DEFAULT' IS DEFAULT " programdrive dv" eval ." Next block at " U. CR THEN THEN LOOP ." Return PROGRAM disk to drive " programdrive type " programdrive dv " eval KEY dup CONTROL C = swap esc# = or IF EXIT THEN " flush FORGET SUMMARY using summary 1 load" EVAL ; LIBRARY \ screen 51 \ L>A: recover data from a library disk : FROMLIB ( --) \ retrieve data from library disk to auxilliary memory where it can be reanalyzed. DARK ." Data summary from a LIBRARY disk" cr cr ." Place LIBRARY disk in drive " librarydrive type cr " librarydrive dv " eval ." Enter SCREEN NUMBER for this analysis: " LIBSTART INP CR DEFAULT ( n) " LIBRARY" FILE LIBSTART @ BLOCK DUP INFO 64 CMOVE AUXILLIARY 64 >A ( header) LIBSTART @ 1+ #TRLS @ 32 / DUP LIBSCN ! OVER + SWAP ( to fr) \ NOTE: LIBSCN here refers to # of FULL blocks used. DO I BLOCK AUXILLIARY 64 + I LIBSTART @ 1+ - 1K * + 1K >A LOOP #TRLS @ 32 MOD ?DUP IF 32 * ( #) LIBSTART @ LIBSCN @ + 1+ BLOCK ( fr) AUXILLIARY 64 + LIBSCN @ 1K * + ( to) ROT ( #) >A THEN DEFAULT CLOSE " programdrive dv" eval ( n) IS DEFAULT ; FROMLIB tsr @ not \if forget fromlib \ screen 52 \ .LIB: display info screens from library disk : DISPLAYER ( --) \ show catalog of contents of library disk. DARK ." Put LIBRARY disk in drive " librarydrive type KEY DROP CR BEGIN ." Printout? (N) " KEY DUP ASCII Y = SWAP ASCII y = OR IF +PRINTER +CONDENSED ELSE DARK THEN " librarydrive dv" eval ." LIBRARY disk, Volume #" CR CR ." SCR# Comments: " CR DEFAULT is DEFAULT' " LIBRARY" screens open is default 0 BLOCK @ 1- ( fr) 1 ( to) DO I BLOCK 65 + C@ BL = IF I 0 3 D.R 3 SPACES I BLOCK 64 -TRAILING TYPE CR THEN NUF? IF LEAVE THEN LOOP DEFAULT CLOSE DEFAULT' IS DEFAULT 12 EMIT ( eject) " programdrive dv " eval -CONDENSED -PRINTER ." Another disk? (Y) " KEY DUP ASCII N = SWAP ASCII n = OR UNTIL DARK ; DISPLAYER tsr @ \if abort \screen 53 \ screen 54 \ TESTS: load screen VARS 52 LOAD ( n FROMLIB) 54 58 THRU ( CRITERION) 60 61 THRU ( SUMMER for PCS noise) 33 45 THRU ( ANAL without .SUMMARY) 62 LOAD ( modified .SUMMARY) 61 LOAD ( run word is DD preceeded by a list of lib scrn #s) \ screens 55 - 60 \ TESTS: criterion VARIABLE OUTOF 9 OUTOF ! \ number of trials in a row. \ OLD/NEW count # of successive criterion trials before/after \ a missed trial. OLD+NEW = # of trials towards criterion. CREATE NEW TYPES @ 2* ALLOT \ current number of valid hits. CREATE OLD TYPES @ 2* ALLOT \ old number of valid hits. \ PREVIOUS/LATEST counts total # of trials in the session \ before/after a miss (to help identify cr trial in printout). CREATE LATEST TYPES @ 2* ALLOT \ intermediate trials to criterion. CREATE PREVIOUS TYPES @ 2* ALLOT \ beginning of criterion trials. \ ACTUAL counts the number of trials tested for each trialtype. CREATE ACTUAL TYPES @ 2* ALLOT \ actual trial number for type. \ PM/AM hold the # of the trial before/after a missed trial for \ each trialtype (JES number). CREATE AM TYPES @ 2* ALLOT \ beginning of actual criterion trials. CREATE PM TYPES @ 2* ALLOT \ intermediate actual criterion trials. \ holds the number of the missed trial before criterion for each trialtype (MEYER number). CREATE MISS TYPES @ 2* ALLOT \ these routines cause trialtype 2 to be treated as a type 1, and trialtype 4 to be treated as a type 4 ... : SAVETTARR ( --) TTARR RAM DROP #TRLS @ CMOVE ; : DISTILL ( --) \ change type 2 to type 1, and type 4 to type 3. TTARR #TRLS @ OVER 1+ + SWAP DO I C@ ASCII 2 = IF ASCII 1 I C! THEN I C@ ASCII 4 = IF ASCII 3 I C! THEN LOOP ; : RESTORETTARR ( --) RAM DROP TTARR #TRLS @ CMOVE ; : .DECIMAL ( dn --) \ print a double number with a decimal. 0 <# # ASCII . HOLD #S #> TYPE CR ; : .NMLEVEL ( --) \ print nictitating membrane (a/d) criteria levels. ." Maximum nm/eye level set at " maxeye @ .decimal ." Nm/eye criterion level set at " CRITLEVEL @ .DECIMAL ." Bad nm/eye level set at " BADA/D @ .DECIMAL ; : .UNLEVEL ( --) \ print unit criterion level. ." Bad unit level set at " BADUNITS @ U. CR ; : .nm/unlevel ( --) \ print both nm and unit criteria levels. .nmlevel .unlevel ; DEFER .CRITERIA : RESULTS ( --) \ print results of tests for criterion. acq/ext @ false = if \ resolve as later .NMLEVEL or .UNLEVEL ." EXTINCTION " then ." CRITERION: " OUTOF @ DUP 1- 0 2 D.R ASCII / EMIT U. tonealonecrsinusperiod @ if ." (includes CRs in US period on CS alone trials)" then cr .CRITERIA TYPES @ ( to) 0 ( fr) ?DO ." TYPES " I 1+ 0 2 D.R ." & " I 2+ 0 2 D.R NEW I 2* + @ OLD I 2* + @ + OUTOF @ 1- = IF ." CRITERION TRIAL " AM I 2* + @ DUP 0= IF DROP PM I 2* + @ THEN 0 4 D.R SPACE ." (Session trial # " PREVIOUS I 2* + @ DUP 0= IF DROP LATEST I 2* + @ THEN 0 3 D.R ASCII ) EMIT OLD I 2* + @ 0= IF ." (see also " MISS I 2* + @ 0 3 D.R ASCII ) EMIT THEN ELSE ." CRITERION NOT MET" THEN CR 2 +LOOP ; : CRITERION ( --) \ calculate trials to criterion. SAVETTARR DISTILL DEPTH >R NEW OLD LATEST PREVIOUS ACTUAL AM PM MISS DEPTH R> ?DO TYPES @ 2* ERASE ( initialize) LOOP #TRLS @ 0 DO TTARR I + C@ ASCII 1 ( trans) - TRLTYPE ! 1 ACTUAL WALK +! NEW WALK @ OLD WALK @ + OUTOF @ 1- < ( true if not yet crit) IF acq/ext @ if ( acquisition criterion) CRTARR else ( extinction criterion) extarr then I + C@ IF ( yes cr) 1 NEW WALK +! LATEST WALK @ 0= IF I 1+ LATEST WALK ! THEN ( set) PM WALK @ 0= IF ACTUAL WALK @ PM WALK ! THEN ( set) ELSE ( no cr) NEW WALK @ OLD WALK ! 0 NEW WALK ! ( update) LATEST WALK @ PREVIOUS WALK ! 0 LATEST WALK ! ( update) PM WALK @ AM WALK ! 0 PM WALK ! ( update) ACTUAL WALK @ MISS WALK ! ( update) THEN THEN LOOP RESULTS RESTORETTARR ; VARIABLE SUM+ ( all PCS) VARIABLE SUM- ( PCS w/out badtrls) VARIABLE CNT+ ( all trls) VARIABLE CNT- ( w/o badtrls) : .OUT ( sum cnt --) \ common 'print out' formatting. ." THE PCS AVERAGE IS " ( sum cnt) OVER S>D <# # ASCII . HOLD #S #> TYPE ASCII / EMIT ( sum cnt) DUP U. SPACE ASCII = EMIT SPACE 1000 SWAP */ ( scale) 5 + ( round) 10 / ( scale) S>D <# # # # ASCII . HOLD #S #> TYPE ; : SUMMER ( --) \ allow multiple analyses with different criteria. see 'doit' next. 0 SUM+ ! 0 SUM- ! 0 CNT+ ! 0 CNT- ! #TRLS @ 0 DO I 1+ AUX>TRIAL INFO 2+ @ DUP ( n n) SUM+ +! ( n) 1 CNT+ +! ( n) DUP 7 < IF SUM- +! 1 CNT- +! ELSE DROP THEN NUF? IF LEAVE THEN LOOP CR 0 INFO 64 A> INFO 64 TYPE CR SUM+ @ CNT+ @ .OUT CR SUM- @ CNT- @ .OUT ; \ : ANS ( --) INFO 32 + INFO \ debugging. \ DO I @ S>D I INFO 6 + = I INFO 12 + = OR \ IF 6 ELSE 4 THEN D.R \ 2 +LOOP ; : DOIT ( n --) \ handy word to get data from library disk, analyze with different criteria for cr. FROMLIB 5 CRITLEVEL ! .SUMMARY +PRINTER CR CR -PRINTER 10 CRITLEVEL ! .SUMMARY +PRINTER +CONDENSED CR CR SUMMER 12 EMIT -PRINTER 5 CRITLEVEL ! ; : DD ( list --) \ handy word to analyze a list of data on the library disk. DEPTH 0 ?DO DOIT LOOP ; : .SUMMARY ( --) \ print summary. 2 PLACES ZERO ERASER SESINFO SESAVER PRINTING @ IF +PRINTER +CONDENSED THEN 3 SELECTION ! ( force printout of animal title) .SESHDR CRITERION .SESSUMHDR .SESSUM \ BLKINFO \ #UNITS @ 0> IF UNITSUM THEN \ PRINTING @ IF 12 EMIT ( page) -CONDENSED -PRINTER THEN PRINTING @ IF -CONDENSED -PRINTER THEN NOOP ; PRINTING OFF \ PRINTING ON \ screen 64 \ MEAS, TESTS: analyze data from disk : RECALC ( --) \ recalculate. \ analyze new data file with same parameters. \ prevents having to reload the program over and over again. DARK ." Place DATA disk in drive " datadrive type space bell KEY CONTROL C = IF EXIT THEN " datadrive dv dir " eval bell DEFAULT ( n) cr " Enter data file or RETURN for DATA.SCR > " dialog over c@ esc# = if flush abort then dup if 2dup file else 2drop " data" 2dup file then data$ s! 0 BLOCK 64 + INFO 64 CMOVE INFO AUXILLIARY 64 >A DARK ." Processing Trial " #TRLS @ 0 DO 17 0 AT I 1+ 0 3 D.R CLEARPOINTERS I 1+ BLOCK ALLOCATE NMRV (NMRV) MAX#A/D 2* CMOVE UNITV (UNITV) MAX#UNITS 2* CMOVE MEASURE I 1+ TRIAL>AUX NUF? IF LEAVE THEN LOOP DEFAULT CLOSE ( n) IS DEFAULT dark auto @ not programdrive drop c@ datadrive drop c@ = and if ." Return PROGRAM disk " roadrunner key drop then ; RECALC tsr @ not \if FORGET RECALC \ screen 65 \ screen 66 \ screen 67 \ screen 68 \ screen 69 \ screen 70 \ screen 71 \ screen 72 \ screens 73 - 75 \ TBL: trial type DARK .( LOADING ROUTINES TO BUILD TRIAL TYPE TABLES ) CREATE DUMMY \ a subset of variables is defined here rather than having to load in the more extensive list. CREATE TTARR 256 ALLOT TTARR 256 ERASE variable types VARIABLE TTBLKS VARIABLE TTTPB VARIABLE TTSER VARIABLE TTC : TTMSG1 ( --) \ trial type message 1. ." HOW MANY TRIAL TYPES ? " types INP CR CR ." HOW MANY BLOCKS ? " TTBLKS INP CR CR ." HOW MANY TRIALS PER BLOCK ? " TTTPB INP CR CR ." WHICH TRIAL TYPE SERIES IS THIS ? " TTSER INP ; : TTMSG2 ( --) \ trial type message 2. DARK ." TO BUILD THE TRIAL TYPE TABLE: " CR CR ." 1) USE 1, 2, 3 OR 4 TO DESIGNATE TYPE " CR ." 2) ENTER 1 BLOCK OF TRIALS " CR ." 3) 4 SERIES OF EACH TRIAL TYPE CAN BE STORED " CR ." 4) A MAXIMUM OF 256 TRIALS CAN BE STORED PER TABLE " CR ." 5) ANSWER THE FOLLOWING QUESTIONS: " CR CR TTMSG1 ; : OK? ( --) \ pause before continuing. \ no option for aborting. CR CR CR ." HIT A KEY TO CONTINUE " KEY DROP ; : LDTT ( --) \ load trial type table. TTARR 256 BL FILL types @ SIZE 1- 5 - + BLOCK TTSER @ 1- 256 * + TTARR 256 CMOVE ; : DSPTT ( --) \ display trial type table. DARK ." CURRENT TRIAL TYPE TABLE " CR CR TTARR 256 -TRAILING TYPE OK? ; : INPTT ( --) \ input trial type table. DARK ." ENTER A BLOCK OF TRIAL TYPES THEN PRESS <CR> " CR CR PAD 1+ 256 EXPECT BL PAD 1+ SPAN @ + C! ( removes cr) DARK ." NEW TRIAL TYPE TABLE: " CR CR 0 TTC ! TTBLKS @ 0 DO TTTPB @ 0 DO PAD 1+ I + C@ DUP EMIT TTARR TTC @ + C! 1 TTC +! LOOP LOOP OK? ; : TTOBUF ( --) \ save trial type table near the end of summary.scr file. TTARR types @ SIZE 1- 5 - + BLOCK TTSER @ 1- 256 * + 256 CMOVE UPDATE SAVE-BUFFERS ; : TT1CHK ( --) \ check for only one trial type; if yes, fill trial type table with 1s. types @ 1 = IF TTARR 256 ASCII 1 FILL DARK ." TRIAL TYPE TABLE: " CR CR TTARR 256 TYPE OK? THEN ; : TTMSG3 ( --) \ trial type message 3. DARK ." ENTER DESCRIPTION OF TRIAL TYPE TABLE:" CR SIZE 1- 5 - BLOCK ( adr) types @ 2- 256 * + ( adr+typeoffset) TTSER @ 1- 64 * + ( adr+typeoffset+series) DUP 64 BLANK DUP 64 EXPECT BL SWAP SPAN @ + C! ( removes cr) UPDATE SAVE-BUFFERS ; : TRIALTYPE ( --) \ execution word for entering new trial type table. TTMSG2 TT1CHK types @ 1 > IF LDTT DSPTT INPTT TTOBUF TTMSG3 THEN ; TRIALTYPE FORGET DUMMY \ screen 76 \ REV/CROSS: review with crosscorrelation NEED LEFT \| \ cursor control keys ... 19200 CONSTANT LEFT 19712 CONSTANT RIGHT 18432 CONSTANT UP 20480 CONSTANT DOWN 18688 CONSTANT PGUP 20736 CONSTANT PGDN 20224 CONSTANT END 18176 CONSTANT HOME | \ RELOADING FLOAT INCLUDING CROSS \ screen 77 \ +REV: additional REVIEW words \ the words on this screen work like a batch file: \ they allow the user to quickly specify a range of trials or the whole session to analyze \ for a particular trial type. \ for example, tone trials<return> averages and displays all the tone alone trials in the queried data file. \ do-all<return> averages all tone alone, air alone and paired trials in the queried data file \ and stores the data in the graphics file. \ tone 1 follow<return> averages all tone trials and saves them in graphics file block 1. \ in all these, bad trials are automatically taken into consideration and excluded. variable temp : (trials) ( to fr --) type# @ temp ! init wipeout ." Adding trial #: " DO temp @ 1 = i 1- ttarr + c@ ascii 1 = and ( tones) temp @ 8 = i 1- ttarr + c@ ascii 3 = and or ( airs) temp @ 9 = i 1- ttarr + c@ ascii 2 = and or ( paired) if 16 21 at i 0 4 d.r i GET +GRAPH then nuf? ?leave LOOP /graphs blockmeasurements blockdisplay draw-data ; : <trials> ( --) #trls @ 1+ 1 (trials) ; : follow ( n --) \ TONE 1 FOLLOW analyzes tones & saves in blk 1 d-disk is default <trials> easel swap g-disk is default block totalpts cmove update save-buffers beep 1 delay beep ; : do-all ( --) \ analyze whole day, save in graphics file. tone 1 follow air 2 follow tone-air 3 follow d-disk is default ; : trials ( --) \ use: TONE TRIALS converse 1+ swap (trials) ; \ screen 78 \ documentation for screens from here to end of file. \ the following MUST be the last screens of this file: \ \ SIZE 1- 5 - descriptive strings for trial-type tables. \ SIZE 1- 4 - unused. \ SIZE 1- 3 - session sequences for 2 trial-types. \ SIZE 1- 2 3 trial-types. \ SIZE 1- 1 4 trial-types. \ SIZE 1default parameters. \ screen 79 \ these are the user-supplied descriptions of their defined trial type tables. \ since the pattern of a sequence with one trial type is obvious there is no description reserved for it. \ the first 4 lines describe four different sequences with two trial types. \ the next 4 lines describe four different sequences with three trial types. \ the last 4 lines describe four different sequences with four trial types. \ \ the position of the line on this screen is used by the program to select the correct description. \ \ since this screen is never compiled, the lines for the descriptions do not need to begin with a backslash. 90% Paired (Thompson) (122222222) 75% Paired (12212222) Explicitly unpaired (Gormezano) (122112122112122121) Pseudorandom unpaired (Rescorla) (21122121122121121) Cold probe study (122232222) Tracey Shors (1222232222) UNUSED UNUSED Tone/light blocks (1221222234434444) Yeo nonreplication study (1222234444) unused Lidocaine test (TLTLTLTLLTTLTLT) NOTE: each number for a trial types has 4 options (1/line): lines 1-4 for sessions with 2 trial types. lines 5-8 for sessions with 3 trial types. lines 9-12 for sessions with 4 trial types. \ screen 80 \ storage area for unused parameters ... \ \ this screen is never compiled or used by the program. \ this screen is the place where one trial type sequences would be defined, which is unnecessary. \ this area is used as a handy place to save unused parameters that would normally go on the last \ screen of this file. 1568 207 706 207 706 606 706 8300 3 3 0 0 0 0 0 100 105 diana's "the box". WARNING: these are only approximations!! 744 248 596 248 596 496 596 4000 3 3 1 0 0 0 0 100 255 parameters for use on data.xty file. 1000 250 350 250 350 750 850 2000 3 3 0 0 0 0 0 100 255 Dragana's problem. 25 100 1 0 7 5 1 25 160 2 0 5 5 1 25 160 1 0 7 5 1 \ screen 81 \ this screen holds four trial sequences (maximum of 256 trials per session) for two trial types. \ the Summary program looks for these sequences in particular positions on this screen. \ here four sequences with two trial types have been defined. 122222222122222222122222222122222222122222222122222222122222222122222222122222222122 222222122222222122222222122222222122222222122222222122222222122222222122222222122222 222122222222122222222122222222122222222122222222122222222122222222122222222 122122221221222212212222122122221221222212212222122122221221222212212222122122221221 222212212222122122221221222212212222122122221221222212212222122122221221222212212222 122122221221222212212222122122221221222212212222122122221221222212212222122122221221 222212211212211212212112211212211212212112211212211212212112211212211212212112211212 211212212112211212211212212112211212211212212112211212211212212112211212211212212112 211212211212212112211212211212212112211212211212212112211212211212212112211212211212 2121 211221211221211212112212112212112121122121122121121211221211221211212112212112212112 121122121122121121211221211221211212112212112212112121122121122121121211221211221211 212112212112212112121122121122121121211221211221211212112212112212112121122121122121 121 \ screen 82 \ this screen holds four trial sequences (maximum of 256 trials per session) for three trial types. \ the Summary program looks for these sequences in particular positions on this screen. \ here two sequences with three trial types have been defined. 122232222122232222122232222122232222122232222122232222122232222122232222122232222122 232222122232222122232222122232222122232222122232222122232222122232222122232222122232 222122232222122232222122232222122232222122232222122232222122232222122232222122232222 122223222212222322221222232222122223222212222322221222232222122223222212222322221222 232222122223222212222322221222232222122223222212222322221222232222122223222212222322 2212222322221222232222122223222212222322221222232222122223222212222322222 \ screen 83 \ this screen holds four trial sequences (maximum of 256 trials per session) for four trial types. \ the Summary program looks for these sequences in particular positions on this screen. \ here three sequences with four trial types have been defined. 122122223443444412212222344344441221222234434444122122223443444412212222344344441221 222234434444122122223443444412212222344344441221222234434444122122223443444412212222 344344441221222234434444122122223443444412212222344344441221222234434444122122223443 444412222344441222234444122223444412222344441222234444122223444412222344441222234444 122223444412222344441222234444122223444412222344441222234444122223444412222344441222 234444122223444412222344441222234444122223444412222344441222234444122223444412222344 44 122122223443444412212222344344441221222234434444122122223443444434434444122122221221 222234434444122122223443444412212222344344441221222234434444122122223443444412212222 344344441221222234434444122122223443444412212222344344441221222234434444122122223443 4444 \ screen 84 \ this must be the last screen of the summary.scr file. \ the top three lines of this screen are the default parameters for analysis. \ none of the other lines are used by the program, therefore they can be used for comments or \ other parameters. \ this last few lines of this screen are used to remind the user about the meanings of the parameters. \ for example, the total number of milliseconds of the trial is 756 (pts) \ the tone onset occurs at 252 milliseconds into the trial (toneon) \ etc. 756 252 598 252 598 3 3 25 160 1 1 0 0 0 1 new parameters for cold probe study. 1260 252 600 492 612 3 3 0 160 1 1 0 0 0 1 Andrea's parameters 504 2 1 598 7 50 4000 5 255 504 2 1 600 7 200 4000 5 255 *** other parameters are on screen 80 *** pts toneon toneoff lton ltoff shkon shkoff bin.usec unit1x unit2x badtimebaseln #a/d #units bada/d critlvl chan1 chan2 chan3 chan4 un1 un2 badun maxeye THIS MUST BE THE LAST SCREEN OF THE FILE!!!