update the if-query so that it spans all possible contact with cells cases.#411
update the if-query so that it spans all possible contact with cells cases.#411elmbeech wants to merge 2 commits intoMathCancer:developmentfrom
Conversation
There was a problem hiding this comment.
great catch! Seems like the right fix. I found two other bugs to fix:
- At the end of
get_cell_contact_signals
std::string search_for = "contact with " + cell_definitions_by_type[0]->name;
static int scaling_start_index = find_signal_index( search_for );
for( int i=0; i < n+2 ; i++ )
{ output[i] /= signal_scales[scaling_start_index+i]; }we should loop until i < n+5
- In this block in
get_selected_signals
for( int i=0; i < indices.size() ; i++ )
{
int ind = indices[i];
if( ind >= contact_start_index && ind < contact_start_index+n+2)
{ signals[i] = contact_signals[ind-contact_start_index]; }
else
{ signals[i] = get_single_signal( pCell , ind ); }
}the check should instead be ind < contact_start_index+n+5 (the 5 is the difference). @vincent-noel It looks like PhysiBoSS uses get_selected_signals. Ultimately, that falls back to get_single_signal which would spam a warning message if this bug was affecting your users. So no extra concern here for this function.
|
@drbergman , i wonder, would it maybe not be better to make constant: and then just use this constant everywhere. |
|
sure! Makes sense as all these changes are within one file. |
|
@drbergman finally, i came back to this. |
the possible cases: