I suspect this thread has languished since you don't explain why the results are puzzling and opening and running the script on the data without some reference point is not great.
Did you get errors?
What is expected?
What did you get?
Is the implementation correct?
Perhaps a start on those questions would be useful.