# Last edited on 2020-12-26 21:17:40 by jstolfi SHELL := /bin/bash # Simulator: PROGDIR := ${HOME}/programs/c/NEUROMAT/nmsim_elem_net_simulate PROG := nmsim_elem_net_simulate # Creator: GEN_PROGDIR := ${HOME}/programs/c/NEUROMAT/nmsim_elem_net_create_test GEN_PROG := nmsim_elem_net_create_test all: compile delete create simulate plot-traces NNE := 100 NNE1 := ${shell echo "${NNE}-1" | bc -lq} # Tags of this run and of a comparison run. TAG=A CMP=A # Wide range of input currents to test: SUBTAG := FU INP_MIN := -2.0 INP_MAX := 40.0 RHOMAX := 1.0000 # Narrow (low activity) range of input currents to test: # SUBTAG := LO # INP_MIN := -2.0 # INP_MAX := 6.0 # RHOMAX := 0.0500 TAGSUB := ${TAG}_${SUBTAG} CMPSUB := ${CMP}_${SUBTAG} ifneq "/${TAG}" "/${CMP}" TAGSUBS := ${CMPSUB} ${TAGSUB} else TAGSUBS := ${TAGSUB} endif include ${TAG}.make NMSIM_FILE := data_nmsim_${TAG}.txt GEN_PREFIX := out/sim OUT_PREFIX := ${GEN_PREFIX}_${TAGSUB} TTOT := 10000 # TMIN := 1800 # TMAX := 9800 TMIN := 1925 TMAX := 2075 INPUT_OPTS := ${shell make_input_options.sh ${NNE} ${TTOT} ${INP_MIN} ${INP_MAX} ${INP_DEV}} TRACE_OPTS := ${shell make_trace_options.sh ${NNE} ${TMIN} ${TMAX}} compile: cd ${PROGDIR} && make all cd ${GEN_PROGDIR} && make all delete: rm -fv ${NMSIM_FILE} create: ${NMSIM_FILE} ${NMSIM_FILE}: compile ${GEN_PROG} \ -netType ISOLATED \ -netSize ${NNE} \ -phiType ${PHI} \ -V_tau ${V_tau} \ -M_R ${M_R} \ -M_tau ${M_tau} \ > ${NMSIM_FILE} simulate: compile ${NMSIM_FILE} -mkdir -p out -rm -f out/*.{txt,png} time ${PROG} \ -netFile ${NMSIM_FILE} \ -timeStep 1.0 \ -nSteps ${TTOT} \ ${INPUT_OPTS} \ ${TRACE_OPTS} \ -outPrefix ${OUT_PREFIX} plot-traces: extract_transfer.sh ${NNE} ${OUT_PREFIX} plot_transfers.sh 1 ${GEN_PREFIX} ${TAGSUBS} save_ISOLATED_test.sh "${TAG}" "${CMP}" "${SUBTAG}" plot_traces.sh 1 0 ${NNE} ${OUT_PREFIX} ${TMIN} ${TMAX} ${INP_MIN} ${INP_MAX} ${RHOMAX}