updated loglike_sn_spectral_fittingA.py to loop over all SN and galaxy templates