Example #1
0
		/**
		 * Plots the loaded file to the miniplot and sets the guides
		 * and the range
		 * 
		 * @param filename :: The name of the workspace to plot
		 */
		void Stretch::handleSampleInputReady(const QString& filename)
		{
			plotMiniPlot(filename, 0);
			std::pair<double,double> range = getCurveRange();
			setMiniPlotGuides(m_properties["EMin"], m_properties["EMax"], range);
			setPlotRange(m_properties["EMin"], m_properties["EMax"], range);
		}
Example #2
0
/**
 * @brief Gets the X range of the first curve whose data is stored in the query
 * workspace.
 * @param workspace pointer to query workspace
 * @return the range of the first curve associated to the workspace
 * @exception std::runtime_error no stored curves are associated to the query
 * workspace
 */
QPair<double, double> DisplayCurveFit::getCurveRange(
    const Mantid::API::MatrixWorkspace_sptr workspace) {
  curveTypes typesFound = this->getCurvesForWorkspace(workspace);
  if (typesFound.size() == 0) {
    throw std::runtime_error("No fitting curves associated to workspace" +
                             workspace->name());
  }
  return getCurveRange(typesFound[0]);
}