// tabchannels.hoc
// Neuron version of tabulated channels for kfast and kslow channels
//  from US Bhalla & JM Bower (1993) J. Neurophysiol 69:1948-1965

// Andrew Davison, The Babraham Institute
// 17th August 1998

//*************************************************************************
// Reading function tables for tabchannels
//*************************************************************************

// kfasttab
objref tabkinfvec, tabninfvec, tabktauvec, tabntauvec, vvec
clipboard_retrieve("kfast_k.inf")
tabkinfvec = hoc_obj_[0]
vvec = hoc_obj_[1]
clipboard_retrieve("kfast_n.inf")
tabninfvec = hoc_obj_[0]
clipboard_retrieve("kfast_k.tau")
tabktauvec = hoc_obj_[0]
clipboard_retrieve("kfast_n.tau")
tabntauvec = hoc_obj_[0]
table_tabkinf_kfasttab(&tabkinfvec.x[0], vvec.size, &vvec.x[0])
table_tabninf_kfasttab(&tabninfvec.x[0], vvec.size, &vvec.x[0])
table_tabktau_kfasttab(&tabktauvec.x[0], vvec.size, &vvec.x[0])
table_tabntau_kfasttab(&tabntauvec.x[0], vvec.size, &vvec.x[0])

//kslowtab
objref tabkinfvecs, tabninfvecs, tabktauvecs, tabntauvecs
clipboard_retrieve("kslow_k.inf")
tabkinfvecs = hoc_obj_[0]
clipboard_retrieve("kslow_n.inf")
tabninfvecs = hoc_obj_[0]
clipboard_retrieve("kslow_k.tau")
tabktauvecs = hoc_obj_[0]
clipboard_retrieve("kslow_n.tau")
tabntauvecs = hoc_obj_[0]
table_tabkinf_kslowtab(&tabkinfvecs.x[0], vvec.size, &vvec.x[0])
table_tabninf_kslowtab(&tabninfvecs.x[0], vvec.size, &vvec.x[0])
table_tabktau_kslowtab(&tabktauvecs.x[0], vvec.size, &vvec.x[0])
table_tabntau_kslowtab(&tabntauvecs.x[0], vvec.size, &vvec.x[0])