Recent Releases of myokit

myokit - Myokit 1.38.0

This update makes a small but potentially significant change to the way the next keyword is treated when parsing protocols.

  • Added
    • #1136 Added limited support for ABF reading in modes other than "episodic acquisition".
  • Changed
    • #1135 Updated documentation of "prediction" in PatchMasterFile.
    • #1139 Protocol start times set using the next keyword are now rounded to 9 digits precision. This helps avoid unexpected results in very long protocols, where floating point errors can accumulate. Start times set explicitly are not rounded.
  • Fixed
    • #1135 Fixed bug in PatchMasterFile where data types other than int 16 were not detected.
    • #1137 Fixed error in colormap attribution.
    • #1138 Fixed bug in FiberTissueSimulation and Simulation1d that was causing compilation errors.

- Python
Published by MichaelClerx 7 months ago

myokit - Myokit 1.37.4

  • Added
    • #1118 @kwabenantim Added a minimal pyproject.toml specifying the build system.
    • #1120 Added "close" and "close all" menu items in the data log viewer.
    • #1122 The Patchmaster file reader now documents the lack of "prediction" setting availability. Added detailed C-fast information to meta data exported to DataLog.
  • Changed
    • #1121 The filter 2 frequency in Patchmaster files is now returned in kHz instead of Hz. Added a method to get the filter 1 frequency. Both frequencies are added to the meta data when creating a DataLog.
  • Fixed
    • #1117 @martinjrobins Fixed a bug in SBML export of non-constant, non-state variables.
    • #1134 Added missing __len__ method to PatchMasterFile.

- Python
Published by MichaelClerx 8 months ago

myokit - Myokit 1.37.3

  • Changed
    • #1116 Unit names passed to Unit.register are now validated using myokit.check_name, and the fourth argument to Unit.register is now called preferred_representation.
    • #1116 The method Unit.register_preferred_representation now checks that the given representation parses to the given unit.
  • Fixed
    • #1116 Fixed issue where units were represented with double multipliers, e.g. [m (0.001) (1e-3)], causing unparseable code to be written.

- Python
Published by MichaelClerx about 1 year ago

myokit - Myokit 1.37.2

  • Added
    • #1098 @martinjrobins Added SBML export.
  • Changed
    • #1102 Replaced the HEKA method c_fast_tau with a method c_fast_detailed.
  • Removed
    • #1111 No longer testing on Python 3.7.
  • Fixed
    • #1100 Added missing PatchMaster classes to the API and docs.
    • #1109 Fixed issue with meta data in Patchmaster class for files with alternative amplifier state storage.

- Python
Published by MichaelClerx about 1 year ago

myokit - Myokit 1.37.1

  • Added
    • #1073 @kwabenantim Added export to DiffSL.
    • #1088 The DataLogViewer now displays meta data for myokit DataLogs.
    • #1088 The HEKA file format now supports more meta data, including filters.
    • #1092 The method DataLog.load_csv can now read CSV files with duplicate column names.
    • #1095 Myokit is now tested on Python 3.12 and 3.13.
  • Fixed
    • #1083 Fixed bug when passing initial state Expression objects to myokit.step.
    • #1088 The HEKA file format meta data now shows the correct value for fast capacitance correction.
    • #1088 The ABF reader no longer crashes if degrees Celsius are encountered.
    • #1093 DataLog.load_csv will now ignore an initial byte order marker.

- Python
Published by MichaelClerx over 1 year ago

myokit - Myokit 1.37.0

  • Added
    • #1075 Add a myokit.TypeError exception, which inherits from myokit.IntegrityError but is used specifically if one type of expression was expected but another was found.
  • Changed
    • #1075 Expressions will now raise a myokit.TypeError in the constructor if their operands are unexpected expression types, e.g. if numbers and booleans are mixed.
    • #1074 Expressions will now raise a myokit.IntegrityError in the constructor if their operands are not expression objects: previously, this check was only performed by Expression.validate().
    • #1067 Improved the meta data loaded from HEKA files when creating a myokit.DataLog.
  • Removed
    • #1075 Removed the PrefixCondition base class previously used in the expression system, as only Not inherited from it.
  • Fixed
    • #1071 When DataLog.split_periodic does not make a split, a length 1 list is returned instead of a DataLog.
    • #1075 Added missing Expression base classes to public API.
    • #1077 Fixed bug where data log viewer crashed when reading an empty WCP file.
    • #1078 Added support for Numpy 2.

- Python
Published by MichaelClerx over 1 year ago

myokit - Myokit 1.36.1

  • Added
    • #1063 Added support for Sundials 7.0.0.
  • Removed
    • #1061 Currently unable to test OpenCL features on Mac OS.
  • Fixed
    • #1060 @mjowen Fixed an issue with overflows in tau for HH analytical simulations leading to unnecessary NaNs in state and current simulation outputs.

- Python
Published by MichaelClerx almost 2 years ago

myokit - Myokit 1.36.0

This release fixes a potential issue in simulation output, please see #1055 for details.

  • Added
    • #1051 Added a method Simulation.crash_inputs that returns the inputs (binding values) if the last run raised a SimulationError.
    • #1055 Added an abstract class CBasedExpressionWriter to use as base class for expression writers for C-like languages.
  • Changed
    • #1051 Model.evaluate_derivatives will now use numpy.errstate(all='raise') when ignore_errors is set to False, causing more numerical issues to be reported.
    • #1055 Expression.pyfunc now sorts its arguments in alphabetical order.
  • Deprecated
    • #1051 Simulation.eval_derivatives is deprecated in favour of an evaluate_derivatives method that uses default_state instead of state when no state is given, and has better support and clearer rules for handling bindings.
    • #1051 Simulation.last_state is deprecated in favour of crash_state.
  • Fixed
    • #1045 Fixed an issue where the cache used in MarkovModel was not invalidated if set_constant() changed simulation parameters.
    • #1050 Fixed warnings about unknown escape sequences.
    • #1051 Numerical simulation errors in Simulation now re-evaluate the state using the last inputs, as well as the last state.
    • #1051 The Simulation class now provides error states and inputs for both cvode-detected crashes and too many zero-length step crashes.
    • #1055 ExpressionWriter classes now always output a PrefixPlus, including brackets where necessary.
    • #1055 The AnsiCExpressionWriter and related expression writers now wrap all conditions in brackets.
    • #1055 The PythonExpressionWriter, NumPyExpressionWriter, StanExpressionWriter, and LatexExpressionWriter now output brackets around double Power operations, so that the Myokit expression a**b**c is interpreted as (a**b)**c.
    • #1055 Fixed bracket adding for PrefixPlus, PrefixMinus, and Not in LatexExpressionWriter.
    • #1055 Fixed bracket adding for PrefixPlus and PrefixMinus in Presentation MathML.

