Skip to content

Commit

Permalink
RE 7091 bias data in splatterplot
Browse files Browse the repository at this point in the history
Removed a couple of variables intended for an alternate
biasing strategy that won't be used.  Put cout statements
in if (VERBOSE) structure that was originally present in the
code.  Tried an alternate biasing strategy that used points
from the boxes above the threshold, based on the number of points
in the box.  For example, if the number of points requested was
equal to 1/2 the total number of points in boxes above the
threshold, then 1/2 of the points from each box would be used.
This alternate strategy emphasized bright peaks much more
than the weaker peaks and required many more points to see the
full lattice.  Also, it was more difficult to get a good
view of scattering between the main Bragg peaks in TOPAZ 7424
or of the diffuse scattering in TOPAZ 7238, with the alternate
strategy.

refs #7091
  • Loading branch information
DennisMikkelson committed May 28, 2013
1 parent 8be0de4 commit c9039ec
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions Code/Mantid/Vates/VatesAPI/src/vtkSplatterPlotFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ namespace Mantid
} // box is valid MDBox
} // For each box

std::cout << "START SORTING" << std::endl;
if ( VERBOSE ) std::cout << "START SORTING" << std::endl;
std::sort( sorted_boxes.begin(), sorted_boxes.end(), CompareNormalizedSignal );
std::cout << "DONE SORTING" << std::endl;
if ( VERBOSE ) std::cout << "DONE SORTING" << std::endl;

size_t num_boxes_to_use = (size_t)(percent_to_use * (double)sorted_boxes.size() / 100.0);
if ( num_boxes_to_use <= 0 )
Expand Down Expand Up @@ -149,15 +149,15 @@ namespace Mantid
if ( points_per_box < 1 )
points_per_box = 1;

// double max_signal = sorted_boxes[0]->getSignalNormalized();
// double min_signal = sorted_boxes[sorted_boxes.size()-1]->getSignalNormalized();

std::cout << "numPoints = " << numPoints << std::endl;
std::cout << "num boxes in all = " << boxes.size() << std::endl;
std::cout << "num boxes above zero = " << sorted_boxes.size() << std::endl;
std::cout << "num boxes to use = " << num_boxes_to_use << std::endl;
std::cout << "total_points_available = " << total_points_available << std::endl;
std::cout << "points needed per box = " << points_per_box << std::endl;
if ( VERBOSE )
{
std::cout << "numPoints = " << numPoints << std::endl;
std::cout << "num boxes in all = " << boxes.size() << std::endl;
std::cout << "num boxes above zero = " << sorted_boxes.size() << std::endl;
std::cout << "num boxes to use = " << num_boxes_to_use << std::endl;
std::cout << "total_points_available = " << total_points_available << std::endl;
std::cout << "points needed per box = " << points_per_box << std::endl;
}

// Create all the points
vtkPoints *points = vtkPoints::New();
Expand Down

0 comments on commit c9039ec

Please sign in to comment.