support rrdesi --templates (list of templates) #320
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for
rrdesi --templates ...
to accept a list of templates, instead of previously only accepting a single template or a path to a text file with a list of templates. The intended use case is for the DESI QuasarNet afterburner which filters the template files down to just QSO templates and then wants to run redrock with just those. It could also be useful in the future for e.g. DESI-2 running with LAE/LBG templates vs. standard galaxy+QSO+star templates, etc.Alternatively, we could have added a templates-default-qso.txt file to the redrock-templates repo have have the QN afterburner use that. That would also work (and is still compatible with this PR), but it becomes a bit more of a maintenance headache when making tags and also needing to make templates-X.Y-qso.txt, and when updating QSO templates and needing to update multiple templates-*.txt files.
I updated the test to include this new functionality, and also tested with
with output in
confirming that it only used QSO templates (which was also clear from the logs):
Changes still need to be made on the desispec side to use this, but this adds the feature.