- Python
Published by MichaelClerx almost 2 years ago

myokit - Myokit 1.35.4

  • Added
    • #1010 Added more information methods to formats.heka.Segment
    • #1012 The method Model.add_variable now has keyword arguments unit, rhs, label, binding, and initial_value to allow one-line variable creation and initialisation.
    • #1018 The PatchMaster file reading can now extract information for multiple amplifiers (if used), and more information methods were added.
  • Fixed
    • #1020 Fixed an issue where the explorer time fields had a white background in dark mode.
    • #1021 Fixed a buggy deprecation warning in lib.plots.cumulative_current.

- Python
Published by MichaelClerx over 2 years ago

myokit - Myokit 1.35.3

  • Added
    • #1006 The DataLog class can now store global meta data in .meta and per-column meta data in .cmeta. Both must be string-string key-value pairs.
    • #1006 Simulations now automatically add some meta data (units) to the data log.
    • #1006 The DataLog class can now save meta data to disk using the CSV-on-the-web format.
    • #1006 Added a class ColumnMetaData to represent per-column meta data of a table or DataLog.
    • #1006 ABF, WCP, and PatchMaster file classes now add meta data when creating a DataLog.
  • Changed
    • #1006 Made core classes ObjectWithMetaData, MetaDataContainer, VarOwner, and VarProvider part of the public API. Similarly the method check_name.
    • #1008 The PatchMasterFile reader no longer performs "zero offset subtraction" (in which a recorded current trace is shifted until a user-specified segment has zero current) by default.
  • Fixed
    • #1006 DataLog.clone() no longer replaces array.array objects with lists.

- Python
Published by MichaelClerx over 2 years ago

myokit - Myokit 1.35.2

  • Fixed
    • #1005 DataBlock viewer now shows user-set values when exporting a colormap.

- Python
Published by MichaelClerx over 2 years ago

myokit - Myokit 1.35.1

  • Added
    • #955 Added provisional HEKA PatchMaster file reading.
    • #985, #998 The AbfFile and WcpFile now implement a shared SweepSource interface.
    • #985 Added a method AtfFile.path that returns the full path.
    • #985 Added a method WcpFile.info that returns a string version of the file's meta data, and a method WcpFile.sample_count that returns the number of samples per channel.
    • #1003 The DataBlock viewer now has fields to enter a lower and upper range for the colormap conversion.
    • #1003 Added new color maps for myokit.DataBlock viewing.
  • Changed
    • #985, #998 The interface to the AbfFile class has changed significantly, and in a backwards incompatible ways. Please see the documentation for further details.
    • #991 Myokit no longer uses the logging module but makes calls to warnings.warn instead.
    • #992 If a Simulation is created with protocol={}, then pace will not be set as a binding label. To stay backwards compatible it will be set if protocol=None.
    • #994 Simulations can now start at arbitrary times, including negative ones. Note that protocol events have a default offset of 0, so no events are usually expected at negative times.
  • Deprecated
    • #985 The method WcpFile.myokit_log is deprecated in favor of WcpFile.log.
    • #985 The methods WcpFile.channels and WcpFile.records are deprecated in favor of WcpFile.channel_count and WcpFile.record_count.
    • #985 The method WcpFile.plot is deprecated in favor of WcpFile.matplotlib_figure.
    • #985 The method WcpFile.records is deprecated in favor of WcpFile.record_count or WcpFile.sweep_count.
    • #985 The method AtfFile.myokit_log is deprecated in favor of AtfFile.log.
    • #998 The method WcpFile.info is deprecated in favor of WcpFile.meta_str.
    • #998 The method AtfFile.info is deprecated in favor of AtfFile.meta_str.
  • Fixed
    • #985 AbfFile.filename now returns the filename, not the full path.
    • #985 AtfFile.filename now returns the filename, not the full path.
    • #992 Simulation now sets any variable bound to a pacing label to 0 if no protocol for that label is set.
    • #998 Fixed a bug where channels in ABF v1 files were sometimes scaled using the wrong meta data.
    • #1003 Fixed a bug in the DataBlockViewer introduced when adding Qt6 support.

- Python
Published by MichaelClerx over 2 years ago

myokit - Myokit 1.35.0

Starting from this release, Myokit is Python 3.7+ only.

  • Added
    • #979 Added support for PyQt6 and PySide6.
  • Changed
    • #980 Python 2 is no longer supported. The minimum supported Python version is now 3.7.
  • Removed
    • #979 Removed support for PyQt4 and PySide, which were deprecated since 2019.

- Python
Published by MichaelClerx over 2 years ago

