Refactored logical->physical tube index lookup.

Before it was an algorithm, now it is an Array lookup. This should be minimally
faster and also resolved a mapping bug.