Function and application of a pin diode?