Skip to content

Commit

Permalink
Merge pull request #917 from jdebacker/label
Browse files Browse the repository at this point in the history
Small code clean up
  • Loading branch information
jdebacker authored Mar 25, 2024
2 parents fdc00e2 + ae3983c commit a65c0ed
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ogcore/demographics.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
from ogcore.utils import get_legacy_session
from ogcore import parameter_plots as pp

START_YEAR = 2023
END_YEAR = 2023
START_YEAR = 2024
END_YEAR = 2024
UN_COUNTRY_CODE = "840" # UN code for USA
# create output director for figures
CUR_PATH = os.path.split(os.path.abspath(__file__))[0]
Expand Down
2 changes: 1 addition & 1 deletion ogcore/parameter_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def plot_mort_rates(
title = "Survival Rates"
else:
plt.ylabel(r"Mortality Rates $\rho_{s}$")
plt.legend(loc="upper right")
plt.legend(loc="upper left")
title = "Mortality Rates"
vals = ax.get_yticks()
ax.set_yticklabels(["{:,.0%}".format(x) for x in vals])
Expand Down
3 changes: 0 additions & 3 deletions ogcore/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1123,10 +1123,8 @@ def shift_bio_clock(
final_effect_period - initial_effect_period + 1
) # number of periods transition over
transition_path = np.linspace(0, 1.0, t)
print("Transition path = ", transition_path)
transition_arr = np.zeros_like(param_in, dtype=float)
for i in range(t):
print("TRANS = ", transition_path[i] * np.ones_like(param_in[0, ...]))
transition_arr[initial_effect_period + i, ...] = transition_path[
i
] * np.ones_like(param_in[0, ...])
Expand All @@ -1141,7 +1139,6 @@ def shift_bio_clock(
pct_effect = total_effect / total_effect_ru
else:
pct_effect = 0
print("Pct effect = ", pct_effect)
# apply the transition path to the initial parameters
# find diff from shifting bio clock back total_effect years
param_shift[:, min_age_effect_felt:, ...] = param_in[
Expand Down

0 comments on commit a65c0ed

Please sign in to comment.