reverted: --- src/filters/compositionProfile.cpp Fri Aug 12 20:46:42 2011 +0100 +++ src/filters/compositionProfile.cpp Fri Aug 12 23:18:47 2011 +0100 @@ -383,7 +383,7 @@ float angle = dir.angle(direction); + float halfLen=sqrt(vectorParams[1].sqrMag()); - float halfLen=sqrt(vectorParams[1].sqrMag())/2.0f; float sqrRad=scalarParams[0]*scalarParams[0]; //Check that we actually need to rotate, to avoid numerical singularity @@ -554,6 +554,17 @@ } plotData[ui]->xyData.resize(ionFrequencies[ui].size()); + + //Density profiles (non-ranged plots) have a fixed normalisation factor + if(!rngData && normalise) + { + if(fixedBins) + normFactor = 1.0/(M_PI*scalarParams[0]*scalarParams[0]*(length/(float)numBins)); + else + normFactor = 1.0/(M_PI*scalarParams[0]*scalarParams[0]*binWidth); + } + + //Go through each bin, then perform the appropriate normalisation for(unsigned int uj=0;ujxyData[uj] = std::make_pair( xPos,normFactor*(float)ionFrequencies[ui][uj]);