-
Notifications
You must be signed in to change notification settings - Fork 0
Adding thumbnail generating function #19
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
Conversation
# we use calculate_rheobase() to find the threshold_current. | ||
# For this case, we set the holding_current to 0.0 nA. | ||
# if threshold_current is None: | ||
threshold_current = 1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you overwriting this value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The threshold current calculation should be done every time as the morphology of the me-combination will change and it won't be emodel threshold to be sure we are not using the emodel threshold. The value was overwritten just to initialise of the cell.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be called after we compute the threshold, and we just get it from MEModelCalibration. So we can remove the threshold computation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I will not overwrite the threshold and holding currents. I will pass the emodel_properties instead.
template_format=template_format, | ||
emodel_properties=emodel_properties, | ||
) | ||
holding_current = 0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here also, you are overwriting holding current and computing rheobase even if we have passed those values to the function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same but for holding current.
section="soma[0]", | ||
segx=0.5 | ||
) | ||
print(f"Threshold current: {newthreshold_current}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use logger.info instead of print
) | ||
|
||
# Create cell | ||
thumbnail_cell = Cell( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need to re-create the cell
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't recreate the cell, the thumbnail generation step protocol would persist even after the thumbnail was generated. I also delete the cell at the end.
emodel_properties=emodel_properties, | ||
) | ||
|
||
# Add 130% threshold current injection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment is not consistent with code
sim.add_cell(thumbnail_cell) | ||
|
||
neuron_globals = NeuronGlobals.get_instance() | ||
# neuron_globals.temperature = celsius |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are those commented out?
|
||
|
||
def generate_cell_thumbnail( | ||
template_path: str, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you reduce the number of function arguments by passing template_params instead?
See https://github.com/openbraininstitute/BlueCelluLab/blob/main/bluecellulab/cell/template.py#L48
Closing in favour of #27 |
No description provided.