  We use scanning photocurrent microscopy (SPCM) to investigate individual
suspended semiconducting carbon nanotube devices where the potential profile is
engineered by means of local gates. In situ tunable p-n junctions can be
generated at any position along the nanotube axis. Combining SPCM with
transport measurements allows a detailed microscopic study of the evolution of
the band profiles as a function of the gates voltage. Here we study the
emergence of a p-n and a n-p junctions out of a n-type transistor channel using
two local gates. In both cases the I-V curves recorded for gate configurations
corresponding to the formation of the p-n or n-p junction in the SPCM
measurements reveal a clear transition from resistive to rectification regimes.
The rectification curves can be fitted well to the Shockley diode model with a
series resistor and reveal a clear ideal diode behavior.
