Skip to content

Commit

Permalink
Merge pull request #576 from desihub/findtemplate
Browse files Browse the repository at this point in the history
added sort to find_basis_template() and updated change log
  • Loading branch information
paulmartini committed Jan 13, 2023
2 parents cd02492 + c8857b1 commit ec94577
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doc/changes.rst
Expand Up @@ -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)
-------------------
Expand Down
1 change: 1 addition & 0 deletions py/desisim/io.py
Expand Up @@ -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:
Expand Down

0 comments on commit ec94577

Please sign in to comment.