Skip to content

Commit

Permalink
Polish: fix contrast inversion when there is no gain reference.
Browse files Browse the repository at this point in the history
  • Loading branch information
biochem-fan committed Feb 21, 2024
1 parent e5c4835 commit 1765b3d
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/jaz/single_particle/movie_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,13 @@ BufferedImage<T> MovieLoader::readEER(

RawImage<T> muGraphFrame(muGraphFrame_xmipp);

if (useGain)
#pragma omp parallel for num_threads(num_threads)
for (long int i = 0; i < pixCt; i++)
{
#pragma omp parallel for num_threads(num_threads)
for (long int i = 0; i < pixCt; i++)
{
const RFLOAT val = muGraphFrame[i];
const RFLOAT gain = useGain? (*gainRef)[i] : 1.0;

muGraphFrame[i] = -gain * val;
}
const RFLOAT val = muGraphFrame[i];
const RFLOAT gain = useGain? (*gainRef)[i] : 1.0;

muGraphFrame[i] = -gain * val;
}

if (do_fixDefect)
Expand Down

0 comments on commit 1765b3d

Please sign in to comment.