-
Notifications
You must be signed in to change notification settings - Fork 5
hmmhandler.run() freezes if there are dig ins with empty trials #51
Description
If the end user makes one of several possible mistakes so that there are no trials in a dig_in that gets slated for hmm analysis, then handler.run() will just freeze when delegating the jobs.
This has happened when the user either erroneously records from unused digital input channels and does not exclude them, or if they modify either dat.dig_in_mapping or dat.dig_in_trials so that they do not match
the handler gets the trials from dat.dig_in_trials in the following line:
blechpy/blechpy/analysis/poissonHMM.py
Line 1432 in ec16066
| trials = dat.dig_in_trials |
And later calculates n_trials by getting the length of rows from dat.dig_in_trials matching a taste from either params{tastes} or dat.dig_in_mapping (default).
This issue should be fixed by a) some upstream check verifying that there are necessary matches in dat.dig_in_trials and dat.dig_in_mapping and b) throwing an exception downstream if there are 0 trials in the dig_in, before it gets to joblib parallel.