-
Notifications
You must be signed in to change notification settings - Fork 8
Loggers
PhyDyn is equipped with two type of loggers, TrajectoryLogger and STreeRootLogger.
The TrajectoryLogger records the population sizes of deme and non-demes along the population trajectories generated during an MCMC run. The number of points recorded per trajectory depends on the value of the pointFrequency parameter, and the number of points used to approximate the trajectory the PopModelODE solver. For example, the logger defined by:
<logger id = "popModelLogger" fileName="model.traj" logEvery="100">
<log id="trajectoryLogger" spec="TrajectoryLogger" popModel="@sirmodel" pointFrequency="1"></log>
</logger>
will log every point in the trajectory - since the point frequency is one - into file model.traj. A pointFrequency of 10, for example, would log points 0,9,19,29,..., plus the last-point. The logger produces a tab-separated table where each row corresponds to a time-point, which can be plotted by running the plot_trajectory.R script.
The STreeRootLogger logs the state probabilities at the root of the trees sampled during an MCMC run. It is defined as follows:
<logger id="probtreelog" fileName="rootStateProbabilities.log" logEvery="1" mode="tree">
<log id="logTrees" spec="STreeRootLogger" tree="@tree" density="@stlikelihood"/>
</logger>