myokit - Myokit 1.34.0

  • Added
    • #898 @martinjrobins Initial conditions for state variables can now be (constant-valued) expressions. Previously, only literals were allowed.
    • #918 Added Model.initial_values, which returns the model's initial values as a list of expressions, floats, or equations.
    • #918 Added Model.set_initial_values, which sets the model's initial values using a list of expressions or anything accepted by map_to_state.
    • #918 Added Variable.initial_value, which returns a state variable's initial value as an expression or float.
    • #918 Added Variable.set_initial_value, which sets a state variable's initial value using an expression, string expression, or float.
    • #918 Added IllegalReferenceInInitialValueError for illegal references made in initial value expressions.
    • #947 @martinjrobins The Simulation class can now handle multiple protocols during a single simulation.
    • #947 Fixed-form protocols are now implemented in a TimeSeriesProtocol.
  • Changed
    • #898 Variable.promote can now take an expression, a number, or a string (which will be parsed as an expression) for the argument initial_value.
    • #909 Myokit is now tested on Python 3.11.
    • #909 Myokit is no longer tested on Python 3.6.
    • #918 The only argument to Variable.promote has been renamed from state_value to initial_value.
    • #918 Model.import_component now preserves the ordering of the imported states.
    • #953 The DataLogViewer now overlaps traces with numbering (e.g. 0.membrane.V and 1.membrane.V), and toggles between files and variables with Page up and down Or Ctrl+Page up and down.
    • #962 Scipy is no longer a required dependency.
    • #962 The DataLogViewer only supports Matlab file loading if SciPy is installed.
    • #975 Global parameters in imported SBML documents are now placed in a component named global instead of myokit.
    • #978 The IDE now validates either the model or the protocol, depending on the current tab (previously both were validated).
  • Deprecated
    • #918 Model.state is deprecated in favor of Model.initial_values.
    • #918 Model.set_state is deprecated in favor of Model.set_initial_values.
    • #918 Model.inits is deprecated.
    • #918 Variable.state_value is deprecated in favor of Variable.initial_value.
    • #918 Variable.set_state_value is deprecated in favor of Variable.set_initial_value.
    • #918 Model.save_state and Model.load_state are deprecated.
    • #918 The Variable.promote keyword argument state_value is deprecated in favor of initial_value.
    • #947 Simulation.set_fixed_form_protocol is deprecated in favor of using Simulation.set_protocol with a TimeSeriesProtocol
    • #962 The method DataLog.regularize is deprecated.
    • #974 Variable.indice is deprecated in favor of Variable.index.
    • #976 SimulationOpenCL.neighbours is deprecated in favor of SimulationOpenCL.neighbors.
  • Removed
    • #898 NonLiteralValueError is now no longer raised by Myokit and so has been removed.
    • #921 Removed deprecated LegacySimulation class.
    • #921 Removed deprecated PSimulation class.
    • #921 Removed deprecated ICSimulation class.
    • #957 Removed the method Model.prepare_bindings.
    • #961 Removed the module myokit.lib.common, which had been deprecated since April 2018.
  • Fixed
    • #918 Fixed error when var() was called on a PartialDerivative with a Derivative as first argument.
    • #933 Made myokit.step base its error classification (large/small/none) on numerics, not representation.
    • #947 Fixed minor memory leak (reference counting issue) when using fixed form protocols.
    • #967 Myokit no longer calls logging.basicConfig() when used as a library.
    • #977 myokit.save() now raises a ValueError if model, protocol, and script are all None.
    • #978 Clarified message shown in IDE after re-validation of valid model or protocol.

- Python
Published by MichaelClerx almost 3 years ago

myokit - Myokit 1.33.9

  • Fixed
    • #912 Reporting of numerical errors in Simulation now catches more exception types arising from evaluate_derivatives.
    • #908 Added new homebrew location used on M1 apple devices, potentially solving #861.

- Python
Published by MichaelClerx over 3 years ago

myokit - Myokit 1.33.8

  • Added
    • #895 Added method Expression.depends_on_state().
    • #901 Added options compatibility.no_capture and compatibility.no_fd_capture to myokit.ini to allow users to tweak compiler output capturing.
  • Changed
    • #893 Variable.convert_unit now returns True if a conversion was carried out or False if not.
  • Fixed
    • #888 #892 Improved documentation for Unit.conversion_factor with help from @martinjrobins.
    • #895 Fixed the value returned by Name.diff() and Expression.diff() for the situation where the associated RHS depends on a bound variable.
    • #895 Fixed performance issue in Expression.depends_on.
    • #897 Small improvements to Model, Component, and Variable documentation.
    • #903 Fixed a bug in SimulationOpenCL that caused a CL_INVALID_ARG_SIZE error on strict systems.

- Python
Published by MichaelClerx over 3 years ago

myokit - Myokit 1.33.7

  • Fixed
    • #883 Fixed memory leak in myokit.Simulation when using the log_times argument.

- Python
Published by MichaelClerx over 3 years ago

myokit - Myokit 1.33.6

  • Added
    • #872 The myokit.Simulation class can now be initialised using a precompiled backend (see the documentation for the path argument).
  • Changed
    • #872 Model.solvable_order now returns consistently ordered equations, regardless of the order components and variables were created/parsed in.
    • #872 myokit.tools.rmtree now takes an optional argument silent that can be set to True to ignore any exceptions.
    • #876 Model.import_component can now take a list of possibly interdependent components.

- Python
Published by MichaelClerx over 3 years ago

myokit - Myokit 1.33.5

  • Fixed
    • #873 Small bugfixes and improvements in numerical error reporting in FiberTissueSimulation.
    • #873 Fixed argument list in docstring of FiberTissueSimulation.

- Python
Published by MichaelClerx almost 4 years ago

myokit - Myokit 1.33.4

  • Added
    • #869 Added methods myokit.FiberTissueSimulation.fiber_shape and .tissue_shape (but see #764 for an important open issue).
    • #869 Added a method myokit.FiberTissueSimulation.step_size().
  • Changed
    • #865 Added more platform information to myokit system.
    • #866 Slightly tweaked the plotting in myokit.lib.plots.cumulative_current, and added two arguments line_args and fill_args that can be used to customize the plotting style.
    • #869 The class myokit.FiberTissueSimulation now raises ValueError for various method-argument errors, instead of the more generic Exception.
    • #869 The class myokit.FiberTissueSimulation now raises IndexError for various index-related errors, instead of the less appropriate KeyError.
  • Deprecated
    • #869 The class myokit.FiberTissueSimulation is no longer considered deprecated.
  • Fixed
    • #867 @DavAug Fixed a memory leak in myokit.Simulation.
    • #869 Added a missing y argument to FiberTissueSimulation.fiber_state() and FiberTissueSimulation.tissue_state().
    • #869 Fixed out-of-range checking in FiberTissueSimulation state and set_state methods.

