Skip to content

Commit

Permalink
Add fixed random seed to fitDefaulted
Browse files Browse the repository at this point in the history
  • Loading branch information
cmsaunders committed Feb 1, 2023
1 parent bca2154 commit 32c6874
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/subs/WcsSubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#include <random>
using namespace astrometry;

std::mt19937 g(12345);

void fitDefaulted(PixelMapCollection &pmc, set<Extension *> extensions,
const vector<unique_ptr<Instrument>> &instruments,
const vector<unique_ptr<Exposure>> &exposures, bool logging) {
Expand Down Expand Up @@ -85,8 +87,6 @@ void fitDefaulted(PixelMapCollection &pmc, set<Extension *> extensions,
vector<int> vx(nGridPoints);
for (int i = 0; i < vx.size(); i++) vx[i] = i;
vector<int> vy = vx;
std::random_device rd;
std::mt19937 g(rd());
std::shuffle(vy.begin(), vy.end(), g);
double xstep = (b.getXMax() - b.getXMin()) / nGridPoints;
double ystep = (b.getYMax() - b.getYMin()) / nGridPoints;
Expand Down

0 comments on commit 32c6874

Please sign in to comment.