desihub / desisurvey

Code for desi survey planning and implementation
BSD 3-Clause "New" or "Revised" License
2 stars 7 forks source link

unit tests and surveyinit failing with new tile file #110

Closed sbailey closed 4 years ago

sbailey commented 4 years ago

desimodel/data/footprint/desi-tiles.fits has been updated, including moving the GRAY tiles to layer 0, which apparently breaks desisurvey unit tests:

======================================================================
FAIL: test_overlap (desisurvey.test.test_tiles.TestTiles)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/global/common/software/desi/cori/desiconda/20190804-1.3.0-spec/code/desisurvey/master/py/desisurvey/test/test_tiles.py", line 44, in test_overlap
    self.assertFalse(np.any(tile_over[DARK1]))
AssertionError: True is not false

I think this is also breaking surveyinit in the minitest notebook (and thus blocking our standard reference run for a software release):

surveyinit --config-file /global/cscratch1/sd/sjbailey/minitest-20.3/survey/desisurvey-config.yaml
...
INFO:surveyinit.py:199:calculate_initial_plan: [099] dHA=0.007deg RMSE=280.10% LOSS= 5.67% delta(score)= -0.0%
INFO:surveyinit.py:199:calculate_initial_plan: [100] dHA=0.006deg RMSE=280.12% LOSS= 5.67% delta(score)= +0.0%
INFO:surveyinit.py:211:calculate_initial_plan: DARK plan uses 1.9h with 125.6h avail (6431.7% margin).
INFO:optimize.py:158:__init__: GRAY: 33.3h for 1 tiles (texp_nom 1000.0 s).
INFO:optimize.py:232:__init__: Center flat initial HA assignments at LST -60 deg.
/global/common/software/desi/cori/desiconda/20190804-1.3.0-spec/code/desisurvey/master/py/desisurvey/optimize.py:600: RuntimeWarning: invalid value encountered in true_divide
  avg_ha = self.smoothing_weights.dot(self.ha) / self.smoothing_sums
Found invalid plan_tiles in use_plan().

(see /global/cscratch1/sd/sjbailey/minitest-20.3/survey/surveyinit.log for full log)

@dkirkby I thought desisurvey had previously been updated to support the new tile file, but then we (I) waited a long time before merging it and desisurvey may have broken again. Could you check this out? Thanks.

schlafly commented 4 years ago

IIRC this just requires a tweak to the config/rules yaml files. I can look at this tomorrow.

sbailey commented 4 years ago

@schlafly thanks. I'll reassign this to you to investigate.

schlafly commented 4 years ago

This is expected to be addressed in https://github.com/desihub/desisurvey/pull/111 but I may not be appropriately setting up the environment at NERSC to test this. Travis still complains of a unit test error which I am unable to reproduce. I did:

source desi_environment.sh master
python setup.py test

in desisurvey. That should be adequate?

This is basically the same as @michaelJwilson's fix-config branch. https://github.com/desihub/desisurvey/tree/fix-config

sbailey commented 4 years ago

fixed by #111. Traivs testing problem was due to Travis tests using old tile file. Closing.