diff --git a/doc/changes.rst b/doc/changes.rst index c5d996c8..4470beda 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -2,10 +2,12 @@ desisim change log ================== -0.37.1 (unreleased) +0.37.1 (2023-01-13) ------------------- -* No changes yet. +* Added sort to io.find_basis_template() + +.. _`#576`: https://github.com/desihub/desisim/pull/576 0.37.0 (2023-01-12) ------------------- diff --git a/py/desisim/io.py b/py/desisim/io.py index afb31c5b..0069dc25 100644 --- a/py/desisim/io.py +++ b/py/desisim/io.py @@ -881,6 +881,7 @@ def find_basis_template(objtype, indir=None): objfile_wild = os.path.join(indir, objtype.lower()+'_templates_*.fits') objfiles = glob(objfile_wild) + objfiles.sort(key=os.path.getmtime) if len(objfiles) > 0: return objfiles[-1] else: