Skip to content

Commit

Permalink
RelionCor: supported 100 kV
Browse files Browse the repository at this point in the history
  • Loading branch information
biochem-fan committed May 20, 2019
1 parent 9f23f17 commit b76584f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/motioncorr_runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1640,16 +1640,18 @@ bool MotioncorrRunner::executeOwnMotionCorrection(Micrograph &mic) {
// Dose weighting
if (do_dose_weighting) {
RCTIC(TIMING_DOSE_WEIGHTING);
if (std::abs(voltage - 300) > 2 && std::abs(voltage - 200) > 2) {
REPORT_ERROR("Sorry, dose weighting is supported only for 300 kV or 200 kV");
if (std::abs(voltage - 300) > 2 && std::abs(voltage - 200) > 2 && std::abs(voltage - 100) > 2) {
REPORT_ERROR("Sorry, dose weighting is supported only for 300, 200 or 100 kV");
}

std::vector <RFLOAT> doses(n_frames);
for (int iframe = 0; iframe < n_frames; iframe++) {
// dose AFTER each frame.
doses[iframe] = pre_exposure + dose_per_frame * (frames[iframe] + 1);
if (std::abs(voltage - 200) <= 5) {
if (std::abs(voltage - 200) <= 2) {
doses[iframe] /= 0.8; // 200 kV electron is more damaging.
} else if (std::abs(voltage - 100) <= 2) {
doses[iframe] /= 0.64; // 100 kV electron is much more damaging.
}
}

Expand Down

0 comments on commit b76584f

Please sign in to comment.