IDL routine for Gagné et al. 2014b, Figure 1
This IDL function shows how Figure 1 was built in Gagné et al. (2014b; see link below). IDL 8 or over is required for this routine to work. We do not provide subroutines "read_spectrum_sep.pro" and "read_template_sep.pro" as those only serve for reading the spectra that are displayed. They restore into memory the lam, sp and esp variables, which are each a 3-pointer array containing the data for the J, H and K bands respectively.
This routine is given with the sole purpose of learning how to use the IDL 8 graphic functions to create plots similar as that of Figure 1 in Gagné et al. 2014. This is why we do not give the subroutines.