Pulsar period folding and alias checks (source code)

= Pulsar period folding and alias checks
{title2=$\phi=\operatorname{frac}[(t-t_0)/P_{\rm trial}]$}

<Phase folding of a light curve> collects samples at equal trial <phase>. Consider a noiseless illustrative <pulsar> with one pulse every $P=1.4\,\mathrm{s}$ and arrival times $t_n=nP$, after <pulsar dedispersion>. At $P_{\rm trial}=P$, all arrivals fold to one <phase>. But $P/2$ also puts all arrivals at one <phase>: folding discarded the fact that alternate proposed cycles contain no pulse. At $2P$, the arrivals instead occupy two <phases>, $0$ and $1/2$. Thus a sharp folded profile alone need not identify the fundamental <period>.

Check the original time sequence, adjacent arrival intervals and pulse occupancy as well as the folded profile. With $N$ arrivals and a slightly wrong trial <period>, the unwrapped drift is
$$
\delta\phi_{N-1}=(N-1)\left(\frac{P}{P_{\rm trial}}-1\right).
$$
For $N=100$ and $P_{\rm trial}=1.401\,\mathrm{s}$, this is about $-0.07066$ cycle. Splitting the observation into early and late pieces reveals the drift that one full folded average can blur. Separately, regular discrete sampling can create <aliasing>: observing at a spacing comparable with the pulse width can miss narrow pulses even when the recurrence <period> is much longer. Neither this toy exercise nor one sharp profile replaces time-standard calibration and propagation corrections.