Skip to content

Commit e34129c

Browse files
committed
fixing systolic, diastolic bug
1 parent ad3c0b0 commit e34129c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

person_story.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,9 @@ def generate_paired_measurement(
246246

247247
# diastolic value is calculated based on systolic value plus the average difference extrated from data
248248
# we add some variation to the difference between systolic and diastolic
249-
diastolic_value = np.round(random_normal(src_stats[main_key][index_gender]['average_systolic_diastolic_difference'],
249+
diastolic_value = np.round(systolic_value - random_normal(src_stats[main_key][index_gender]['average_systolic_diastolic_difference'],
250250
src_stats[main_key][index_gender][
251-
"average_systolic_diastolic_difference"] * 0.1) + systolic_value)
251+
"average_systolic_diastolic_difference"] * 0.1) )
252252

253253
events: list[tuple[str, SqlRow]] = []
254254
for index, event_datetime in enumerate(sorted(event_datetimes)):

sqlsynthgen/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ def random_walk_with_drift(
339339
x = np.empty(N)
340340
x[0] = x0
341341
for t in range(1, N):
342-
x[t] = x[t-1] + drift + rng.normal(0.0, sigma_eps)
342+
x[t] = x[t-1] + drift + rng.normal(0.0, sigma_eps)*100
343343
return x
344344

345345

0 commit comments

Comments
 (0)