As a first practical example, we show how to use hsolve for extracellular field recordings. The efield object represents an extracellular field potential recording electrode that uses current sources and their distance from the electrode site to calculate the field potential. The current sources are the compartments that are computed by hsolve. If the RESET action is called on the efield object, it calculates the distances from the compartments to the electrode, and fills in the distance from the source element, that is sending the message, to the destination element, the efield element.
NOTE: In chanmode 4 hsolve calculates the capacitive current for the field Im, not the total membrane current. You can use chanmode 4 in this example, but the results will not be what you expect. Nevertheless it is a useful exercise, also check out what changing from chanmode 0 to chanmode 4 does to the simulation schedule. |
NOTE: The scripts for this example allow to switch off hsolve and use the compartments to do the computations. What happens if you naively switch from hsolve to the compartments and why? |