Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/jaz/math/Zernike.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,21 @@ double Zernike::R(int m, int n, double rho)

if ((n - m) % 2 == 1) return 0.0;

if (R_coeffs.size() <= n)
std::vector<double> coeffs_row;
#pragma omp critical(Zernike_R_coeffs)
{
prepCoeffs(n);
if (R_coeffs.size() <= n)
{
prepCoeffs(n);
}
coeffs_row = R_coeffs[n][m];
}

double out = 0.0;

for (int k = 0; k <= (n-m)/2; k++)
{
out += R_coeffs[n][m][k] * pow(rho, n - 2*k);
out += coeffs_row[k] * pow(rho, n - 2*k);
}

return out;
Expand Down
2 changes: 1 addition & 1 deletion src/jaz/single_particle/ctf/aberration_estimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ void AberrationEstimator::parametricFit(
const int gc = mdts.size();
const int ogc = obsModel->numberOfOpticsGroups();

std::vector<bool> groupUsed(ogc,false);
std::vector<char> groupUsed(ogc,false);

#pragma omp parallel for num_threads(nr_omp_threads)
for (int og = 0; og < ogc; og++)
Expand Down
2 changes: 1 addition & 1 deletion src/jaz/single_particle/ctf/tilt_estimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ void TiltEstimator::parametricFit(
const int gc = mdts.size();
const int ogc = obsModel->numberOfOpticsGroups();

std::vector<bool> groupUsed(ogc, false);
std::vector<char> groupUsed(ogc, false);

#pragma omp parallel for num_threads(nr_omp_threads)
for (int og = 0; og < ogc; og++)
Expand Down
Loading