- Python
Published by MichaelClerx almost 4 years ago

myokit - Myokit 1.33.3

  • Changed
    • #860 Made myokit.tests into a module. Made tests runnable via setup.py. Added more meta data to setup.py.

- Python
Published by MichaelClerx almost 4 years ago

myokit - Myokit 1.33.2

  • Changed
    • #843 Myokit is no longer tested on Python 3.5.
    • #844 Tweaked the CellML export's initial_value attribute to strip e+00 if present.
    • #845 Improved syntax highlighting and automatic detection of "dark mode" themes.
    • #849 Trying to pickle a myokit.Expression now raises a more helpful error message.
    • #849 The method myokit.parse_expression() now accepts a Model as a context.
    • #849 Model comparison with == now only returns True if both operands are the same object. Comparison based on code can be performed with Model.is_similar().
    • #852 Myokit is no longer tested on Python 3.6 for Windows (please use 3.7 and up).
  • Fixed
    • #841 The MathMLExpressionWriter now uses type="e-notation" where necessary, instead of writing e.g. 1e-6.
    • #849 If Model.get() and Component.get() now raise a ValueError if a component or variable from a different model is passed in.
    • #849 Equation objects are now immutable, and their hash is consistent during the object's lifetime.
    • #849 The hash of a Quantity object is now consistent during its lifetime, regardless of unit representations.
    • #857 Fixed a memory leak in Simulation.run().
    • #858 OpenCL.info no longer raises CL_PLATFORM_NOT_FOUND_KHR if drivers but no devices are found.

- Python
Published by MichaelClerx almost 4 years ago

myokit - Myokit 1.33.1

  • Added
    • #799 Added pL, MOhm, and GOhm as standard units.
    • #811 DatalogViewer now accepts .zip for binary data logs.
    • #817 Added support for Python 3.10.
    • #821 Sundials-based simulations now auto-detect the version number. The version indicated in myokit.ini is no longer used.
    • #823 Sundials 6.0.0 is now supported.
    • #826 Added a method myokit.tools.Benchmarker.print that prints elapsed time alongside a profiling message.
  • Changed
    • Examples will be located in a separate repository, at https://github.com/MichaelClerx/myokit-examples
    • #815 Myokit will now warn when run on Python 2.7, as testing for 2.7 is being phased out.
    • #816 The method myokit.tools.Benchmarker.format can now be called without any arguments.
    • #817 The internal templating engine now uses ast instead of the deprecated (and removed in 3.10) parser module.
    • #825 The context manager myokit.tools.capture now takes an extra argument enabled which can be used to disabled output capturing.
    • #825, #826 The debugging arguments to myokit run have been split into five parts, see myokit run --help for details.
    • #834 The find/replace dialog in the IDE has been replaced with a toolbar.
    • #836 Colours in the IDE have been adapted to be clearer in "dark mode".
  • Removed
    • #796 The Graph Data Extractor tool is now a separate project, hosted at https://github.com/MichaelClerx/gde.
    • #804 The command line utility system no longer reports on the cma module.
    • #821 Removed the method myokit.Sundials.version_int.
  • Fixed
    • #805 Added missing command line utilities to the documentation, and re-organised the command-line tool docs.
    • #831 @DavAug Fixed bug in SBML parser that caused it to ignore terms in differential equations for products of reactions.

- Python
Published by MichaelClerx about 4 years ago

myokit - Myokit 1.33.0

With contributions from @Rebecca-Rumney and @DavAug !

Major changes include - An overhaul of the Simulation class, which can now use the CVODES solver to calculate sensitivities of dependent variables to parameters and initial conditions. To facilitate this, expressions can now do very simple derivatives. - Improvements to the OpenCL simulation class, including better OS/X support and a method to set heterogeneous conductances using a matrix of conductance values. - Several auxiliary methods have moved from the main myokit module into myokit.tools and myokit.float (both of which are imported automatically).

