Corrective Optics Space Telescope Axial Replacement

The Corrective Optics Space Telescope Axial Replacement (COSTAR) is an optical correction instrument designed and built by NASA. It was created to correct the spherical aberration of the Hubble Space Telescopes primary mirror, which incorrectly focused light upon the Faint Object Camera (FOC), Faint Object Spectrograph (FOS), and Goddard High Resolution Spectrograph (GHRS) instruments. 
It was flown via shuttle to the telescope in the servicing mission STS-61, on December 2nd, 1993, and successfully installed over a period of eleven days.
Origin.
Once it had been identified in 1990 that the primary mirror in the recently launched Hubble Space Telescope (HST) was defective due to it having been ground to the wrong shape engineers at NASA came under immense pressure to fix the problem. The incorrect shape of the mirror introduced severe spherical aberration, a flaw in which light reflecting off the edge of a mirror focuses on a different point from the light reflecting off its center. The effect of the flaw on scientific observations depended on the particular observation—the core of the aberrated point spread function was sharp enough to permit high-resolution observations of bright objects, and spectroscopy of point sources was affected only through a sensitivity loss. However, the loss of light to the large, out-of-focus halo severely reduced the usefulness of the telescope for faint objects or high-contrast imaging. This meant nearly all the cosmological programs were essentially impossible, since they required observation of exceptionally faint objects. 
Development.
When launched, the HST carried five scientific instruments: the Wide Field and Planetary Camera (WFPC), Goddard High Resolution Spectrograph (GHRS), High Speed Photometer (HSP), Faint Object Camera (FOC) and the Faint Object Spectrograph (FOS).
Since it was too difficult to bring the HST back to earth for repairs the engineers considered everything from replacing the telescope's secondary mirror by sending a spacewalking astronaut into the telescope's optical tube, to installing a circular shade around the opening of the tube, which would reduce the aperture and improving the focus by blocking out the outer regions of the primary mirror. 
It was eventually determined that with the HST still in orbit that they could replace the WFPC with the improved Wide Field and Planetary Camera 2 which would incorporate corrective optics. This left solutions still to be found for the remaining instruments. One potential option was to insert corrective optics, lenses or mirrors in the telescope tube between the primary mirror and the secondary reflector. However the tube was too narrow for even the smallest astronaut to slither down it, leading to a search for a means of inserting the required corrective components into the tube. 
A crisis meeting of the European Space Agency was held in Germany to discuss the issues with the HST. Among the attendees was James H. Crocker, a senior optical engineer at the Ball Aerospace Corporation. While taking a shower in his German hotel one morning he noticed that the showerhead travelled on a vertical rod and it could be clamped on the rod at different heights and angles. The maid had left the showerhead at the base of the rod and positioned flat against the wall, which meant it was taking up very little space until Crocker loosened the clamp and move it to the position he wanted. The idea came to him that they could mount the required corrective components on such a device that would allow them to be inserted into the tube before being folded out on robotic arms to the required position to intercept the beams of light from the secondary mirror, correct and then focus them on the various scientific instruments.
Once back in America he explained his idea, which was immediately taken up by other engineers who began to develop what by 1990 had become the Corrective Optics Space Telescope Axial Replacement, or COSTAR. The budgeted cost of the COSTAR was US$50,000,000. To fit the COSTAR system onto the telescope, one of the other instruments had to be removed, and astronomers selected the High Speed Photometer to be sacrificed, which was the least important of the four axial detectors.
The final design which is the size of a telephone booth consisted of small correction mirrors radiating out horizontally out from an extendable tower. For the aperture of each instrument there are two mirrors, M1 and M2. M1 which is in the light path acts as a field mirror and is a simple sphere, while the correction of the spherical aberration is done by M2 which is not perfectly shaped and reflects the incident light unevenly. However, the deviations have been calculated so that they are exactly inverse to those of the main mirror. Thus, after being reflected and corrected by the two mirrors, the light is back in the correct form. This arrangement has the advantage that the corrected field is free of coma. A total of ten correction mirrors with diameters ranging in size from approximately 18 to 24 mm were used as the Faint Object Camera and Faint Object Spectrograph each had two apertures for each of their two measuring channels whereas the Goddard High Resolution Spectrograph only had one aperture for both of its channels. The design was complicated by the need to ensure that the beams of light for the above instruments which were mounted at the end of the telescope tube missed the beams for the new WFPC 2 which was mounted on one side of the telescope tube.
In January 1991 Ball Aerospace Corp. was selected by NASA as the prime contractor to undertake the entire development, production and verification of COSTAR, a process which took 26 months. To calculate the required corrections one team calculated the existing error by examining the still in situ tooling that was used to make the primary mirror, while another independent team calculated it using the distorted images that Hubble had transmitted. Both teams came to practically identical measurement results. The correction mirrors that were subsequently produced were then checked for errors by two independent teams. Once complete the entire COSTAR was then tested in the COSTAR Alignment System (CAS). To check for any error in the CAS the COSTAR was then mounted in the specially developed Hubble Opto-Mechanical Simulator (HOMS) which simulated the errors in the faulty primary mirror, to allow an end to end test and thus verification of the output image. The HOMS system was also tested by two independent groups (one from Ball Aerospace and the other from the Goddard Space Flight Center) using different test instruments. The European Space Agency also contributing to the verification process by providing an engineering model of the Faint Object Camera to provide additional verification.
Installation.
COSTAR replaced the High Speed Photometer during the first Hubble Servicing Mission in 1993. The original WFPC was replaced by the WFPC 2 during the same mission.
On 28 December 1993 the robotic arms were instructed by the Space Telescope Science Institute to deploy the mirrors into position. The resulting images confirmed that the COSTAR had corrected the spherical aberration in the primary mirror.
Removal from service.
Later instruments, installed after the HST's initial deployment, were designed with their own corrective optics. COSTAR was removed from HST in 2009 during the fifth servicing mission and replaced by the Cosmic Origins Spectrograph. It is now on display in the Smithsonian's National Air and Space Museum in Washington, DC.