Direct observation of charge-carrier capture in an array of self-assembled InAs/GaAs quantum dots