A detailed overview is given below: - Added - #581 Myokit's expression system now includes a PartialDerivative and an InitialValue class. Both are for use in sensitivity calculations and may not appear in models. - #581 Expressions now have a method diff(lhs) that returns the (partial) derivative of an expression with respect to the given LhsExpression. - #581 Expressions now have methods is_derivative, is_name, and is_number. - #581 Added a method Number.value(). - #581 The method Expression.depends_on now has an argument deep that can be set to True to perform a recursive dependency check. - #595 A class myokit.CModel was added that can generate multi-purpose C code for use in simulations. This is mainly for internal use. - #682 OpenCL code now recognises error code -1001. - #683 Now testing OpenCL code in CI. - #704 Added first example notebook to the github repository. - #728 Added a context manager myokit.tools.capture that can redirect and capture output from Python stdout and stderr via a Python-only method or file-descriptor redirection and should be thread-safe. - #735 The new module myokit.float contains several functions related to floating point numbers that were previously in the main myokit namespace or not part of the public API. - #735 The new module myokit.tools contains several stand-alone tools that are used by Myokit and were previously in the main myokit namespace or not part of the public API. - #735 The method pid_hash, which is used by compiled code to generate (hopefully) unique ids is now part of the public API. - #744 Added a method myokit.OpenCL.available to check if OpenCL is supported and at least one OpenCL device is detected. - #754 Added a method myokit.OpenCL.current_info(x) that returns information about the currently selected platform and device; support of OpenCL extensions can then be checked with OpenCLPlatformInfo.has_extension. - #754 Improved error message when an OpenCLSimulation with double precision is run on a device that does not support it. - #763 Added a method OpenCLSimulation.set_conductance_field to apply heterogeneous conductance on a rectangular grid. - #769 @Rebecca-Rumney Added a method myokit.Model.import_component to import a component from one model to another. - #769 @Rebecca-Rumney Added an exception type VariableMappingError to be raised when there is an error in a variable mapping. - #776 Added a method OpenCLSimulation.monodomain_conductance to replace the deprecated method calculate_conductance. - #780 Alt-up and alt-down can now be used in the text editor to move selected lines up or down. - #782 The IDE can now import CellML files on opening, e.g. by typing myokit ide example.cellml. - #786 Added a method myokit.Variable.clamp() to fix any variable to a constant value. - #786 Added a method myokit.Variable.remove_child_variables() to remove all child (nested) variables from a given variable. - #788 The IDE will now suggest filenames for model exports. - #792 @DavAug SBML import now handles equations that explicitly use time. - Changed - #581 Powers are now rendered without spaces in mmt code, e.g. x^2 instead of x ^ 2. - #595 The Simulation class now uses CVODES instead of CVODE as backend, which may require changes to your installation. - #595 The Simulation can now calculate sensitivities of variables with respect to parameters and/or initial conditions (see docs for details). - #595 The Simulation class no longer has apd_var as a constructor argument. Instead, you can pass an argument apd_variable to its run() method. - #595 The Simulation class no longer suppresses CVODES warnings but passes them on to the warnings module. - #595 Fix to Simulation for Sundials 4.1.0. - #687 Variable.set_rhs(None) now removes an RHS, instead of setting it to Number(0). - #687 Calling SimulationOpenCL.set_conductance will now override any conductances previously set with set_connections. - #687 SimulationOpenCL.set_connections no longer accepts None as a valid argument. - #687 The SimulationOpenCL methods set_conductance, conductance, set_connections, neighbours, set_paced_cells, set_paced_cell_list, and is_paced, will now raise a RuntimeError if diffusion was disabled at construction. - #687 The method SimulationOpenCL.remove_field now raises a KeyError if no field is set for the given variable. - #689 In Python 2, an ImportError is now raised if myokit.ini contains the sequence " ;" in any of its value (as this cannot be processed by Python 2's ConfigParser). - #728 The LegacySimulation class no longer suppresses CVODE warnings but passes them on to the warnings module (backported from new Simulation class). - #789 The method myokit.DataLog.save_csv() now stores the keys using natural sort order (time is still the first field, if present). - Deprecated - #595 The classes myokit.PSimulation and myokit.ICSimulation have been deprecated in favour of the new Simulation class. - #735 The class myokit.Benchmarker is deprecated in favour of myokit.tools.Benchmarker. - #735 The method myokit.format_float_dict is deprecated and will be removed in future versions. - #735 The method myokit.format_path is deprecated in favour of myokit.tools.format_path. - #735 The method myokit.strfloat is deprecated in favour of myokit.float.str. - #758 The class myokit.FiberTissueSimulation is deprecated and will be removed in future versions. - #776 The method OpenCLSimulation.calculate_conductance is deprecated in favour of the new method calculate_conductance, which takes slightly different parameters. - #787 The method myokit.Model.eval_state_derivatives is deprecated in favour of myokit.Model.evaluate_derivatives. - Removed - #683 No longer testing on Python 2.7.6 on linux (still testing latest 2.7). No longer testing any Python 2.7 on Windows. - #728 The classes myokit.PyCapture and myokit.SubCapture have been replaced by a single context manager myokit.tools.capture. - #730 Removed the method myokit.pack_snapshot. - #737 The method Model.merge_interdependent_components was removed. This method was deprecated since 2018-05-30. - #737 The method Model.show_line was removed. This method was deprecated since 2018-05-30. - #737 The method Protocol.guess_duration was removed. This method was deprecated since 2016-02-06. - Fixed - #684 @DavAug Fixed OpenCL loading issue on MacOS (with special thanks to Martin Aguilar). - #686 Fixed a (windows only) bug in myokit.tools.format_path(). - #687 Simulation1d now logs pacing as a global variable, and can log diffusion currents. - #689 Path lists read from myokit.ini are now filtered for empty entries and closing semicolons. - #744 Fixed a bug in OpenCLSimulation.find_nan(), that occurred for very small simulations (e.g. 2 cells). - #744 Fixed a bug in OpenCLSimulation that made it impossible to use set_connections() with double precision. - #744 Fixed a bug in OpenCLSimulation that made it impossible to use set_connections() on Python 2. - #754 Improved error message when an OpenCLSimulation with double precision is run on a device that does not support it. - #766 Improved error message when an empty MathML <cn> element is encountered.

- Python
Published by MichaelClerx over 4 years ago

myokit - Myokit 1.32.0

  • Added
    • #672 Added more detailed error output to several CVODE errors related to RHS-related numerical issues.
    • #672 Now tested on Sundials 5 (locally).
    • #672 Now testing on Python 3.9 (Linux).
    • #672 Simulation.run documentation is now more clear on what happens for very short simulation durations (or zero).
    • #674 Added a method Model.has_parse_info that checks if the model contains information from parsing (i.e. line numbers).
    • #674 Added a parameter raw to Model.show_line_of that returns the line number as an integer
    • #674 Added a method to the IDE that lets you jump to the definition of a selected variable.
    • #680 Now testing on Python 3.9 and Miniconda 3.8 (Windows).
  • Removed
  • Fixed
    • #672 Fixed bug in Variable.convert_unit() that caused unexpected (and quite arbitrary) results.
    • #672 Fixed bug where calling Simulation.run() with a very short runtime caused a zero state to be returned.
    • #676 Fixed a bug in CellML (1 and 2) export when inferring units for a state variable.
    • #679 Fixed "DLL load failed while importing myokit" issue on Windows 10 with Python 3.8 (via miniconda).

- Python
Published by MichaelClerx about 5 years ago

