Automate-Everything-Universe / hemophilia-tracker

Hemophilia Tracking Tool
https:\\hem-tracker.com
0 stars 0 forks source link

Check values of the decay curves #30

Closed Dragosjosan closed 2 months ago

Dragosjosan commented 2 months ago

The decay curve values are not plausible: Peak Factor Level After Infusion (%): 62 Time Elapsed Until Factor Level Measurement (hours): 24 Factor Level at Time of Measurement (%): 6

--> Result is 3.72% --> Result should be: 6%

Screen Shot 2024-06-10 at 15 19 50
Dragosjosan commented 2 months ago

The formulat was wrong.

Correct formula:

def calculate_decay_constant(initial_level: float, measured_level: float, time_elapsed: float) -> float:
    return (np.log(measured_level) - np.log(initial_level)) / time_elapsed

Dragosjosan commented 2 months ago

Corrected plot:

issue_30_solved