Skip to content

Commit

Permalink
Refs #9445. Fixed NaN-problem in PoldiTimeTransformer
Browse files Browse the repository at this point in the history
PoldiTimeTransformer::detectorElementIntensity produced NaN when a
wavelength outside the spectrum boundaries was calculated, because that
would be negative.
  • Loading branch information
Michael Wedel committed May 22, 2014
1 parent 5f4146d commit efbd26b
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -26,7 +26,7 @@ PoldiSourceSpectrum::PoldiSourceSpectrum(Instrument_const_sptr poldiInstrument)
*/
double PoldiSourceSpectrum::intensity(double wavelength) const
{
return m_spectrum.value(wavelength);
return std::max(0.0, m_spectrum.value(wavelength));
}

/** Extracts the source spectrum from an Instrument
Expand Down

0 comments on commit efbd26b

Please sign in to comment.