Note: Much of this information comes from Matt Buffaloe, a University of Washington student who worked with Walt Siegmund and me in the summer of 1996.
Moths are a major problem at astronomical observatories in the southwest U.S. Here at NSO/Sac Peak, we usually refer to these moths as "miller moths" since they are the same moths that are typically found in houses in this area. "Miller moth" is a generic term used for moths typically found in houses. The moths at Sac Peak were identified as the adult form of the black cutworm.
The moths have two behaviors that cause problems for astronomers. The most important of these is what is known as the "dark-seeking" behavior. These moths migrate to high altitudes in the spring. Most of the summer is spent hiding in cracks. Natural hiding places might be in talus slopes, where there are lots of rockpiles. The moths spend most of their time in these cracks, coming out sometimes to feed on the nectar of night-blooming plants. In the fall the moths migrate back to lower altitudes to lay eggs. Unfortunately, in addition to natural cracks the moths also like dark observing rooms, the cracks in telescope mounts, and sometimes even telescope tubes and instruments. The moths that hide in such places often seem not to realize when it is time to migrate or can't figure out how to get out of where they are, and so one often finds piles of dead moths in popular dark places and cracks. The moths that hide in the telescope mounts sometimes are squashed when the telescopes move. This smears moth innards on critical surfaces and can even cause a telescope to lose track of where it's pointing. Cleaning these surfaces can cost valuable telescope observing time.
The second annoying behavior of these moths is their "light-seeking" behavior. When disturbed, the moths will come out and fly around light sources, including the light beams of solar telescopes.
The moths contaminate the surfaces of optical elements with scales from their wings as well as with their droppings. Of course, it's also annoying to have your solar image blocked by the shadow of a moth in the telescope!
Matt Buffaloe investigated several ways of dealing with the moths. Once a moth has chosen a suitable crack, it tends to stay there unless disturbed. One possible way of making the moths leave their cracks involved sounds. Various sounds were tried, but none had an effect unless the sound source was quite close to the crack containing the moths. Similar experiments were made using vibrations transmitted through the material the moths were hiding in. Again, no response was made by the moths. Ultrasonic bug repellers were tried, with no success.
On the other hand, moths were found to be disturbed by short blasts of air. Ultimately a device was built to deliver air blasts to the drive wheels of the Apache Point 3.5 meter telescope, attempting to move the moths away from the motor drive and encoder assemblies. Further analysis is needed to determine the ultimate effectiveness of this system.
For a long time the observers at Sac Peak have used moth traps consisting of a light source mounted over a pan of soapy water. Both UV lights and incandescent lights have been used in these traps. These traps do kill moths, but they probably only work for moths that have either not yet found cracks to hide in or have left their cracks for some other reason, perhaps to feed. Electric "bug zappers" have also been used with similar results. Since the moths only rarely come out of their cracks, the traps don't make much of a dent in the moth population.
It is known that the moths are disturbed by thunderstorms. During the storm (especially during hailstorms) the moths will come out of their cracks. Once the moths are out of their cracks they can be attracted by traps. The effectiveness of the traps was found to be much higher just after thunderstorms than at other times. Exactly what it is about thunderstorms that causes the moths to be disturbed is unknown.