Selective thermal terahertz emission from GaAs and AlGaAs