parameters: (self, vanadium_ws, banks, spline_breaks, prog)
return_statement: return curves_ws
docstring: Fits one curve to every bank (where for every bank the data fitted is the result of
          summing up all the spectra of the bank). The fitting is done in d-spacing.
  
          @param vanadium_ws :: Vanadium run workspace to fit, expected in TOF units as they are archived
          @param banks :: list of banks to consider which is normally all the banks of the instrument
          @param spline_breaks :: number of break points when fitting spline functions
          @param prog :: progress reporter
  
          @returns a workspace with fitting results for all banks (3 spectra per bank). The spectra
          are in dSpacing units.
docstring_summary: Fits one curve to every bank (where for every bank the data fitted is the result of
          summing up all the spectra of the bank). The fitting is done in d-spacing.
docstring_tokens: Fits one curve to every bank ( where for every bank the data fitted is the result of summing up all the spectra of the bank ) . The fitting is done in d - spacing .
function: def _fit_curves_per_bank(self, vanadium_ws, banks, spline_breaks, prog):
          """
          Fits one curve to every bank (where for every bank the data fitted is the result of
          summing up all the spectra of the bank). The fitting is done in d-spacing.
  
          @param vanadium_ws :: Vanadium run workspace to fit, expected in TOF units as they are archived
          @param banks :: list of banks to consider which is normally all the banks of the instrument
          @param spline_breaks :: number of break points when fitting spline functions
          @param prog :: progress reporter
  
          @returns a workspace with fitting results for all banks (3 spectra per bank). The spectra
          are in dSpacing units.
          """
          curves = {}
          for bank_number, bank in enumerate(banks):
              prog.report("Fitting bank {} of {}".format(bank_number + 1, len(banks)))
              indices = EnggUtils.get_ws_indices_for_bank(vanadium_ws, bank)
              if not indices:
                  # no indices at all for this bank, not interested in it, don't add it to the dictionary
                  # (as when doing Calibrate (not-full)) which does CropData() the original workspace
                  continue
  
              prog.report("Cropping")
              ws_to_fit = EnggUtils.crop_data(self, vanadium_ws, indices)
              prog.report("Converting to d-spacing")
              ws_to_fit = EnggUtils.convert_to_d_spacing(self, ws_to_fit)
              prog.report("Summing spectra")
              ws_to_fit = EnggUtils.sum_spectra(self, ws_to_fit)
  
              prog.report("Fitting bank {} to curve".format(bank_number))
              fit_ws = self._fit_bank_curve(ws_to_fit, bank, spline_breaks, prog)
              curves.update({bank: fit_ws})
  
          curves_ws = self._prepare_curves_ws(curves)
  
          return curves_ws
function_tokens: def _fit_curves_per_bank ( self , vanadium_ws , banks , spline_breaks , prog ) : curves = { } for bank_number , bank in enumerate ( banks ) : prog . report ( "Fitting bank {} of {}" . format ( bank_number + 1 , len ( banks ) ) ) indices = EnggUtils . get_ws_indices_for_bank ( vanadium_ws , bank ) if not indices : # no indices at all for this bank, not interested in it, don't add it to the dictionary # (as when doing Calibrate (not-full)) which does CropData() the original workspace continue prog . report ( "Cropping" ) ws_to_fit = EnggUtils . crop_data ( self , vanadium_ws , indices ) prog . report ( "Converting to d-spacing" ) ws_to_fit = EnggUtils . convert_to_d_spacing ( self , ws_to_fit ) prog . report ( "Summing spectra" ) ws_to_fit = EnggUtils . sum_spectra ( self , ws_to_fit ) prog . report ( "Fitting bank {} to curve" . format ( bank_number ) ) fit_ws = self . _fit_bank_curve ( ws_to_fit , bank , spline_breaks , prog ) curves . update ( { bank : fit_ws } ) curves_ws = self . _prepare_curves_ws ( curves ) return curves_ws