myokit 1.38.0__tar.gz → 1.39.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (417) hide show
  1. {myokit-1.38.0/myokit.egg-info → myokit-1.39.1}/PKG-INFO +17 -2
  2. {myokit-1.38.0 → myokit-1.39.1}/README.md +2 -0
  3. {myokit-1.38.0 → myokit-1.39.1}/myokit/__init__.py +5 -0
  4. {myokit-1.38.0 → myokit-1.39.1}/myokit/_config.py +18 -19
  5. {myokit-1.38.0 → myokit-1.39.1}/myokit/_datablock.py +6 -5
  6. {myokit-1.38.0 → myokit-1.39.1}/myokit/_expressions.py +6 -1
  7. {myokit-1.38.0 → myokit-1.39.1}/myokit/_model_api.py +44 -18
  8. {myokit-1.38.0 → myokit-1.39.1}/myokit/_myokit_version.py +1 -1
  9. {myokit-1.38.0 → myokit-1.39.1}/myokit/_parsing.py +8 -2
  10. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/cvodessim.py +26 -0
  11. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/__init__.py +37 -0
  12. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/ansic/_ewriter.py +1 -1
  13. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/axon/_abf.py +43 -9
  14. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/cellml/v1/__init__.py +5 -5
  15. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/cellml/v1/_api.py +220 -122
  16. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/cellml/v1/_parser.py +91 -87
  17. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/cellml/v1/_writer.py +13 -6
  18. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/cellml/v2/__init__.py +5 -8
  19. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/cellml/v2/_api.py +182 -106
  20. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/cellml/v2/_parser.py +68 -64
  21. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/cellml/v2/_writer.py +7 -3
  22. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/heka/_patchmaster.py +71 -14
  23. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/mathml/_parser.py +106 -67
  24. {myokit-1.38.0 → myokit-1.39.1}/myokit/gui/source.py +18 -12
  25. {myokit-1.38.0 → myokit-1.39.1}/myokit/lib/hh.py +21 -37
  26. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_cellml_v1_api.py +227 -33
  27. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_cellml_v1_parser.py +48 -17
  28. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_cellml_v1_writer.py +14 -4
  29. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_cellml_v2_api.py +132 -114
  30. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_cellml_v2_parser.py +31 -1
  31. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_cellml_v2_writer.py +8 -1
  32. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_datalog.py +17 -0
  33. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_expressions.py +61 -0
  34. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_formats.py +99 -0
  35. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_formats_mathml_content.py +97 -37
  36. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_formats_python.py +1 -1
  37. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_model_building.py +2 -0
  38. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_parsing.py +32 -0
  39. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_simulation_cvodes.py +10 -4
  40. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_variable.py +10 -7
  41. {myokit-1.38.0 → myokit-1.39.1/myokit.egg-info}/PKG-INFO +17 -2
  42. {myokit-1.38.0 → myokit-1.39.1}/LICENSE.txt +0 -0
  43. {myokit-1.38.0 → myokit-1.39.1}/MANIFEST.in +0 -0
  44. {myokit-1.38.0 → myokit-1.39.1}/myokit/__main__.py +0 -0
  45. {myokit-1.38.0 → myokit-1.39.1}/myokit/_aux.py +0 -0
  46. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/example.mmt +0 -0
  47. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/find.png +0 -0
  48. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/icon-datablock-viewer-128.xpm +0 -0
  49. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/icon-datablock-viewer-16.xpm +0 -0
  50. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/icon-datablock-viewer-24.xpm +0 -0
  51. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/icon-datablock-viewer-256.xpm +0 -0
  52. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/icon-datablock-viewer-32.xpm +0 -0
  53. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/icon-datablock-viewer-48.xpm +0 -0
  54. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/icon-datablock-viewer-64.xpm +0 -0
  55. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/icon-datablock-viewer-96.xpm +0 -0
  56. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/icon-datablock-viewer.ico +0 -0
  57. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/icon-datablock-viewer.png +0 -0
  58. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/icon-ide-128.xpm +0 -0
  59. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/icon-ide-16.xpm +0 -0
  60. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/icon-ide-24.xpm +0 -0
  61. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/icon-ide-256.xpm +0 -0
  62. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/icon-ide-32.xpm +0 -0
  63. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/icon-ide-48.xpm +0 -0
  64. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/icon-ide-64.xpm +0 -0
  65. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/icon-ide-96.xpm +0 -0
  66. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/icon-ide.ico +0 -0
  67. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/icon-ide.png +0 -0
  68. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/new.png +0 -0
  69. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/open.png +0 -0
  70. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/redo.png +0 -0
  71. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/run.png +0 -0
  72. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/save.png +0 -0
  73. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/gui/undo.png +0 -0
  74. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/install-lin/myokit-datablock-viewer.desktop +0 -0
  75. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/install-lin/myokit-datalog-viewer.desktop +0 -0
  76. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/install-lin/myokit-ide.desktop +0 -0
  77. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/install-lin/myokit.lang +0 -0
  78. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/install-lin/x-abf.xml +0 -0
  79. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/install-lin/x-cellml.xml +0 -0
  80. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/install-lin/x-myokit.xml +0 -0
  81. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/install-lin/x-wcp.xml +0 -0
  82. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/install-win/menu.json +0 -0
  83. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/sundials-win-vs/LICENSE +0 -0
  84. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/sundials-win-vs/include/cvodes/cvodes.h +0 -0
  85. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/sundials-win-vs/include/cvodes/cvodes_direct.h +0 -0
  86. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/sundials-win-vs/include/cvodes/cvodes_ls.h +0 -0
  87. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/sundials-win-vs/include/nvector/nvector_serial.h +0 -0
  88. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/sundials-win-vs/include/sundials/sundials_config.h +0 -0
  89. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/sundials-win-vs/include/sundials/sundials_dense.h +0 -0
  90. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/sundials-win-vs/include/sundials/sundials_direct.h +0 -0
  91. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/sundials-win-vs/include/sundials/sundials_export.h +0 -0
  92. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/sundials-win-vs/include/sundials/sundials_iterative.h +0 -0
  93. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/sundials-win-vs/include/sundials/sundials_linearsolver.h +0 -0
  94. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/sundials-win-vs/include/sundials/sundials_matrix.h +0 -0
  95. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/sundials-win-vs/include/sundials/sundials_nonlinearsolver.h +0 -0
  96. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/sundials-win-vs/include/sundials/sundials_nvector.h +0 -0
  97. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/sundials-win-vs/include/sundials/sundials_types.h +0 -0
  98. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/sundials-win-vs/include/sundials/sundials_version.h +0 -0
  99. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/sundials-win-vs/include/sunlinsol/sunlinsol_dense.h +0 -0
  100. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/sundials-win-vs/include/sunmatrix/sunmatrix_dense.h +0 -0
  101. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/sundials-win-vs/lib/sundials_cvodes.dll +0 -0
  102. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/sundials-win-vs/lib/sundials_cvodes.lib +0 -0
  103. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/sundials-win-vs/lib/sundials_nvecserial.dll +0 -0
  104. {myokit-1.38.0 → myokit-1.39.1}/myokit/_bin/sundials-win-vs/lib/sundials_nvecserial.lib +0 -0
  105. {myokit-1.38.0 → myokit-1.39.1}/myokit/_datalog.py +0 -0
  106. {myokit-1.38.0 → myokit-1.39.1}/myokit/_err.py +0 -0
  107. {myokit-1.38.0 → myokit-1.39.1}/myokit/_io.py +0 -0
  108. {myokit-1.38.0 → myokit-1.39.1}/myokit/_progress.py +0 -0
  109. {myokit-1.38.0 → myokit-1.39.1}/myokit/_protocol.py +0 -0
  110. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/__init__.py +0 -0
  111. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/cable.c +0 -0
  112. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/cable.py +0 -0
  113. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/cmodel.h +0 -0
  114. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/cmodel.py +0 -0
  115. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/compiler.c +0 -0
  116. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/compiler.py +0 -0
  117. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/cvodessim.c +0 -0
  118. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/differential.hpp +0 -0
  119. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/fiber_tissue.c +0 -0
  120. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/fiber_tissue.py +0 -0
  121. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/jacobian.cpp +0 -0
  122. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/jacobian.py +0 -0
  123. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/mcl.h +0 -0
  124. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/opencl.c +0 -0
  125. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/opencl.py +0 -0
  126. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/openclsim.c +0 -0
  127. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/openclsim.cl +0 -0
  128. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/openclsim.py +0 -0
  129. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/pacing.h +0 -0
  130. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/rhs.c +0 -0
  131. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/rhs.py +0 -0
  132. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/sundials.c +0 -0
  133. {myokit-1.38.0 → myokit-1.39.1}/myokit/_sim/sundials.py +0 -0
  134. {myokit-1.38.0 → myokit-1.39.1}/myokit/_system.py +0 -0
  135. {myokit-1.38.0 → myokit-1.39.1}/myokit/_unit.py +0 -0
  136. {myokit-1.38.0 → myokit-1.39.1}/myokit/float.py +0 -0
  137. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/ansic/__init__.py +0 -0
  138. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/ansic/_exporter.py +0 -0
  139. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/ansic/template/cable.c +0 -0
  140. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/ansic/template/euler.c +0 -0
  141. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/ansic/template/sim.c +0 -0
  142. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/axon/__init__.py +0 -0
  143. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/axon/_atf.py +0 -0
  144. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/axon/_importer.py +0 -0
  145. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/cellml/__init__.py +0 -0
  146. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/cellml/_ewriter.py +0 -0
  147. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/cellml/_exporter.py +0 -0
  148. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/cellml/_importer.py +0 -0
  149. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/channelml/__init__.py +0 -0
  150. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/channelml/_importer.py +0 -0
  151. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/cpp/__init__.py +0 -0
  152. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/cpp/_ewriter.py +0 -0
  153. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/cuda/__init__.py +0 -0
  154. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/cuda/_ewriter.py +0 -0
  155. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/cuda/_exporter.py +0 -0
  156. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/cuda/template/kernel.cu +0 -0
  157. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/diffsl/__init__.py +0 -0
  158. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/diffsl/_ewriter.py +0 -0
  159. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/diffsl/_exporter.py +0 -0
  160. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/easyml/__init__.py +0 -0
  161. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/easyml/_ewriter.py +0 -0
  162. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/easyml/_exporter.py +0 -0
  163. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/heka/__init__.py +0 -0
  164. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/heka/_importer.py +0 -0
  165. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/html/__init__.py +0 -0
  166. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/html/_exporter.py +0 -0
  167. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/html/_flatten.py +0 -0
  168. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/latex/__init__.py +0 -0
  169. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/latex/_ewriter.py +0 -0
  170. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/latex/_exporter.py +0 -0
  171. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/mathml/__init__.py +0 -0
  172. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/mathml/_ewriter.py +0 -0
  173. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/matlab/__init__.py +0 -0
  174. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/matlab/_ewriter.py +0 -0
  175. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/matlab/_exporter.py +0 -0
  176. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/matlab/template/constants.m +0 -0
  177. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/matlab/template/ifthenelse.m +0 -0
  178. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/matlab/template/main.m +0 -0
  179. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/matlab/template/model.m +0 -0
  180. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/matlab/template/model_wrapper.m +0 -0
  181. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/opencl/__init__.py +0 -0
  182. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/opencl/_ewriter.py +0 -0
  183. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/opencl/_exporter.py +0 -0
  184. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/opencl/template/cable.c +0 -0
  185. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/opencl/template/kernel.cl +0 -0
  186. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/opencl/template/minilog.py +0 -0
  187. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/opencl/template/plot.py +0 -0
  188. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/opencl/template/test.sh +0 -0
  189. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/python/__init__.py +0 -0
  190. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/python/_ewriter.py +0 -0
  191. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/python/_exporter.py +0 -0
  192. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/python/template/sim.py +0 -0
  193. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/sbml/__init__.py +0 -0
  194. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/sbml/_api.py +0 -0
  195. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/sbml/_exporter.py +0 -0
  196. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/sbml/_importer.py +0 -0
  197. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/sbml/_parser.py +0 -0
  198. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/sbml/_writer.py +0 -0
  199. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/stan/__init__.py +0 -0
  200. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/stan/_ewriter.py +0 -0
  201. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/stan/_exporter.py +0 -0
  202. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/stan/template/cell.stan +0 -0
  203. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/stan/template/run.py +0 -0
  204. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/sympy/__init__.py +0 -0
  205. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/sympy/_ereader.py +0 -0
  206. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/sympy/_ewriter.py +0 -0
  207. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/wcp/__init__.py +0 -0
  208. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/wcp/_wcp.py +0 -0
  209. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/xml/__init__.py +0 -0
  210. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/xml/_exporter.py +0 -0
  211. {myokit-1.38.0 → myokit-1.39.1}/myokit/formats/xml/_split.py +0 -0
  212. {myokit-1.38.0 → myokit-1.39.1}/myokit/gui/__init__.py +0 -0
  213. {myokit-1.38.0 → myokit-1.39.1}/myokit/gui/datablock_viewer.py +0 -0
  214. {myokit-1.38.0 → myokit-1.39.1}/myokit/gui/datalog_viewer.py +0 -0
  215. {myokit-1.38.0 → myokit-1.39.1}/myokit/gui/explorer.py +0 -0
  216. {myokit-1.38.0 → myokit-1.39.1}/myokit/gui/ide.py +0 -0
  217. {myokit-1.38.0 → myokit-1.39.1}/myokit/gui/progress.py +0 -0
  218. {myokit-1.38.0 → myokit-1.39.1}/myokit/gui/vargrapher.py +0 -0
  219. {myokit-1.38.0 → myokit-1.39.1}/myokit/lib/__init__.py +0 -0
  220. {myokit-1.38.0 → myokit-1.39.1}/myokit/lib/deps.py +0 -0
  221. {myokit-1.38.0 → myokit-1.39.1}/myokit/lib/guess.py +0 -0
  222. {myokit-1.38.0 → myokit-1.39.1}/myokit/lib/markov.py +0 -0
  223. {myokit-1.38.0 → myokit-1.39.1}/myokit/lib/multi.py +0 -0
  224. {myokit-1.38.0 → myokit-1.39.1}/myokit/lib/plots.py +0 -0
  225. {myokit-1.38.0 → myokit-1.39.1}/myokit/pacing.py +0 -0
  226. {myokit-1.38.0 → myokit-1.39.1}/myokit/pype.py +0 -0
  227. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/__init__.py +0 -0
  228. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/ansic_event_based_pacing.py +0 -0
  229. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/ansic_time_series_pacing.py +0 -0
  230. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/beeler-1977-model-compare-a.mmt +0 -0
  231. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/beeler-1977-model-compare-b.mmt +0 -0
  232. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/beeler-1977-model.mmt +0 -0
  233. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/beeler-1977-protocol.mmt +0 -0
  234. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/beeler-1977-script.mmt +0 -0
  235. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/beeler-1977-units.mmt +0 -0
  236. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/clancy-1999-fitting.mmt +0 -0
  237. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/conditional.mmt +0 -0
  238. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/cv1d.mmt +0 -0
  239. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/cv1d.zip +0 -0
  240. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/decker-2009.mmt +0 -0
  241. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/decker.model +0 -0
  242. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/dn-1985-normalised.mmt +0 -0
  243. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/dom-markov.mmt +0 -0
  244. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/abf-protocol.pro +0 -0
  245. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/abf-v1.abf +0 -0
  246. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/abf-v2.abf +0 -0
  247. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/cellml/LICENSE +0 -0
  248. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/cellml/br-1977-dot.cellml +0 -0
  249. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/cellml/br-1977.cellml +0 -0
  250. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/cellml/corrias.cellml +0 -0
  251. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/cellml/decker-2009.cellml +0 -0
  252. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/cellml/documentation.cellml +0 -0
  253. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/cellml/invalid-file.cellml +0 -0
  254. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/cellml/lr-1991-exported-1.cellml +0 -0
  255. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/cellml/lr-1991-exported-2.cellml +0 -0
  256. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/channelml/ch-00-valid-file.channelml +0 -0
  257. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/channelml/ch-01-wrong-root.channelml +0 -0
  258. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/channelml/ch-02-no-channel-type.channelml +0 -0
  259. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/channelml/ch-03-overlapping-name.channelml +0 -0
  260. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/channelml/ch-04-no-cvr.channelml +0 -0
  261. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/channelml/ch-05-two-cvrs.channelml +0 -0
  262. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/channelml/ch-06-no-q10.channelml +0 -0
  263. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/channelml/ch-07-three-transitions.channelml +0 -0
  264. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/channelml/ch-08-no-closed-to-open.channelml +0 -0
  265. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/channelml/ch-09-no-open-to-closed.channelml +0 -0
  266. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/channelml/ch-10-tco-bad-expression.channelml +0 -0
  267. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/channelml/ch-11-toc-bad-expression.channelml +0 -0
  268. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/channelml/ch-12-no-steady-state.channelml +0 -0
  269. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/channelml/ch-13-no-time-course.channelml +0 -0
  270. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/channelml/ch-14-inf-bad-expression.channelml +0 -0
  271. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/channelml/ch-15-tau-bad-expression.channelml +0 -0
  272. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/channelml/ch-16-no-gates.channelml +0 -0
  273. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/channelml/ch-17-invalid-name.channelml +0 -0
  274. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/channelml/ch-18-c-style-if.channelml +0 -0
  275. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/sbml/00004-sbml-l2v1-modified.xml +0 -0
  276. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/sbml/00004-sbml-l3v2-modified.xml +0 -0
  277. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/sbml/HodgkinHuxley.xml +0 -0
  278. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/sbml/LICENSE +0 -0
  279. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/sbml/model/00001-sbml-l3v2.xml +0 -0
  280. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/sbml/model/00004-sbml-l3v2.xml +0 -0
  281. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/sbml/model/01103-sbml-l3v2.xml +0 -0
  282. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/sbml/result/00001-results.csv +0 -0
  283. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/sbml/result/00004-results.csv +0 -0
  284. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/sbml/result/01103-results.csv +0 -0
  285. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/wcp-file-empty.wcp +0 -0
  286. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/formats/wcp-file.wcp +0 -0
  287. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/bad1d-1-not-enough-files.zip +0 -0
  288. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/bad1d-2-no-header.zip +0 -0
  289. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/bad1d-3-no-data.zip +0 -0
  290. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/bad1d-4-not-a-zip.zip +0 -0
  291. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/bad1d-5-bad-data-type.zip +0 -0
  292. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/bad1d-6-time-too-short.zip +0 -0
  293. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/bad1d-7-0d-too-short.zip +0 -0
  294. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/bad1d-8-1d-too-short.zip +0 -0
  295. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/bad2d-1-not-enough-files.zip +0 -0
  296. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/bad2d-2-no-header.zip +0 -0
  297. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/bad2d-3-no-data.zip +0 -0
  298. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/bad2d-4-not-a-zip.zip +0 -0
  299. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/bad2d-5-bad-data-type.zip +0 -0
  300. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/bad2d-6-time-too-short.zip +0 -0
  301. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/bad2d-7-0d-too-short.zip +0 -0
  302. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/bad2d-8-2d-too-short.zip +0 -0
  303. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/badlog-1-no-data.zip +0 -0
  304. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/badlog-2-no-structure.zip +0 -0
  305. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/badlog-3-not-a-zip.zip +0 -0
  306. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/badlog-4-invalid-n-fields.zip +0 -0
  307. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/badlog-5-invalid-data-size.zip +0 -0
  308. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/badlog-6-bad-data-type.zip +0 -0
  309. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/badlog-7-not-enough-data.zip +0 -0
  310. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/block1d.mmt +0 -0
  311. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/block2d.mmt +0 -0
  312. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/block2d.zip +0 -0
  313. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/datalog-1-empty.csv +0 -0
  314. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/datalog-10-just-spaces.csv +0 -0
  315. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/datalog-11-just-a-semicolon.csv +0 -0
  316. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/datalog-12-bad-header.csv +0 -0
  317. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/datalog-13-header-with-empty-1.csv +0 -0
  318. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/datalog-14-header-with-empty-2.csv +0 -0
  319. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/datalog-15-header-with-empty-3.csv +0 -0
  320. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/datalog-16-wrong-columns-in-data.csv +0 -0
  321. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/datalog-17-non-float-data.csv +0 -0
  322. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/datalog-18-duplicate-keys.csv +0 -0
  323. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/datalog-2-windows.csv +0 -0
  324. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/datalog-3-old-mac.csv +0 -0
  325. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/datalog-4-empty-lines.csv +0 -0
  326. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/datalog-5-semicolons.csv +0 -0
  327. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/datalog-6-open-string.csv +0 -0
  328. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/datalog-7-empty-lines-2.csv +0 -0
  329. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/datalog-8-unquoted-header.csv +0 -0
  330. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/datalog-9-double-quoted-header.csv +0 -0
  331. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/datalog.csv +0 -0
  332. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/io/goodlog.zip +0 -0
  333. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/lr-1991-dep.mmt +0 -0
  334. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/lr-1991-fitting.mmt +0 -0
  335. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/lr-1991-testing.mmt +0 -0
  336. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/lr-1991.mmt +0 -0
  337. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/multi/beeler-1977-protocol.mmt +0 -0
  338. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/multi/beeler-1977-script.mmt +0 -0
  339. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/multi/beeler-no-name.mmt +0 -0
  340. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/multi/lr-1991.mmt +0 -0
  341. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/multi/not-a-model.csv +0 -0
  342. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/multi/subdir/beeler-no-name.mmt +0 -0
  343. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/data/noble-1962.mmt +0 -0
  344. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_aux.py +0 -0
  345. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_cmodel.py +0 -0
  346. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_compiler_detection.py +0 -0
  347. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_component.py +0 -0
  348. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_config.py +0 -0
  349. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_datablock.py +0 -0
  350. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_dependency_checking.py +0 -0
  351. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_float.py +0 -0
  352. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_formats_ansic.py +0 -0
  353. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_formats_axon.py +0 -0
  354. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_formats_cellml.py +0 -0
  355. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_formats_channelml.py +0 -0
  356. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_formats_cpp.py +0 -0
  357. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_formats_cuda.py +0 -0
  358. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_formats_diffsl.py +0 -0
  359. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_formats_easyml.py +0 -0
  360. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_formats_exporters_run.py +0 -0
  361. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_formats_html.py +0 -0
  362. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_formats_latex.py +0 -0
  363. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_formats_mathml_presentation.py +0 -0
  364. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_formats_matlab.py +0 -0
  365. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_formats_opencl.py +0 -0
  366. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_formats_sbml.py +0 -0
  367. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_formats_stan.py +0 -0
  368. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_formats_sympy.py +0 -0
  369. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_formats_wcp.py +0 -0
  370. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_io.py +0 -0
  371. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_jacobian_calculator.py +0 -0
  372. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_jacobian_tracer.py +0 -0
  373. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_lib_deps.py +0 -0
  374. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_lib_guess.py +0 -0
  375. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_lib_hh.py +0 -0
  376. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_lib_markov.py +0 -0
  377. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_lib_multi.py +0 -0
  378. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_lib_plots.py +0 -0
  379. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_meta.py +0 -0
  380. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_model.py +0 -0
  381. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_opencl_info.py +0 -0
  382. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_pacing_factory.py +0 -0
  383. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_pacing_system_c.py +0 -0
  384. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_pacing_system_py.py +0 -0
  385. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_progress_reporters.py +0 -0
  386. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_protocol.py +0 -0
  387. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_protocol_floating_point.py +0 -0
  388. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_protocol_time_series.py +0 -0
  389. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_pype.py +0 -0
  390. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_quantity.py +0 -0
  391. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_rhs_benchmarker.py +0 -0
  392. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_sbml_api.py +0 -0
  393. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_sbml_export.py +0 -0
  394. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_sbml_parser.py +0 -0
  395. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_simulation_1d.py +0 -0
  396. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_simulation_cvodes_from_disk.py +0 -0
  397. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_simulation_fiber_tissue.py +0 -0
  398. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_simulation_log_interval.py +0 -0
  399. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_simulation_opencl.py +0 -0
  400. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_simulation_opencl_log_interval.py +0 -0
  401. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_simulation_opencl_vs_cvode.py +0 -0
  402. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_simulation_opencl_vs_sim1d.py +0 -0
  403. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_system_info.py +0 -0
  404. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_tools.py +0 -0
  405. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_unit.py +0 -0
  406. {myokit-1.38.0 → myokit-1.39.1}/myokit/tests/test_user_functions.py +0 -0
  407. {myokit-1.38.0 → myokit-1.39.1}/myokit/tools.py +0 -0
  408. {myokit-1.38.0 → myokit-1.39.1}/myokit/units.py +0 -0
  409. {myokit-1.38.0 → myokit-1.39.1}/myokit.egg-info/SOURCES.txt +0 -0
  410. {myokit-1.38.0 → myokit-1.39.1}/myokit.egg-info/dependency_links.txt +0 -0
  411. {myokit-1.38.0 → myokit-1.39.1}/myokit.egg-info/entry_points.txt +0 -0
  412. {myokit-1.38.0 → myokit-1.39.1}/myokit.egg-info/not-zip-safe +0 -0
  413. {myokit-1.38.0 → myokit-1.39.1}/myokit.egg-info/requires.txt +0 -0
  414. {myokit-1.38.0 → myokit-1.39.1}/myokit.egg-info/top_level.txt +0 -0
  415. {myokit-1.38.0 → myokit-1.39.1}/pyproject.toml +0 -0
  416. {myokit-1.38.0 → myokit-1.39.1}/setup.cfg +0 -0
  417. {myokit-1.38.0 → myokit-1.39.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: myokit
3
- Version: 1.38.0
3
+ Version: 1.39.1
4
4
  Summary: A modeling and simulation tool for cardiac cellular electrophysiology
5
5
  Home-page: http://myokit.org
6
6
  Author: Michael Clerx
@@ -44,6 +44,19 @@ Requires-Dist: pyqt6; extra == "pyqt"
44
44
  Requires-Dist: sip; extra == "pyqt"
45
45
  Provides-Extra: pyside
46
46
  Requires-Dist: pyside6; extra == "pyside"
47
+ Dynamic: author
48
+ Dynamic: author-email
49
+ Dynamic: classifier
50
+ Dynamic: description
51
+ Dynamic: description-content-type
52
+ Dynamic: home-page
53
+ Dynamic: license
54
+ Dynamic: license-file
55
+ Dynamic: project-url
56
+ Dynamic: provides-extra
57
+ Dynamic: requires-dist
58
+ Dynamic: requires-python
59
+ Dynamic: summary
47
60
 
48
61
  [![Ubuntu unit tests](https://github.com/myokit/myokit/actions/workflows/unit-tests-ubuntu.yml/badge.svg)](https://github.com/myokit/myokit/actions/workflows/unit-tests-ubuntu.yml)
49
62
  [![MacOS unit tests](https://github.com/myokit/myokit/actions/workflows/unit-tests-macos.yml/badge.svg)](https://github.com/myokit/myokit/actions/workflows/unit-tests-macos.yml)
@@ -51,6 +64,8 @@ Requires-Dist: pyside6; extra == "pyside"
51
64
  [![Windows Miniconda test](https://github.com/myokit/myokit/actions/workflows/unit-tests-windows-miniconda.yml/badge.svg)](https://github.com/myokit/myokit/actions/workflows/unit-tests-windows-miniconda.yml)
52
65
  [![codecov](https://codecov.io/gh/myokit/myokit/branch/main/graph/badge.svg)](https://codecov.io/gh/myokit/myokit)
53
66
  [![Documentation Status](https://readthedocs.org/projects/myokit/badge/?version=latest)](https://myokit.readthedocs.io/?badge=latest)
67
+ [![pypi](https://img.shields.io/pypi/v/myokit)](https://pypi.org/project/myokit/)
68
+ [![anaconda](https://anaconda.org/conda-forge/myokit/badges/version.svg)](https://anaconda.org/conda-forge/myokit)
54
69
 
55
70
  ![Myokit](https://myokit.org/static/img/logo.png)
56
71
 
@@ -4,6 +4,8 @@
4
4
  [![Windows Miniconda test](https://github.com/myokit/myokit/actions/workflows/unit-tests-windows-miniconda.yml/badge.svg)](https://github.com/myokit/myokit/actions/workflows/unit-tests-windows-miniconda.yml)
5
5
  [![codecov](https://codecov.io/gh/myokit/myokit/branch/main/graph/badge.svg)](https://codecov.io/gh/myokit/myokit)
6
6
  [![Documentation Status](https://readthedocs.org/projects/myokit/badge/?version=latest)](https://myokit.readthedocs.io/?badge=latest)
7
+ [![pypi](https://img.shields.io/pypi/v/myokit)](https://pypi.org/project/myokit/)
8
+ [![anaconda](https://anaconda.org/conda-forge/myokit/badges/version.svg)](https://anaconda.org/conda-forge/myokit)
7
9
 
8
10
  ![Myokit](https://myokit.org/static/img/logo.png)
9
11
 
@@ -261,6 +261,11 @@ UNIT_STRICT = 2
261
261
  SFDOUBLE = '{:< 1.17e}' # Exponent can have 3 digits for very small numbers
262
262
  SFSINGLE = '{:< 1.9e}'
263
263
 
264
+ #
265
+ # Shared real regex. Unsigned, and without "anchors" for string start and end
266
+ #
267
+ _RE_UNSIGNED_REAL = r'(([0-9]*\.[0-9]+)|([0-9]+\.?[0-9]*))([eE][+-]?[0-9]+)?'
268
+
264
269
  #
265
270
  # Date and time formats to use throughout Myokit
266
271
  #
@@ -45,9 +45,9 @@ def _create(path):
45
45
  'compatibility',
46
46
  '# Optional settings to make Myokit work on tricky systems.')
47
47
  config.set('compatibility', '# Don\'t capture compiler output.')
48
- config.set('compatibility', '#no_capture = True')
48
+ config.set('compatibility', '#no_capture', 'True')
49
49
  config.set('compatibility', '# Don\'t use the file-descriptor method.')
50
- config.set('compatibility', '#no_fd_capture = True')
50
+ config.set('compatibility', '#no_fd_capture', 'True')
51
51
 
52
52
  # Date format
53
53
  config.add_section('time')
@@ -63,16 +63,16 @@ def _create(path):
63
63
  config.set('gui', '# Backend to use for graphical user interface.')
64
64
  config.set('gui', '# Valid options are pyqt6, pyqt5, pyside6 and pyside2.')
65
65
  config.set('gui', '# Leave unset for automatic selection.')
66
- config.set('gui', '#backend = pyqt6')
67
- config.set('gui', '#backend = pyqt5')
68
- config.set('gui', '#backend = pyside6')
69
- config.set('gui', '#backend = pyside2')
66
+ config.set('gui', '#backend', 'pyqt6')
67
+ config.set('gui', '#backend', 'pyqt5')
68
+ config.set('gui', '#backend', 'pyside6')
69
+ config.set('gui', '#backend', 'pyside2')
70
70
 
71
71
  # Locations of sundials library
72
72
  config.add_section('sundials')
73
73
  config.set(
74
- 'sundials', '# Location of sundials shared libary files'
75
- ' (.so, .dll, or .dylib).')
74
+ 'sundials',
75
+ '# Location of sundials shared libary files (.so, .dll, or .dylib).')
76
76
  config.set('sundials', '# Multiple paths can be set using ; as separator.')
77
77
 
78
78
  if system == 'Windows': # pragma: no linux cover
@@ -159,9 +159,9 @@ def _create(path):
159
159
  # All windowses
160
160
  c64 = 'C:\\Program Files\\'
161
161
  config.set('opencl', 'inc', ';'.join([
162
- c64 + 'Intel\\OpenCL SDK\\6.3\\include',
163
- c64 + 'AMD APP SDK\\2.9\\include',
164
- c64 + 'NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\include',
162
+ f'{c64}Intel\\OpenCL SDK\\6.3\\include',
163
+ f'{c64}AMD APP SDK\\2.9\\include',
164
+ f'{c64}NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\include',
165
165
  ]))
166
166
  else:
167
167
  # Linux and mac
@@ -205,10 +205,9 @@ def _load():
205
205
  if m is not None:
206
206
  x = m.start(1) - 1
207
207
  raise ImportError(
208
- 'Unsupported syntax found in ' + str(path) + ' on line '
209
- + str(1 + i) + ', character ' + str(x) + ', semicolons (;)'
210
- + ' must not be preceded by whitespace: ```'
211
- + line.strip() + '```.')
208
+ f'Unsupported syntax found in {path} on line {i + 1},'
209
+ f' character {x}, semicolons (;) must not be preceded by'
210
+ f' whitespace: ```{line.strip()}```.')
212
211
  del lines, inline_comment
213
212
 
214
213
  # Create the config parser (no value allows comments)
@@ -230,7 +229,7 @@ def _load():
230
229
  elif x != '':
231
230
  warnings.warn(
232
231
  'Invalid setting in myokit.ini. Expected values for no_capture'
233
- ' are true, false, or not set (empty), but got: ' + x)
232
+ f' are true, false, or not set (empty), but got: {x}.')
234
233
 
235
234
  if config.has_option('compatibility', 'no_fd_capture'):
236
235
  x = config.get('compatibility', 'no_fd_capture').strip().lower()
@@ -241,8 +240,8 @@ def _load():
241
240
  elif x != '':
242
241
  warnings.warn(
243
242
  'Invalid setting in myokit.ini. Expected values for'
244
- ' no_fd_capture are true, false, or not set (empty), but got: '
245
- + x)
243
+ ' no_fd_capture are true, false, or not set (empty), but'
244
+ f' got: {x}.')
246
245
 
247
246
  # Date format
248
247
  if config.has_option('time', 'date_format'):
@@ -282,7 +281,7 @@ def _load():
282
281
  elif x != '':
283
282
  warnings.warn(
284
283
  'Invalid setting in myokit.ini. Expected values for backend'
285
- ' are pyqt6, pyqt5, pyside6, or pyside2. Got: ' + x)
284
+ f' are pyqt6, pyqt5, pyside6, or pyside2, but got: {x}.')
286
285
 
287
286
  # Sundials libraries, header files, and version
288
287
  if config.has_option('sundials', 'lib'):
@@ -331,17 +331,18 @@ class DataBlock1d:
331
331
 
332
332
  def get0d(self, name):
333
333
  """
334
- Returns the 0d time-series identified by ``name``. The data is returned
335
- directly, no copy is made.
334
+ Returns the 0d time-series identified by ``name``.
335
+
336
+ The data is returned directly, no copy is made.
336
337
  """
337
338
  return self._0d[name]
338
339
 
339
340
  def get1d(self, name):
340
341
  """
341
- Returns the 1d time-series identified by ``name``. The data is returned
342
- directly, no copy is made.
342
+ Returns the 1d time-series identified by ``name``.
343
343
 
344
- The returned data is a 2d array of the shape given by :meth:`shape`.
344
+ The returned data is a 2d array of the shape given by :meth:`shape`. It
345
+ is returned directly, no copy is made.
345
346
  """
346
347
  return self._1d[name]
347
348
 
@@ -848,7 +848,7 @@ class Number(Expression):
848
848
  self._unit = value.unit()
849
849
  else:
850
850
  # Basic creation with number and unit
851
- self._value = float(value) if value else 0.0
851
+ self._value = float(value)
852
852
  if unit is None or isinstance(unit, myokit.Unit):
853
853
  self._unit = unit
854
854
  elif isinstance(unit, str):
@@ -875,6 +875,11 @@ class Number(Expression):
875
875
  else:
876
876
  # Turn e+15 into e15
877
877
  self._str = self._str[:-3] + self._str[-2:]
878
+ elif self._str == 'inf':
879
+ self._str = 'infinity'
880
+ elif self._str == '-inf':
881
+ self._str = '-infinity'
882
+ # nan is fine
878
883
  if self._unit and self._unit != myokit.units.dimensionless:
879
884
  self._str += ' ' + str(self._unit)
880
885
 
@@ -2939,8 +2939,8 @@ class Model(ObjectWithMetaData, VarProvider):
2939
2939
  self._state_init = [
2940
2940
  myokit.Number(x) for x in self.map_to_state(values)]
2941
2941
  elif len(values) != len(self._state_vars):
2942
- raise ValueError('Wrong number of initial values, expecting '
2943
- + str(len(self._state_vars)) + '.')
2942
+ raise ValueError('Wrong number of initial values, expecting'
2943
+ f' {len(self._state_vars)}.')
2944
2944
  else:
2945
2945
  # Parsing of arguments without making changes, in case it fails.
2946
2946
  expr = []
@@ -3926,10 +3926,10 @@ class Variable(VarOwner):
3926
3926
  # the expression returned by rhs()). References to values of state
3927
3927
  # variables are stored separately. Bound variables are treated as if
3928
3928
  # they were unbound.
3929
- self._refs_by = set() # Vars that refer to this var
3930
- self._refs_to = set() # Vars that this var refers to
3931
- self._srefs_by = set() # Vars that refer to this state var's value
3932
- self._srefs_to = set() # State var values that this var refers to
3929
+ self._refs_by = set() # Vars that refer to my LHS
3930
+ self._srefs_by = set() # Vars that refer to my current state value
3931
+ self._refs_to = set() # Vars whos LHS I refer to
3932
+ self._srefs_to = set() # Vars who current state value I refer to
3933
3933
 
3934
3934
  # Left-hand side representation (name or dot)
3935
3935
  self._lhs = myokit.Name(self)
@@ -4621,22 +4621,44 @@ class Variable(VarOwner):
4621
4621
 
4622
4622
  def refs_by(self, state_refs=False):
4623
4623
  """
4624
- Returns an iterator over the set of :class:`Variables <Variable>` that
4625
- refer to this variable in their defining equation.
4624
+ Returns an iterator over the set of :class:`Variables <Variable>` that
4625
+ refer to this variable.
4626
+
4627
+ By default (``state_refs=False``), the returned variables all refer to
4628
+ this variable's defining :class:`LhsExpression`, i.e. the one returned
4629
+ by :meth:`lhs()`.
4630
+
4631
+ For example::
4632
+
4633
+ a = 2
4634
+ b = 1 + a
4635
+
4636
+ a.refs_by() will include b
4637
+
4638
+ But references to *state values* are not counted::
4626
4639
 
4627
- Note that only references to this variable's defining
4628
- :class:`LhsExpression` (i.e. the one returned by :meth:`lhs()`) are
4629
- returned. For a state variable ``x``, this means the returned result
4630
- contains all variables referring to ``dot(x)``. To get an iterator over
4631
- the variables referring to ``x`` instead, add the optional attribute
4632
- ``state_refs=True``. For non-state variables this setting will trigger
4633
- an :class:`Exception`.
4640
+ dot(a) = 2
4641
+ b = 1 + a
4642
+ c = 1 + dot(a)
4643
+
4644
+ a.refs_by() will include c, but not b
4645
+
4646
+ To see who refers to this variable's state value, use
4647
+ ``state_refs=True``::
4648
+
4649
+ dot(a) = 2
4650
+ b = 1 + a
4651
+ c = 1 + dot(a)
4652
+
4653
+ a.refs_by(True) will include b, but not c
4654
+
4655
+ Calling ``refs_by(True)`` on a non-state variable will raise an
4656
+ :class:`Exception`.
4634
4657
  """
4635
4658
  if state_refs:
4636
4659
  if not self._is_state:
4637
- raise Exception(
4638
- 'The argument "state_refs=True" can only be used on state'
4639
- ' variables.')
4660
+ raise Exception('The argument "state_refs=True" can only be'
4661
+ ' used on state variables.')
4640
4662
  return iter(self._srefs_by)
4641
4663
  return iter(self._refs_by)
4642
4664
 
@@ -4648,6 +4670,8 @@ class Variable(VarOwner):
4648
4670
  By default, this will _not_ include references to a state variable's
4649
4671
  value. To obtain a list of state variables whose value is referenced,
4650
4672
  use ``state_refs=True``.
4673
+
4674
+ See also: :meth:`refs_by`.
4651
4675
  """
4652
4676
  if state_refs:
4653
4677
  return iter(self._srefs_to)
@@ -4788,6 +4812,8 @@ class Variable(VarOwner):
4788
4812
  if not isinstance(value, myokit.Expression):
4789
4813
  if isinstance(value, str):
4790
4814
  value = myokit.parse_expression(value, context=model)
4815
+ elif isinstance(value, myokit.Variable):
4816
+ value = myokit.Name(value)
4791
4817
  else:
4792
4818
  value = myokit.Number(value)
4793
4819
 
@@ -14,7 +14,7 @@ __release__ = True
14
14
  # incompatibility
15
15
  # - Changes to revision indicate bugfixes, tiny new features
16
16
  # - There is no significance to odd/even numbers
17
- __version_tuple__ = 1, 38, 0
17
+ __version_tuple__ = 1, 39, 1
18
18
 
19
19
  # String version of the version number
20
20
  __version__ = '.'.join([str(x) for x in __version_tuple__])
@@ -1184,6 +1184,8 @@ add_token('AS', 'as') # Alias
1184
1184
  add_token('BIND', 'bind') # External value
1185
1185
  add_token('LABEL', 'label') # Special value
1186
1186
  add_token('UNIT', 'unit') # Used to given Units a useful token.
1187
+ add_token('INF', 'infinity')
1188
+ add_token('NAN', 'nan')
1187
1189
 
1188
1190
  # Reserved keywords
1189
1191
  KEYWORD_MAP = {
@@ -1195,6 +1197,8 @@ KEYWORD_MAP = {
1195
1197
  'as': AS,
1196
1198
  'bind': BIND,
1197
1199
  'label': LABEL,
1200
+ 'infinity': INF,
1201
+ 'nan': NAN,
1198
1202
  }
1199
1203
  KEYWORDS = KEYWORD_MAP.keys()
1200
1204
 
@@ -1213,8 +1217,8 @@ _rTOKEN = re.compile('|'.join([
1213
1217
  r'([a-zA-Z]\w*:)+',
1214
1218
  # Names
1215
1219
  r'[a-zA-Z]\w*',
1216
- # Floating point numbers
1217
- r'(([0-9]*\.[0-9]+)|([0-9]+\.?[0-9]*))([eE][+-]?[0-9]+)?',
1220
+ # Unsigned real numbers, allowing exponential notation
1221
+ myokit._RE_UNSIGNED_REAL,
1218
1222
  # Integers
1219
1223
  r'[0-9]+',
1220
1224
  # Comparison 1
@@ -2166,6 +2170,8 @@ nud_parsers[MINUS] = PrefixParser(myokit.PrefixMinus)
2166
2170
  nud_parsers[NOT] = PrefixParser(myokit.Not)
2167
2171
  nud_parsers[PAREN_OPEN] = GroupingParser()
2168
2172
  nud_parsers[FUNC_NAME] = FunctionParser()
2173
+ nud_parsers[INF] = NumberParser()
2174
+ nud_parsers[NAN] = NumberParser()
2169
2175
  # Left denomination parsers
2170
2176
  led_parsers = {}
2171
2177
  led_parsers[PLUS] = InfixParser(myokit.Plus)
@@ -239,6 +239,7 @@ class Simulation(myokit.CModule):
239
239
  # Last state reached before error
240
240
  self._error_state = None
241
241
  self._error_inputs = None
242
+ self._error_log = None
242
243
 
243
244
  # Starting time
244
245
  self._time = 0
@@ -396,9 +397,26 @@ class Simulation(myokit.CModule):
396
397
 
397
398
  Will return ``None`` if no simulation was run or the simulation did not
398
399
  result in an error.
400
+
401
+ A typical use case is to inspect the calculation of derivatives after a
402
+ crash, with::
403
+
404
+ sim.evaluate_derivatives(sim.crash_state(), sim.crash_inputs())
405
+
399
406
  """
400
407
  return dict(self._error_inputs) if self._error_inputs else None
401
408
 
409
+ def crash_log(self):
410
+ """
411
+ If the last call to :meth:`Simulation.pre()` or
412
+ :meth:`Simulation.run()` resulted in an error, this will return the
413
+ :class:`myokit.DataLog` containing the data logged up until the crash.
414
+
415
+ Will return ``None`` if no simulation was run or the simulation did not
416
+ result in an error.
417
+ """
418
+ return None if self._error_log is None else self._error_log.clone()
419
+
402
420
  def crash_state(self):
403
421
  """
404
422
  If the last call to :meth:`Simulation.pre()` or
@@ -407,6 +425,12 @@ class Simulation(myokit.CModule):
407
425
 
408
426
  Will return ``None`` if no simulation was run or the simulation did not
409
427
  result in an error.
428
+
429
+ A typical use case is to inspect the calculation of derivatives after a
430
+ crash, with::
431
+
432
+ sim.evaluate_derivatives(sim.crash_state(), sim.crash_inputs())
433
+
410
434
  """
411
435
  return list(self._error_state) if self._error_state else None
412
436
 
@@ -752,6 +776,7 @@ class Simulation(myokit.CModule):
752
776
  # Reset error state
753
777
  self._error_state = None
754
778
  self._error_inputs = None
779
+ self._error_log = None
755
780
 
756
781
  # Simulation times
757
782
  if duration < 0:
@@ -915,6 +940,7 @@ class Simulation(myokit.CModule):
915
940
  self._error_inputs[label] = bound[1 + i]
916
941
  for i, label in enumerate(self._pacing_labels):
917
942
  self._error_inputs[label] = bound[3 + i]
943
+ self._error_log = log
918
944
 
919
945
  # Create long error message
920
946
  txt = ['A numerical error occurred during simulation at'
@@ -5,6 +5,7 @@
5
5
  # See http://myokit.org for copyright, sharing, and licensing details.
6
6
  #
7
7
  import os
8
+ import re
8
9
  import sys
9
10
  import traceback
10
11
  import warnings
@@ -19,6 +20,13 @@ _IMPORTERS = None
19
20
  _EXPORTERS = None
20
21
  _EWRITERS = None
21
22
 
23
+ # String matching
24
+ # Note: $ allows a newline before the end of string, \Z does not
25
+ _re_int = re.compile(r'^[+-]?[0-9]+\Z')
26
+ _re_int_s = re.compile(r'^\s*[+-]?[0-9]+\s*\Z')
27
+ _re_real = re.compile(rf'^[+-]?{myokit._RE_UNSIGNED_REAL}\Z')
28
+ _re_real_s = re.compile(rf'^\s*[+-]?{myokit._RE_UNSIGNED_REAL}\s*\Z')
29
+
22
30
 
23
31
  # Classes & methods
24
32
  class Exporter:
@@ -888,3 +896,32 @@ class SweepSource:
888
896
  """ Returns the time unit used in this source. """
889
897
  raise NotImplementedError
890
898
 
899
+
900
+ def is_integer_string(text, strip_whitespace=False):
901
+ """
902
+ Checks whether ``text`` can be interpreted as a signed integer string.
903
+
904
+ By default, this only returns ``True`` if the whole string matches, without
905
+ whitespace before or after. To allow surrounding whitespace, set
906
+ ``strip_whitespace=True``.
907
+ """
908
+ if strip_whitespace:
909
+ return _re_int_s.match(text) is not None
910
+ return _re_int.match(text) is not None
911
+
912
+
913
+ def is_real_number_string(text, strip_whitespace=False):
914
+ """
915
+ Checks whether ``text`` can be interpreted as a signed real number string.
916
+
917
+ By default, this only returns ``True`` if the whole string matches, without
918
+ whitespace before or after. To allow surrounding whitespace, set
919
+ ``strip_whitespace=True``.
920
+
921
+ Unlike Python's ``float``, values such as ``nan`` or ``-inf`` are not
922
+ accepted.
923
+ """
924
+ if strip_whitespace:
925
+ return _re_real_s.match(text) is not None
926
+ return _re_real.match(text) is not None
927
+
@@ -133,7 +133,7 @@ class AnsiCExpressionWriter(CBasedExpressionWriter):
133
133
  def set_condition_function(self, func=None):
134
134
  """
135
135
  Sets a function name to use for :class:`myokit.If`; if not set the
136
- ternary operatur will be used.
136
+ ternary operator will be used.
137
137
 
138
138
  If given, the function arguments should be ``(condition, value_if_true,
139
139
  value_if_false)``. To revert to using the ternary operator, call with
@@ -223,9 +223,13 @@ class AbfFile(myokit.formats.SweepSource):
223
223
  D/A "protocol" information will be read. If left at its default value
224
224
  of ``None`` files with the extension ``.pro`` will be recognized as
225
225
  protocol files.
226
+ ``convert_ramps``
227
+ If set to ``True``, a protocol with ramps will be read, with ramps
228
+ replaced by steps. If left at the default ``False``, the protocol will
229
+ not be read.
226
230
 
227
231
  """
228
- def __init__(self, filepath, is_protocol_file=None):
232
+ def __init__(self, filepath, is_protocol_file=None, convert_ramps=False):
229
233
  # The path to the file and its basename
230
234
  filepath = str(filepath)
231
235
  self._filepath = os.path.abspath(filepath)
@@ -281,6 +285,7 @@ class AbfFile(myokit.formats.SweepSource):
281
285
  # will have A/D but no (or no supported) D/A. Conversely protocol files
282
286
  # will have D/A only. So all in one sweep is easiest.
283
287
  self._sweeps = None
288
+ self._convert_ramps = bool(convert_ramps)
284
289
  self._read_3_protocol_information()
285
290
 
286
291
  # Read and calculate conversion factors for integer data in ADC
@@ -560,7 +565,6 @@ class AbfFile(myokit.formats.SweepSource):
560
565
  self._mode = h['nOperationMode']
561
566
  else:
562
567
  # In version 2, there are up to 8 "waveform" D/A channels
563
-
564
568
  self._n_adc = int(h['sections']['ADC']['length'])
565
569
  self._n_dac = int(h['sections']['DAC']['length'])
566
570
  self._rate = 1e6 / h['protocol']['fADCSequenceInterval']
@@ -696,7 +700,6 @@ class AbfFile(myokit.formats.SweepSource):
696
700
  return
697
701
 
698
702
  # Get indices of enabled and supported DAC reconstructions
699
- supported = {EPOCH_DISABLED, EPOCH_STEPPED}
700
703
  for i_dac in range(self._n_dac):
701
704
  if einfo_exists(i_dac):
702
705
  i = einfo(i_dac)
@@ -715,6 +718,12 @@ class AbfFile(myokit.formats.SweepSource):
715
718
  t = e['type']
716
719
  if t == EPOCH_STEPPED:
717
720
  use = True
721
+ elif t == EPOCH_RAMPED and self._convert_ramps: # pragma: no cover # noqa
722
+ # Read ramp as step
723
+ use = True
724
+ warnings.warn(
725
+ f'Unsupported epoch type: {epoch_types[t]}:'
726
+ ' converting to step')
718
727
  elif t != EPOCH_DISABLED: # pragma: no cover
719
728
  use = False
720
729
  warnings.warn(
@@ -980,8 +989,7 @@ class AbfFile(myokit.formats.SweepSource):
980
989
  user lists.
981
990
 
982
991
  The resulting analog signal has the same size as the recorded
983
- signals, so not always the full length of the protocol!
984
-
992
+ signals, so not always the full length of the protocol.
985
993
  """
986
994
  dinfo, einfo_exists, einfo = self._epoch_functions
987
995
 
@@ -1104,8 +1112,9 @@ class AbfFile(myokit.formats.SweepSource):
1104
1112
  else:
1105
1113
  int_id = int(output_id) # Propagate TypeError
1106
1114
  if int_id < 0 or int_id >= self._n_dac:
1107
- raise IndexError(f'output_id out of range: {output_id}')
1108
-
1115
+ raise IndexError(
1116
+ f'output_id out of range: {output_id} ({self._n_dac}'
1117
+ ' channel(s) available)')
1109
1118
  return int_id
1110
1119
 
1111
1120
  def da(self, output_id, join_sweeps=False):
@@ -1199,10 +1208,35 @@ class AbfFile(myokit.formats.SweepSource):
1199
1208
  e_level = round(df * level, n_digits)
1200
1209
  e_start = round(tf * start, n_digits)
1201
1210
  e_length = round(tf * duration, n_digits)
1202
- p.schedule(e_level, e_start, e_length)
1211
+ if e_length > 0:
1212
+ p.schedule(e_level, e_start, e_length)
1213
+ else: # pragma: no cover
1214
+ warnings.warn(f'Skipping {e_length}{tu} protocol step'
1215
+ f' at t={start}{tu}.')
1216
+ start += duration
1217
+
1218
+ elif e['type'] == EPOCH_RAMPED: # pragma: no cover
1219
+ assert self._convert_ramps
1220
+ dur = e['init_duration'] / self._rate
1221
+ inc = e['duration_inc'] / self._rate
1222
+ duration = dur + i_sweep * inc
1223
+ # The "init_level" field in a ramp indicates the _final_
1224
+ # value. The initial values seems to be the value from the
1225
+ # previous step.
1226
+ level = e['init_level'] + e['level_inc'] * i_sweep
1203
1227
 
1228
+ e_level = round(df * level, n_digits)
1229
+ e_start = round(tf * start, n_digits)
1230
+ e_length = round(tf * duration, n_digits)
1231
+ if e_length > 0:
1232
+ p.schedule(e_level, e_start, e_length)
1233
+ else:
1234
+ warnings.warn(f'Skipping {e_length}{tu} protocol step'
1235
+ f' at t={start}{tu}.')
1204
1236
  start += duration
1205
- # Note: Only other type can be EPOCH_DISABLED at this point
1237
+
1238
+ else:
1239
+ assert e['type'] == EPOCH_DISABLED
1206
1240
 
1207
1241
  # End of sweep: event at holding potential
1208
1242
  e_start = round(tf * start, n_digits)
@@ -7,28 +7,28 @@
7
7
  from ._api import ( # noqa
8
8
  AnnotatableElement,
9
9
  CellMLError,
10
+ Component,
10
11
  clean_identifier,
11
12
  create_unit_name,
12
- Component,
13
+ is_identifier,
13
14
  Model,
14
15
  Units,
15
16
  UnitsError,
16
17
  UnsupportedBaseUnitsError,
17
18
  UnsupportedUnitOffsetError,
18
19
  Variable,
19
- is_valid_identifier,
20
20
  )
21
21
 
22
22
  from ._parser import ( # noqa
23
- parse_file,
24
- parse_string,
25
23
  CellMLParser,
26
24
  CellMLParsingError,
25
+ parse_file,
26
+ parse_string,
27
27
  )
28
28
 
29
29
  from ._writer import ( # noqa
30
+ CellMLWriter,
30
31
  write_file,
31
32
  write_string,
32
- CellMLWriter,
33
33
  )
34
34