myokit - Myokit 1.31.1

  • Added
    • #623 The changes made with each release are now stored in CHANGELOG.md.
    • #622 SimulationOpenCL now includes a method is_paced and neighbours that provide information about the simulated cells.
    • #622 SimulationOpenCL.find_nan now has an option to return a DataLog with the final logged variables before the error occurred.
    • #632 Added methods DataBlock1d.to_log and DataBlock2d.to_log.
    • #633 DataBlockViewer now shows mouse coordinates in status bar for video and graph view.
    • #652 Added methods to remove 1d and 2d traces from DataBlock1d and DataBlock2d.
  • Changed
    • #610 If numerical errors occur when evaluating an expression, the IDE now shows these in the console instead of in a pop-up.
    • #622 myokit.strfloat now takes a precision argument.
    • #622 Model.format_state and Model.format_state_derivatives now take a precision argument.
    • #622 If errors occur, the SimulationOpenCL now displays improved (and hopefully more informative) output.
    • #623 Updated licensing info.
    • #653 Model.pyfunc() now validates the model before running (and fails if the model does not validate).
    • #661 When importing MathML, the inverse hyperbolic trig functions are now rendered using slightly simpler equations.
    • #664 EasyML export now adds meta data, a group of CVODE-solved variables, a group of variables to trace, and a group of parameters (based on code contributed by Ed Vigmond).
    • #664 EasyML export now converts voltage, current, and time variables to the preferred units.
    • #664 EasyML export now has consistently ordered output when re-run.
    • #664 EasyML expression writer now uses expm1 where possible.
  • Deprecated
    • #622 SimulationOpenCL.is2d() was deprecated in favour of SimulationOpenCL.is_2d().
    • #632 DataBlock1d.from_DataLog and DataBlock2d.from_DataLog have both been deprecated, in favour of new from_log methods.
  • Fixed
    • #650 Fix to myokit.lib.plots.cumulative_current for normalisation in areas with zero current.
    • #603 Improved handling of types (ints resulting from logical operators) in OpenCLSimulation.
    • #613 Model.map_component_io now respects the omit_constants argument for Rush-Larsen variables.
    • #622 If Model.format_state_derivatives needs to evaluate the derivatives, it will now use the given state instead of the model state.
    • #628 The DataBlockViewer now shows a working colour bar for 1d simulations.
    • #638 The DataBlockViewer now handles blocks with t[0] > 0 correctly.
    • #655 Fixed bug where wrong initial state was shown by myokit.step().
    • #663 Fixed deprecation warning in save_state_bin().

- Python
Published by MichaelClerx over 5 years ago

myokit - Myokit 1.31.0

  • Added
    • #548 Models, protocols, and CVODE simulations can now be pickled, and tests have been added that check that simulations can be run in parallel (even on Windows).
    • #548 Model and protocol now support comparison with ==.
    • #553 The cumulative-current plot now has a maximum-number-of-currents option (all further currents will be bundled into one).
    • #567 Added support for Simulation building on Python 3.8 on Windows.
    • #574, #599, #547, #528 @DavAug A completely rewritten SBML API and parser that's capable of handling models that define species and reactions.
  • Changed
    • #536 Ohm is now a quantifiable unit in the mmt syntax, i.e. 1 [MOhm]. This replaces the non-standard R unit which has been removed.
    • #556 CellML imports now import models that contain unsupported units (but with warnings).
    • #557 Imports and exports now raise warnings instead of using the Myokit textlogger for this.
    • #559, #541 Unit tests are now included in the PyPI package.
    • #560 Sympy is no longer a required dependency (but still an optional one).
    • #565 Some slight changes to simulation building: Now uses --inplace instead of --old-and-unmanageable and should delete any temporary files created in the process.
    • #566 Simulations now include a time and process number dependent hash in their generated-module names.
    • #569 The CellML export now ensures there are no spaces in initial value or unit multiplier attributes.
    • #576 Non-integer exponents are now allowed in the unit system, which compares units with a close() method that expects a certain numerical tolerance, instead of using exact comparison.
    • #576 CellML imports now import models with non-integer unit exponents.
    • #597 The output of the step() method has been improved, and the method now only warns about relative differences bigger than 1 epsilon.
    • commit The method show_evalution_of now has consistently ordered output.
    • CellML imports treat new base units as dimensionless.
    • The IDE now checks the protocol even if the model is invalid or unchanged.
  • Removed
    • #563, #564 The myokit.mxml module has been removed.
  • Fixed
    • #539 Bugfix for simulations that ended at a time numerically indistinguishable from an event time.
    • #570 Bugfixes and fewer warnings for various matplotlib versions.
    • #572 Bugfix to lib.common.StrenghtDuration.
    • #585 A recently introduced bug in the HHSimulation's steady_state() method was fixed.

- Python
Published by MichaelClerx over 5 years ago

myokit - Myokit 1.30.6

  • Fixed bug where GUI CellML export didn't export stimulus current.

- Python
Published by MichaelClerx almost 6 years ago

myokit - Myokit 1.30.5

  • Added support for CellML 2.0.
  • Rewrote SBML import to use etree instead of dom (thanks @DavAug!).
  • Removed parse_mathml_dom function.
  • Removed mxml dom_child and dom_next methods.
  • Now setting OpenCL framework as linker flag on osx.

- Python
Published by MichaelClerx almost 6 years ago

myokit - Myokit 1.30.4

  • Fixed a bug with running simulations in Spyder on Windows.
  • Added clone() and repr() methods to myokit.Equation.
  • Some fixes and tweaks to CellML 1.0/1.1 API.

- Python
Published by MichaelClerx almost 6 years ago

myokit - Myokit 1.30.3

  • Small fixes to CellML validation.
  • Fixed typo in units becquerel.
  • Added notanumber and infinity to MathML parser.

- Python
Published by MichaelClerx about 6 years ago

myokit - Myokit 1.30.2

  • Removed 'myo' script.
  • Fixed EasyML issue for inf/tau variables used by more than one state.

- Python
Published by MichaelClerx about 6 years ago

