diff --git a/src/gemdat/sites.py b/src/gemdat/sites.py index 8f37ea94..d7a164b0 100644 --- a/src/gemdat/sites.py +++ b/src/gemdat/sites.py @@ -382,7 +382,9 @@ def _calculate_site_occupancy( label = labels[k] counts[label].append(v) - div = len(labels) * n_steps - site_occupancies = {k: sum(v) / div for k, v in counts.items()} + site_occupancies = { + k: sum(v) / (n_steps * labels.count(k)) + for k, v in counts.items() + } return site_occupancies