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

specsim.instrument and config random state #94

Open
sbailey opened this issue Jul 26, 2018 · 0 comments
Open

specsim.instrument and config random state #94

sbailey opened this issue Jul 26, 2018 · 0 comments

Comments

@sbailey
Copy link
Contributor

sbailey commented Jul 26, 2018

Spinning this off from desihub/desisim#393:

specsim.instrument.initialize(config) generates a random state and uses it for the positioner offsets, which is cached in the Simulator.instrument. This random state gets used every time Simulator.simulate() is called, meaning that the answer for simulating a set of spectra depends upon the history of what other spectra were simulated previously using the same Simulator object.

Similarly, simulating the same spectra twice in a row gives different answers. This could be considered a feature, like simulating the same inputs with different exposures with different fiber positioner offsets, but we need better control over this positioner offset random state, e.g. a way to reset the Simulator+Instrument back to the original state.

Related: #36 (provenance and reproducibility) and #51 (deepcopy of Simulator).

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

1 participant