Skip to content

Commit

Permalink
add assertion to ensure infer_pop is true if pass custom imm rates
Browse files Browse the repository at this point in the history
  • Loading branch information
jdebacker committed Feb 16, 2024
1 parent 884c3fb commit 8eb4807
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ogcore/demographics.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,9 @@ def get_pop_objs(
assert final_data_year < initial_data_year + T
assert (
T > 2 * T0
) # ensure time path 2x as long as allows rates to fluctuate
) # ensure time path 2x as long as allows rates to fluctuate
if imm_rates is not None:
assert infer_pop is True # if pass immigration rates, need to infer population

# Get fertility rates if not provided
if fert_rates is None:
Expand Down

0 comments on commit 8eb4807

Please sign in to comment.