Skip to content

Commit

Permalink
Merge pull request #688 from desihub/ADM-mtl-bup-read
Browse files Browse the repository at this point in the history
Don't pass the Data Release when constructing MTL filenames
  • Loading branch information
geordie666 committed Mar 20, 2021
2 parents 594191d + 3e7459c commit f88bd97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions doc/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ desitarget Change Log
0.53.1 (unreleased)
-------------------

* Don't pass the DR when constructing MTL filenames [`PR #688`_].
* Don't insist that ``ZTILEID`` has to be in the ``zcat`` [`PR #687`_].
* Install the SV2-related data files [`PR #686`_].

.. _`PR #686`: https://github.com/desihub/desitarget/pull/686
.. _`PR #687`: https://github.com/desihub/desitarget/pull/687
.. _`PR #688`: https://github.com/desihub/desitarget/pull/688

0.53.0 (2021-03-18)
-------------------
Expand Down
3 changes: 1 addition & 2 deletions py/desitarget/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -2663,14 +2663,13 @@ def find_mtl_file_format_from_header(hpdirname, returnoc=False):
- Should work for both .ecsv and .fits files.
"""
# ADM grab information from the target directory.
dr = read_keyword_from_mtl_header(hpdirname, "DR")
surv = read_keyword_from_mtl_header(hpdirname, "SURVEY")
oc = read_keyword_from_mtl_header(hpdirname, "OBSCON")
from desitarget.mtl import get_mtl_ledger_format
ender = get_mtl_ledger_format()

# ADM construct the full directory path.
hugefn = find_target_files(hpdirname, flavor="mtl", hp="{}", dr=dr,
hugefn = find_target_files(hpdirname, flavor="mtl", hp="{}",
survey=surv, ender=ender, obscon=oc)
# ADM return the filename.
fileform = os.path.join(hpdirname, os.path.basename(hugefn))
Expand Down

0 comments on commit f88bd97

Please sign in to comment.