braincell.mix_ions#
- braincell.mix_ions(*ions)[source]#
Create a mixed ion channel by combining multiple ion instances.
This function takes one or more Ion instances and creates a MixIons object, which represents a channel that can handle multiple types of ions simultaneously.
- Parameters:
*ions – One or more instances of the Ion class. Each instance represents a specific type of ion (e.g., sodium, potassium, calcium) that will be part of the mixed ion channel.
- Returns:
An instance of the MixIons class that combines all the provided ion instances into a single mixed ion channel.
- Return type:
- Raises:
AssertionError – If no ions are provided or if any of the provided arguments is not an instance of the Ion class.
Examples: –
--------- –
>>> import braincell –
>>> sodium_ion = braincell.ion.SodiumFixed(...) –
>>> potassium_ion = braincell.ion.PotassiumFixed(...) –
>>> mixed_channel = mix_ions(sodium_ion, potassium_ion) –