This artifact is part of the Optical Unit of an Apollo Command Module. It is an unflown specimen that may have been used for engineering tests.
The Optical Unit was one of three principal parts of an inertial guidance and navigation system installed on Apollo spacecraft, which enabled its crew to navigate from Earth orbit to the Moon and back. The full system consisted an Inertial Measurement Unit (IMU), which contained gryoscopes and accelerometers that established the craft's base position and attitude, an optical unit such as this one, which allowed the astronauts to update the IMU's settings based on sightings of stars and planets, and a digital computer, which processed information from the other units and controlled the craft.
This object is not on display at the National Air and Space Museum. It is either on loan or in storage.