myokit - Myokit 1.30.1

  • Added more import/export options to the IDE menu.
  • Updated component.code() to always outout aliases in the same order.
  • Added method to find Markov models in a Myokit model.
  • Added method to convert Markov models to compact form.
  • Added method to convert Markov models to full ODE form.
  • LinearModel now converts to full ODE form.
  • Added method lib.guess.membrane_capacitance.
  • Added method lib.guess.membrane_currents.
  • Added (experimental) EasyML export.
  • Small bugfixes and documentation updates.
  • Improved exception handling when evaluating a unit containing an invalid power.
  • Made default script and protocol robust against incompatible units.
  • Made CellML API frommyokitmodel more robust against invalid units.

- Python
Published by MichaelClerx about 6 years ago

myokit - Myokit 1.30.0

  • Rewrote CellML import and export, with improved error handling and validation.
  • CellML import now converts hardcoded stimulus equation to myokit.Protocol.
  • CellML export now converts myokit.Protocol to hardcoded stimulus equation.
  • CellML import now generates more approprate default scripts.
  • CellML import now supports unit conversion between components.
  • CellML export now infers units from RHS if no unit set.
  • CellML import and export can now both handle Web Lab "oxmeta" annotations.
  • Various changes and improvements to MathML parsing.
  • Added missing __iter__ to Model and VarOwner.
  • The myokit.Name expression can now wrap objects other than myokit.Variable, allowing Myokit's expression system to be re-used for non-myokit expressions.
  • Removed myokit.UnsupportedFunction.

- Python
Published by MichaelClerx about 6 years ago

myokit - Myokit 1.29.1

  • Added guessing module, with method to guess which variables (if any) represent the membrane potential and stimulus current.
  • Fix for sundials development versions.
  • Fixes for PySide2 support.

- Python
Published by MichaelClerx over 6 years ago

myokit - Myokit 1.29.0

  • Myokit is now released under a BSD 3-clause license
  • Bugfix to myokit step command line tool.

- Python
Published by MichaelClerx over 6 years ago

myokit - Myokit 1.28.9

  • Added PySide2 support.
  • Deprecated PyQt4 and PySide.
  • Added a method Model.remove_derivative_references().
  • Bugfix to repr(Model) for models with no name.
  • Added Model.timex(), .labelx() and .binding(), which work like .time(), .label() and .binding() but raise an exception if no appropriate variable is found.
  • Deprecated lib.multi.time(), .label(), and .binding().

- Python
Published by MichaelClerx over 6 years ago

myokit - Myokit 1.28.8

  • Added method Variable.convert_unit() that changes a variable's units and updates the model equations accordingly.
  • Unit.conversion_factor() now returns a Quantity instead of a float, and accepts helper Quantities for incompatible conversions.
  • Added Unit.clarify() method that gives clear representation.
  • Added Unit.multiplier_log_10() method.
  • Added rtruediv and pow operators to Quantity class.
  • Small bugfixes to myokit.lib.hh.
  • Stopped requiring myokit.lib.hh alphas/betas and taus/infs to depend on V (allows drug-binding work).
  • Bugfix: Time variable in CellML export no longer has equation or initial value.
  • CellML export: components now ordered alphabetically.
  • Variables with e.g. an oxmeta: time annotation are now exported to CellML with an oxmeta RDF annotation.
  • CellML import now allows deca prefix.
  • Added CellML identifier checks to CellML import.
  • Renamed DataLog.find() to find_after().
  • Added DataLog.interpolate_at(name, time) method.
  • Improved colormap used in plots.cumulative_current().
  • Bugfix to myokit step for models without a name meta property.
  • Updated sign error handling in myokit.step().
  • Added IDE shortcuts for unit checking.
  • IDE now jumps to unit errors, if found.
  • Improved exception display in IDE.
  • Variable.var_info() now includes unit.
  • Fixed bug in Unit.__repr__() for small multipliers.
  • Improved notation of units when complaining about them.

- Python
Published by MichaelClerx over 6 years ago

myokit - Myokit 1.28.7

  • Added option to register external formats.
  • Added option to avoid certain prefixes when generating unique variable names.
  • Model.expressions_for() now accepts more than 1 argument, and handles dependencies on derivatives correctly.
  • Removed deprecated method Model.solvable_subset().

- Python
Published by MichaelClerx over 6 years ago

myokit - Myokit 1.28.6

  • Added a debug option to the myokit compiler command.

- Python
Published by MichaelClerx over 6 years ago

myokit - Myokit 1.28.5

  • Bugfix: Removing variables now also removes their bindings and labels.
  • Added unit tests.
  • Improved performance in lib.markov analytical simulations.
  • Updated the myo script to use the python3 executable
  • Fixed a bug in the default script used when creating or importing a model.
  • Made GNOME/KDE icons install using sys.executable instead of a hardcoded python command.
  • Fixed handling of string encoding in CellML import.

- Python
Published by MichaelClerx over 6 years ago

myokit - Myokit 1.28.4

  • Myokit is now tested on Python 3.7, but no longer on 3.4
  • Updated default OpenCL paths for windows
  • GUI fixes for matplotlib 3.1.0+
  • Added set_constant() method to markov simulations.
  • Added log_times option to lib.markov.AnalyticalSimulation, and started pre-allocating arrays.
  • Added option to cumulative current plot to normalise currents.

- Python
Published by MichaelClerx almost 7 years ago

myokit - Myokit 1.28.3

  • Fixed some floating point issues with protocols and pacing.
  • Updated OpenCL code to work with VS 9.
  • Some small changes to the Protocol API.
  • Added format protocol option to IDE.

- Python
Published by MichaelClerx almost 7 years ago

myokit - Myokit 1.28.2

  • Improved support for native OpenCL on OS/X.
  • Native maths in OpenCL simulations is now configurable and disabled by default.

- Python
Published by MichaelClerx about 7 years ago

