00001
00007 #ifndef __ANALYZE_H__
00008 #define __ANALYZE_H__
00009
00010 #include "cmdparam.h"
00011 #include "lissom.h"
00012
00013
00014
00015 #define VERIFY_ORPREF_AVAILABLE(maxstale,procedure) \
00016 if (or_dumped == Uninitialized) { \
00017 ipc_notify(IPC_ONE,IPC_ERROR,"measure_or_pref must be called before " #procedure);\
00018 return CMD_PREREQ_ERROR; \
00019 } \
00020 else if (learning && iteration-or_dumped > maxstale) { \
00021 ipc_notify(IPC_ONE,IPC_WARNING,"measure_or_pref was called %d iterations ago; " \
00022 #procedure " data may be stale",iteration-or_dumped); \
00023 }
00024
00025 #define VERIFY_ODPREF_AVAILABLE(maxstale,procedure) \
00026 if (od_dumped == Uninitialized) { \
00027 ipc_notify(IPC_ONE,IPC_ERROR,"measure_od_pref must be called before " #procedure);\
00028 return CMD_PREREQ_ERROR; \
00029 } \
00030 else if (learning && iteration-od_dumped > maxstale) { \
00031 ipc_notify(IPC_ONE,IPC_WARNING,"measure_od_pref was called %d iterations ago; " \
00032 #procedure " data may be stale",iteration-od_dumped); \
00033 }
00034
00035
00036 extern int or_dumped;
00037 extern int od_dumped;
00038
00039
00040 extern double gaussfit_array[RNMAX][RNMAX];
00041 extern double gaussian[RNMAX][RNMAX];
00042 extern double od_pref[NMAX][NMAX];
00043 extern int or_pref[EYE_ARRAY_SIZE][NMAX][NMAX];
00044 extern double or_select[EYE_ARRAY_SIZE][NMAX][NMAX];
00045 extern int sp_freq[EYE_ARRAY_SIZE][NMAX][NMAX];
00046 extern int sp_phase[EYE_ARRAY_SIZE][NMAX][NMAX];
00047
00048
00049 cmdstat cmd_copy_network( CMD_ARGS );
00050 cmdstat cmd_measure_or_pref( CMD_ARGS );
00051 cmdstat cmd_restore_network( CMD_ARGS );
00052
00053
00054 void analyze_bubblewidth(void);
00055 void analyze_init_hook(void);
00056 void od_preferences(double pref[NMAX][NMAX], Neuron nmap[NMAX][NMAX]);
00057
00058 #endif