Very simple: a function which samples pulses and shows a percentage or something like that. It may work like this:
Capture all the pulses occurring in a given time frame and store them only once each. If the number of unique pulses reaches a given maximum, assume no data or very bad alignment.
See how many different pulses we got. In a hypothetical perfectly aligned tape, we wouldn't get more than 2 or 3 pulselengths in total. The more pulselengths, the worse the alignment. So at this point, we may show a percentage or some description such as "Good", "Bad", and so on.
Very simple: a function which samples pulses and shows a percentage or something like that. It may work like this: