Added some generalization for obtaining the wavelength from 2MASS data.