[SciPy-User] sequence verification

Michael T Tate mttate at usgs.gov
Tue Apr 12 14:35:13 EDT 2011


I am working a QC method that checks to make sure a sequence is complete. 

The sequence is 12 - 0s followed by 3 - 1s, 4 - 2s, 3 - 3s and finally 3 - 
1s. The sequence looks something like this:

[ 0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  1.  1.  1.  2.  2.  2. 
2.  3.  3.  3.  1.  1. 0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  1. 
1.  1.  2.  2.  2. 2.  3.  3.  3.  1.  1.]

Generally, this sequence is followed except if the instrument is stopped 
for service or there is a power failure. 

I need the program to check if there are 12 zeros preceding the sequence 
beginning with 3 - 1s. Then need to check to make sure there are 3 - 3s 
followed by 4 - 2s, 3 - 3s and 2 - 1s. If this series breaks down, I want 
to delete the incomplete series. 

Any guidance on how to do this would be greatly appreciated. 

Thanks in advance,

Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20110412/36a59d48/attachment.html>


More information about the SciPy-User mailing list