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

DM-13615: TestDataset allows randomness #108

Merged
merged 2 commits into from Feb 22, 2018
Merged

DM-13615: TestDataset allows randomness #108

merged 2 commits into from Feb 22, 2018

Conversation

jdswinbank
Copy link
Contributor

No description provided.

@@ -197,9 +197,6 @@ def makePerturbedWcs(oldWcs, minScaleFactor=1.2, maxScaleFactor=1.5,
The default range for rotation is 30-60 degrees, and the default range for reference shift
is 0.5-1.0 arcseconds (these cannot be safely included directly as default values because Angle
objects are mutable).

The random number generator is primed with the seed given. If ``None``, a seed is
automatically chosen.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still true, isn't it? I understand that you don't want randomSeed=None in general use, and I agree with defaulting it to something else, but that doesn't invalidate the statement you're removing.

TestDataset contains two methods (makePerturbedWcs and realize) that
take an optional seed for the random number generator. In both cases,
the seed defaults to None, which means the RNG is seeded in some
non-deterministic manner. However, this is intended for tests, which we
require are deterministic. The current API therefore makes it too easy
(simply neglecting to specify the optional randomSeed keyword argument)
to do something bad. Instead, default to a preset (and therefore
deterministic) value for the seed. If the user wants things to change
between invocations, he can specify different seeds.
Wasn't specifying an RNG seed.
@PaulPrice PaulPrice merged commit 5f4e98e into master Feb 22, 2018
@ktlim ktlim deleted the tickets/DM-13615 branch August 25, 2018 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants