Skip to content
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

ValueError: Got unlikely transparency value #58

Closed
apcooper opened this issue Sep 5, 2017 · 4 comments
Closed

ValueError: Got unlikely transparency value #58

apcooper opened this issue Sep 5, 2017 · 4 comments

Comments

@apcooper
Copy link

apcooper commented Sep 5, 2017

I'm trying to run surveysim as in https://github.com/desihub/quicksurvey_example/blob/master/survey/surveysim_HA.sh

The first call to surveysim after making the initial surveyplan fails with the following:

Traceback (most recent call last):
  File "/gpfs/data/DESI/software/modules/surveysim/0.7.1/bin/surveysim", line 4, in <module>
    __import__('pkg_resources').run_script('surveysim==0.6.0.dev1', 'surveysim')
  File "/gpfs/data/dph3apc/anaconda/3/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/pkg_resources/__init__.py", line 719, in run_script
  File "/gpfs/data/dph3apc/anaconda/3/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/pkg_resources/__init__.py", line 1504, in run_script
  File "/gpfs/data/DESI/software/modules/surveysim/0.7.1/lib/python3.5/site-packages/surveysim-0.6.0.dev1-py3.5.egg/EGG-INFO/scripts/surveysim", line 15, in <module>
    surveysim.scripts.surveysim.main(args)
  File "/gpfs/data/DESI/software/modules/surveysim/0.7.1/lib/python3.5/site-packages/surveysim-0.6.0.dev1-py3.5.egg/surveysim/scripts/surveysim.py", line 162, in main
    while simulator.next_day():
  File "/gpfs/data/DESI/software/modules/surveysim/0.7.1/lib/python3.5/site-packages/surveysim-0.6.0.dev1-py3.5.egg/surveysim/simulator.py", line 148, in next_day
    self.plan, self.gen)
  File "/gpfs/data/DESI/software/modules/surveysim/0.7.1/lib/python3.5/site-packages/surveysim-0.6.0.dev1-py3.5.egg/surveysim/nightops.py", line 97, in nightOps
    strategy, plan)
  File "/gpfs/data/DESI/software/modules/desisurvey/penalty_value/lib/python3.5/site-packages/desisurvey-0.8.2.dev415-py3.5.egg/desisurvey/schedule.py", line 449, in next_tile
    when, cutoff, seeing, transparency, progress, snr2frac, mask)
  File "/gpfs/data/DESI/software/modules/desisurvey/penalty_value/lib/python3.5/site-packages/desisurvey-0.8.2.dev415-py3.5.egg/desisurvey/schedule.py", line 223, in instantaneous_efficiency
    eff /= desisurvey.etc.transparency_exposure_factor(transparency)
  File "/gpfs/data/DESI/software/modules/desisurvey/penalty_value/lib/python3.5/site-packages/desisurvey-0.8.2.dev415-py3.5.egg/desisurvey/etc.py", line 69, in transparency_exposure_factor
    raise ValueError('Got unlikely transparency value < 1e-9.')
ValueError: Got unlikely transparency value < 1e-9.

Not sure if this is a bug -- if not, suggestions for how to proceed would be appreciated.

@dkirkby
Copy link
Member

dkirkby commented Sep 5, 2017

I already fixed this on my development branch, but that's probably ~1 week away from merging back into master. If this is blocking you, you could either:

  • make a one-line fix in surveysim.weather in your local checkout.
  • update to my dev branch, which will schedule more sensible exposures but require more extensive changes.

The best choice depends on what you are using the surveysim for: do you just want to exercise the machinery and produce outputs with the correct structure, etc, or are you using the simulated exposures for some study where realism is important?

@apcooper
Copy link
Author

apcooper commented Sep 6, 2017

I just want a reasonable set of outputs to exercise the latest quicksurvey, so for now I'm happy to hack surveysim.weather if you can let me know what the change is.

@dkirkby
Copy link
Member

dkirkby commented Sep 6, 2017

The change I made is here. You should be able to apply this change using:

git fetch
git cherry-pick b0b5e58

but I haven't actually tested this. In any case, please don't push this change back to github.

@dkirkby
Copy link
Member

dkirkby commented Sep 26, 2017

Closing since this issue is fixed on the master branch now after recent PRs.

@dkirkby dkirkby closed this as completed Sep 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants