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

Allow probing of point state by tag. #2417

Merged

Conversation

thorstenhater
Copy link
Contributor

@thorstenhater thorstenhater commented Sep 30, 2024

This concludes the introduction of 'labels' for synapse identification / placements started back in
PR #1504 by @noraabiakar. Labels are now used when probing a synapse's state.

@thorstenhater thorstenhater requested a review from jlubo October 1, 2024 16:36
@thorstenhater thorstenhater marked this pull request as ready for review October 1, 2024 16:36
Copy link
Contributor

@boeschf boeschf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks.

Comment on lines +923 to +938
for (auto lr = lr_beg; lr != lr_end; ++lr) {
const auto& [lid_beg, lid_end] = lr->second;
for (auto lid = lid_beg; lid != lid_end; ++lid) {
auto cg = lid + cg_lo;
if (cg >= cg_hi) continue;
const auto& handle = R.handles.at(cg);
if (handle.mech_id != mech_id) return;
auto mech_index = handle.mech_index;
R.result.push_back(fvm_probe_scalar{{data + mech_index},
point_info_of(target,
lid,
mech_index,
synapses.at(mech),
R.M.mechanisms.at(mech).multiplicity)});
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just for my understanding - can there ever be more than one probe resolved and pushed to result?

Copy link
Contributor Author

@thorstenhater thorstenhater Oct 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formally, yes, as synapse_ranges is a multimap of ranges. This could happen
if two synapses are given the same label. We could forbid that, but currently don't.

d = A.decor()
d.place('(...)', A.synapse('expsyn'), 'syn-1')
d.place('(...)', A.synapse('exp2syn'), 'syn-1')

Come to think of this particular example, we probably should forbid this...

Note: I'd suggest we make a new PR for blocking this, since changing the API is an orthogonal concern. I'll spin off an issue, if that's ok.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, sounds good

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that's impossible, as the probe contains the mechanism type (the id in the resolution step):

if (handle.mech_id != mech_id) return; 

So, multiple synapses of the same type can appear in the same probe, here.

@thorstenhater thorstenhater merged commit f302088 into arbor-sim:master Oct 18, 2024
29 of 30 checks passed
@thorstenhater thorstenhater deleted the feat/probe-point-by-label branch October 18, 2024 13:49
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

Successfully merging this pull request may close these issues.

2 participants