public static void do511Fits(int start, int stop){ 
      DataHolder data = CDF_Gen.data;

      int length = stop - start;

      int max_cnts = MAX_CNT_FACTOR * length; 

      if(length < 2){return;}
      
      DescriptiveStatistics stats = new DescriptiveStatistics();
      float peak;
      double max_bin, min_bin;
      double[]
         search_spec = new double[PEAK_511_WIDTH],
         bin_num = new double[PEAK_511_WIDTH];
      
      //create array of detector bin numbers we will be searching
      for(int bin_i = 0; bin_i < PEAK_511_WIDTH; bin_i++){
         bin_num[bin_i] = SSPC_MIDPOINTS[bin_i + PEAK_511_START]; 
      }

      //sum up all of the spectra from this group
      for(int spec_i = start; spec_i < stop; spec_i++){

         //only add the spectrum to the sum if it is complete
         if((data.sspc_q[spec_i] & Constants.PART_SPEC) == 0){
            for(int chan_i = 0; chan_i < PEAK_511_WIDTH; chan_i++){
               search_spec[chan_i] += 
                  data.sspc[spec_i][chan_i + PEAK_511_START];
               //check to see if it is likely the 511 line will be washed out
               if(search_spec[chan_i] > max_cnts){
                  for(int peak_i = start; peak_i < stop; peak_i++){
                     data.peak511_bin[peak_i] = Constants.FLOAT_FILL; 
                  }
                  System.out.println("too many: " + length + " " + max_cnts + " " + search_spec[chan_i]);
                  return;
               }
            }
         }
      }

      peak = find511(bin_num, search_spec);

      for(int peak_i = start; peak_i < stop; peak_i++){
         data.peak511_bin[peak_i] = peak; 
      }
   }