myokit - Myokit 1.28.1

  • Added support for Sundials 4.0.0
  • Made SymPy a dependency.
  • Made current loggable in discrete markov simulations.
  • Added log_times argument to analytical HH simulation.
  • Improved performance of analytical HH simulation.
  • Added AbfFile.extract_channel method that joins sweeps.
  • Added ATF capability to datalog viewer.
  • Added limited .pro support to DataLogViewer.
  • Added ProgressReporter that cancels the operation after a time out.
  • Added cut/copy/paste options to menu in IDE.
  • Bugfix: myokit.system didn't check for sympy version.
  • Deprecated myo script.
  • Changed myokit.VERSION to myokit.version.
  • Various minor tweaks and fixes.

- Python
Published by MichaelClerx about 7 years ago

myokit - Myokit 1.28.0

  • Added myokit.lib.hh module for recognising Hodgkin-Huxley style ion current models and using them in fast analytical simulations.
  • Added Rush-Larsen (RL) option to OpenCLSimulation.
  • Added CUDA kernel export with RL updates.
  • Added OpenCL kernel export with RL updates.
  • Improved logging of intermediary variables in OpenCL simulations.
  • Improved logging in Simulation1d.
  • Fix to Abf reader for (unsupported) userlists (abf v2).
  • Fixes to Sundials configuration on Windows
  • Small bugfixes, documentation updates, etc..

- Python
Published by MichaelClerx over 7 years ago

myokit - Myokit 1.27.4

  • Added sundials version detection on first run.
  • Moved myokit config files from ~/.myokit to ~/.config/myokit
  • Renamed NumpyExpressionwriter NumPyExpressionWriter.
  • Fixed test issues on os/x.

- Python
Published by MichaelClerx over 7 years ago

myokit - Myokit 1.27.3

Changes:

  • Updated the way sundials library locations are stored on windows systems.

- Python
Published by MichaelClerx over 7 years ago

myokit - Myokit 1.27.7

  • Various fixes to make Myokit work with Python 2.7.6 (and later).

- Python
Published by MichaelClerx over 7 years ago

myokit - Myokit 1.27.6

  • Now running sundials auto-detection with every 'import myokit' if not set in config file.

- Python
Published by MichaelClerx over 7 years ago

myokit - Myokit 1.27.5

  • Bugfix to OpenCL.load_selection().
  • Added system info command
  • Added command option to show C Compiler support.
  • Added command option to show Sundials support.
  • Bugfix to Unit.rdiv
  • Small fixes to lib.fit
  • Documentation config update for sphinx >=1.8.
  • Parsing now has full test cover.
  • Removed special line feed code from parser, as in unicode they are treated as newlines (and stripped out by splitlines())
  • Removed obsolete TEXT_OPS code from parser.
  • Removed redundant check from parser.
  • Removed another redundant check from parser.
  • Various small bugfixes and tweaks.

- Python
Published by MichaelClerx over 7 years ago

myokit - Myokit 1.27.2

Changes:

  • Added script that creates icons for windows.
  • Updated script that creates icons for linux (gnome/kde).

- Python
Published by MichaelClerx over 7 years ago

myokit - Myokit 1.27.1

This fixes a documentation / pypi issue with Myokit 1.27.0

This release introduces Python 3, Sundials 3, and Visual Studio support, and marks the transition of Myokit development from a private repository to a public GitHub repo.

The major changes are:

  • Added support for Python 3.4, 3.5, and 3.6.
  • Added support for Sundials 3 (by @teosbpl).
  • Added support for various Visual C++ compilers.
  • Made Myokit pip-installable, stopped providing windows installer.
  • Replaced windows sundials binaries with Visual-Studio compiled ones.
  • Added a system-wide myokit command (after pip install on unix systems).
  • Moved development from private repo to GitHub
  • Set up automated testing with Travis (linux) and Appveyor (windows)
  • Greatly increased unit-test coverage (and set up checking with codecov.io)
  • Added contribution guidelines
  • Added style checking with flake8.
  • Removed OrderedPiecewise, Polynomial, Spline, and lib.approx.
  • Deprecated lib.fit. Please have a look at Pints instead.
  • Removed quadfit() methods from lib.fit.
  • Deprecated lib.common
  • Removed HTML page generating classes from mxml.
  • Simplified some of the error classes.
  • Simplified Benchmarker.
  • DataLog.apd() now has same output as Simulation threshold crossing finder.
  • On-the-fly compilation switched from distutils to setuptools.
  • Tidied up.
  • Lots of bugfixes.
  • Made IDE show Python version in about screen.

- Python
Published by MichaelClerx over 7 years ago

myokit - Myokit 1.27.0

This release introduces Python 3, Sundials 3, and Visual Studio support, and marks the transition of Myokit development from a private repository to a public GitHub repo.

The major changes are:

  • Added support for Python 3.4, 3.5, and 3.6.
  • Added support for Sundials 3 (by @teosbpl).
  • Added support for various Visual C++ compilers.
  • Made Myokit pip-installable, stopped providing windows installer.
  • Replaced windows sundials binaries with Visual-Studio compiled ones.
  • Added a system-wide myokit command (after pip install on unix systems).
  • Moved development from private repo to GitHub
  • Set up automated testing with Travis (linux) and Appveyor (windows)
  • Greatly increased unit-test coverage (and set up checking with codecov.io)
  • Added contribution guidelines
  • Added style checking with flake8.
  • Removed OrderedPiecewise, Polynomial, Spline, and lib.approx.
  • Deprecated lib.fit. Please have a look at Pints instead.
  • Removed quadfit() methods from lib.fit.
  • Deprecated lib.common
  • Removed HTML page generating classes from mxml.
  • Simplified some of the error classes.
  • Simplified Benchmarker.
  • DataLog.apd() now has same output as Simulation threshold crossing finder.
  • On-the-fly compilation switched from distutils to setuptools.
  • Tidied up.
  • Lots of bugfixes.
  • Made IDE show Python version in about screen.

- Python
Published by MichaelClerx over 7 years ago