desihub / desitarget

DESI Targeting
BSD 3-Clause "New" or "Revised" License
18 stars 23 forks source link

Change the location of the (zdone) tile file for SV #765

Closed geordie666 closed 2 years ago

geordie666 commented 2 years ago

This PR updates the MTL loop to use surveyops/ops/tiles-specstatus.ecsv as the location of the tile file that contains zdone information for SV.

We'd already updated the location of this tile file for the Main Survey, and were searching for a legacy copy of tiles.csv for SV. With this PR, we should no longer need to rely on tiles.csv at all.

jalasker commented 2 years ago

I should have clarified that it doesn't allow the phrase "mtl" to appear anywhere else in the path other than the very end where it is intended to appear by the standard directory template.

sbailey commented 2 years ago

@jalasker good catch, though it appears that this problem pre-dates this particular PR.

Let's update the line 1417 you reference:

opsdir = os.path.dirname(mtltilefn).replace("mtl", "ops")

to only replace the trailing "mtl" and not all cases of "mtl" instead of requiring users to not have "mtl" in their higher level directory path.

geordie666 commented 2 years ago

@jalasker: I made a change to simplify your construction of the directory names. Also, the opsdir = os.path.dirname(mtltilefn).replace("mtl", "ops") construction was used in one other place in the code other than line 1417, so I updated that too.

Can you check that my updated code still works with the alternate MTLs? If so, we can merge this PR and move on.

jalasker commented 2 years ago

This works with the alternate MTLs. Merging pull request.