Dynamic estimation method for pulsar periods based on photon energy distribution folding and image template matching | Synapse