-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor QSO_templates #67
Conversation
Also, this has a dependency on PR#18 |
tests are failing due to desiutil 1.3 setuptools.compat bug fixed with desiutil 1.3.2 . desisim/master already has that from another PR a few minutes ago; I will merge master into qso_templates, push that back here, and we'll go from there. Yeowch:
We don't want to have an IDLSPEC2D dependency, even if that is just for a test. Could you copy that into $DESI_BASIS_TEMPLATES (e.g. at NERSC /project/projectdirs/desi/spectro/templates/basis_templates/v1.1) and then wrap the test to skip if $DESI_BASIS_TEMPLATES isn't defined? |
I've just commented that code out. It was really for |
Travis is complaining that the coverage went down significantly, but this is an artifact of us skipping most tests due to not having lightweight templates available in the travis environment. The actual coverage is pretty good:
it seems to have no coverage of py/desisim/qso_template itself, but if I understand correctly that is mainly for generating the DESI coefficients using BOSS data rather than generating the DESI templates on the fly. |
Connected template.QSO to desisim.qso_templates.desi_qso_templ.desi_qso_templates() |
Tests weren't passing since code was looking for QSOs basis templates in desispec/data/ instead of $DESI_BASIS_TEMPLATES like all the other classes. I updated the code to treat the QSOs like the other basis templates but the random number seed test is still failing, i.e.
--> an array of Falses intead of Trues. Punting this back to @profxj to fix the random number seed stuff. |
Running on my laptop: python test_templates.py Gives Ran 5 tests in 30.311s OK (expected failures=1) |
Tests work again with both v1.1 and v2.0 basis templates. Merging. Thanks for the refactor to generate QSO templates on the fly. |
@profxj Could you take a quick look and see if desisim/bin/simulate-templates also needs to be updated, given your changes? |
Refactored QSO templates a bit
Added ability to generate a new set of tempaltes 'on-the-fly'
Pushed previous documentation into desisim, and updated
No unit tests (yet)
Failing travis, but can't be due to this code (I think)
There may be hooks to xastropy, but not in the code
intended for others.
Requires a new data file, to be provided on NERSC