Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

behavioural difference btw. missing condition block and condition block with a missing entry #337

Closed
anilbey opened this issue Dec 14, 2023 · 4 comments

Comments

@anilbey
Copy link

anilbey commented Dec 14, 2023

Hi, with @edasubert we noticed the following.

  1. When there is no conditions block in the simulation_config libsonata returns 0.0 and 0.0 for celsius and v_init.
<libsonata._libsonata.Conditions object at 0x7ff5d8590c70>
(Pdb) sim_no_cond.impl.conditions.__dir__()
['__init__', '__doc__', '__module__', 'celsius', 'v_init', 'spike_location', 'extracellular_calcium', 'randomize_gaba_rise_time', 'mechanisms', 'list_modification_names', 'modification', 'SpikeLocation', '__new__', '__repr__', '__hash__', '__str__', '__getattribute__', '__setattr__', '__delattr__', '__lt__', '__le__', '__eq__', '__ne__', '__gt__', '__ge__', '__reduce_ex__', '__reduce__', '__subclasshook__', '__init_subclass__', '__format__', '__sizeof__', '__dir__', '__class__']
(Pdb) sim_no_cond.impl.conditions.celsius
0.0
(Pdb) sim_no_cond.impl.conditions.v_init
0.0
  1. When there is a conditions block but no v_init and no celsius in it then it returns -80.0 and 34.0 correspondingly.
(Pdb) condition_object
<libsonata._libsonata.Conditions object at 0x7ff5d85960f0>
(Pdb) dir(condition_object)
['SpikeLocation', '__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'celsius', 'extracellular_calcium', 'list_modification_names', 'mechanisms', 'modification', 'randomize_gaba_rise_time', 'spike_location', 'v_init']
(Pdb) condition_object.v_init
-80.0
(Pdb) condition_object.celsius
34.0
@mgeplf
Copy link
Contributor

mgeplf commented Dec 14, 2023

Could you provide the .json files for reproduction? Thanks.

@anilbey
Copy link
Author

anilbey commented Dec 14, 2023

Sure, here they are:

simulation_config.json -> conditions block with missing entries
simulation_config_no_condition_block -> missing conditions block

simulation_config.json
simulation_config_no_condition_block.json

mgeplf added a commit that referenced this issue Dec 14, 2023
@mgeplf
Copy link
Contributor

mgeplf commented Dec 14, 2023

Cool, I can repro here:
#338

I'll have a look at how to fix it.

@mgeplf
Copy link
Contributor

mgeplf commented Jan 3, 2024

Fixed in #338; thanks for the report!

@mgeplf mgeplf closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants