graded index or gradient index which is an optical element having a varying refractive index more specifically a grin lens is a lens whose material refractive index varies continuously as a function of the spatial coordinates in the material similarly a graded index fiber is an optical fiber having a core refractive index that decreases radially outward toward the cladding there are two basic types of grin lenses radial or axial or rgrin and agrin respectively the present embodiment preferably employs an rgrin lens having a flat frontal surface capable of focusing light just as a normal lens with curved surfaces does thus the rgrin lens is effectively used as a high quality image relay there are a variety of suitable commercially available grin lenses that will suffice including endogrin lenses u2122 from gradient lens corporation or selfoc u2122 lens from nsg inc in either case the lens 14 is optically coupled directly to the piston actuator rod 12 also it is not necessary that the entire piston actuator rod 12 be optically transmissive the same goal can be accomplished with an optical fiber or glass polymeric rod embedded axially in the piston actuator rod 12 or an optical fiber may itself serve as the pump piston rod 12 optical polymers may be any from among the class of acrylates polyimides polycarbonates and olefins e g cyclobutene it should also be understood that the use of a piston and cylinder incorporating optical detection in accordance with the invention can be used.