tulerpetontidae / psmc-python

A reimplementation of a classical PSMC method in python for educational purposes
13 stars 2 forks source link

Clarification Needed on Division by 100 in plot_history Function #4

Open s1fa opened 1 month ago

s1fa commented 1 month ago

I'm currently using the plot_history() function from the repository, and I'm confused about why the variables xs and ys are divided by 100 in the following lines:

def plot_history(psmc, data=None, sim_history=None, th=20, n0_sim = 1e4, axs=None, color='dodgerblue', label='Estimated history'):
    xs = psmc.t * 2 * 25 * psmc.N0 / 100
    xs[-1] = 1e10
    ys = psmc.map_lam(psmc.lam) * psmc.N0 / 100
    ys = np.append(ys, ys[-1])
    if data is not None:
        es = psmc.sigma * (data.shape[0] * data.shape[1]) / psmc.C_sigma

I wrote a function to parse and plot the PSMC output, but the result is incorrect without dividing xs and ys by 100. Could you please explain the reason for this division?

Thank you for your help!