Open paulmartini opened 1 year ago
find_basis_template() is supposed to return the most recent template file in DESI_BASIS_TEMPLATES, yet returns the last element from a glob return value and this is in arbitrary order
objfile_wild = os.path.join(indir, objtype.lower()+'_templates_*.fits') objfiles = glob(objfile_wild) if len(objfiles) > 0: return objfiles[-1]
Sorting the list produced by glob will fix it:
objfile_wild = os.path.join(indir, objtype.lower()+'_templates_*.fits') objfiles = glob(objfile_wild) objfiles.sort(key=os.path.getmtime)
Will submit a PR shortly with this fix.
find_basis_template() is supposed to return the most recent template file in DESI_BASIS_TEMPLATES, yet returns the last element from a glob return value and this is in arbitrary order
Sorting the list produced by glob will fix it:
Will submit a PR shortly with this fix.