Skip to content

Commit

Permalink
Raises an exception if all carriers are discarded
Browse files Browse the repository at this point in the history
  • Loading branch information
chemicalfiend committed May 30, 2024
1 parent af1cfaa commit a580fe5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions morphct/kmc_analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ def get_times_msds(carrier_data):
time_stderr.append(np.std(actual_times[lt]) / len(actual_times[lt]))
msds.append(np.average(disps))
msd_stderr.append(np.std(disps) / len(disps))

if len(times) == 0:
raise Exception(f"All carrier data has been discarded. Re-check the input.")

return times, msds, time_stderr, msd_stderr


Expand Down

0 comments on commit a580fe5

Please sign in to comment.