Skip to content

Commit

Permalink
Apply naming conventions to reports, residual plots, and plotted fits.
Browse files Browse the repository at this point in the history
  • Loading branch information
krzywon committed Aug 13, 2020
1 parent 2811b07 commit 1fcc82b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/sas/qtgui/Perspectives/Fitting/FittingLogic.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def _create1DPlot(self, tab_id, x, y, model, data, component=None):
new_plot.id = str(tab_id) + " " + ("[" + component + "] " if component else "") + model.id

# use data.filename for data, use model.id for theory
id_str = data.filename if data.filename else model.id
id_str = data.name if data.name else model.id
new_plot.name = model.name + ((" " + component) if component else "") + " [" + id_str + "]"

new_plot.title = new_plot.name
Expand Down
2 changes: 1 addition & 1 deletion src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ def plotResiduals(reference_data, current_data, weights):
return None

theory_name = str(current_data.name.split()[0])
res_name = reference_data.filename if reference_data.filename else reference_data.name
res_name = reference_data.name if reference_data.name else reference_data.filename
residuals.name = "Residuals for " + str(theory_name) + "[" + res_name + "]"
residuals.title = residuals.name
residuals.ytransform = 'y'
Expand Down
2 changes: 1 addition & 1 deletion src/sas/qtgui/Perspectives/Fitting/ReportPageLogic.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def reportHeader(self):

def buildPlotsForReport(self, images):
""" Convert Matplotlib figure 'fig' into a <img> tag for HTML use using base64 encoding. """
html = FEET_1 % self.data.filename
html = FEET_1 % self.data.name

for fig in images:
canvas = FigureCanvas(fig)
Expand Down

0 comments on commit 1fcc82b

Please sign in to comment.