# This sample script is written to track one adult fish from the very beginning of the trial. # Users need to ensure that the correct assets are used in the script and saved to the unit's Media directory. # There is a choice of two detector assets: 3 zones and 2 zones. The 3 zone asset is being loaded in this script. # Edit the load(zones) command to use the other. # Zantiks Ltd cannot guarantee this is how you want to run your experiments, this script is offered only to demonstrate the capabilities of the system and assist you in learning how to script for your research. # define experiment requirements DEFINE UNIT_TIME 10 DEFINE NUM_BINS 30 DEFINE EXP_TIME 300 # define the animal model tracking requirments (dependent on animal size) SET(TARGET_SIZE,15) SET(DETECTOR_THRESHOLD,5) # takes an autoreference required for tracking SET(AUTOREF_MODE,MOVEMENT) SET(AUTOREF_TIMEOUT,0) # set light stimuli coordinates on the screen SETLIGHT(LIGHT1,SQUARE,103,73,206) # load detector asset LOAD(ZONES,"horizontal_tank_3_zones.bmp") # This is the whole experiment's outline/schedule ACTION MAIN SET(COUNTER1,COUNTER_ZERO) LOGCREATE("RUNTIME|TEXT:INTERVAL") LOGAPPEND("TEXT:ZONE1_DISTANCE|TEXT:ZONE2_DISTANCE|TEXT:ZONE3_DISTANCE") LOGAPPEND("TEXT:ZONE1_TIME|TEXT:ZONE2_TIME|TEXT:ZONE3_TIME") LOGAPPEND("TEXT:ZONE1_COUNT|TEXT:ZONE2_COUNT|TEXT:ZONE3_COUNT") LOGRUN() LIGHTS(ALL,OFF) LIGHTS(LIGHT1,WHITE) LIGHTS(LIGHT16,WHITE) VIDEO(300,"dive") AUTOREFERENCE() DETECTOR(DETECTOR1,DIVE) DETECTOR(DETECTOR2,DIVE) DETECTOR(DETECTOR3,DIVE) WAIT(EXP_TIME) LIGHTS(ALL,OFF) COMPLETE ACTION DIVE LOGDATA(DATA_SNAPSHOT,"begin") INVOKE(DATAREPORT,NUM_BINS) LOGDATA(DATA_SNAPSHOT,"end") LOGDATA(DATA_SELECT,"begin") LOGDATA(DATA_DELTA,"end") LOGCREATE("TEXT:") LOGRUN() LOGCREATE("RUNTIME|TEXT:TOTALS|ZONE_DISTANCES:Z1-3") LOGAPPEND("ZONE_TIMERS:Z1-3|ZONE_COUNTERS:Z1-3") LOGRUN() COMPLETE ACTION DATAREPORT SET(COUNTER1,COUNTER_INC) LOGDATA(DATA_SNAPSHOT,"beginBIN") WAIT(UNIT_TIME) LOGDATA(DATA_SNAPSHOT,"endBIN") LOGDATA(DATA_SELECT,"beginBIN") LOGDATA(DATA_DELTA,"endBIN") LOGCREATE("RUNTIME|TEXT:COUNTER1|ZONE_DISTANCES:Z1-3") LOGAPPEND("ZONE_TIMERS:Z1-3|ZONE_COUNTERS:Z1-3") LOGRUN() COMPLETE