damaris.data.FitResult

class damaris.data.FitResult(x, y, title=None, source=None, y_err=None, params=None)[source]

plottable fit curve belonging to a MeasurementResult

In contrast to MeasurementResult, the x-values are a plain array and are independent of the measured data points, so a fit can be sampled on a much denser x-grid for a smooth plot. The fit is stored in the data pool under its own key, e.g. as a child of the measurement (“Magnetization(tau)/fit”), and is drawn by the GUI as an overlay on the measurement it belongs to.

__init__(x, y, title=None, source=None, y_err=None, params=None)[source]

x: array-like of x-values (independent of the measurement) y: array-like of y-values, same length as x title: plot title of the fit source: data pool key of the MeasurementResult this fit belongs to y_err: optional array-like of y errors, same length as x params: optional dictionary of fit parameters, shown in the plot

Methods

__init__(x, y[, title, source, y_err, params])

x: array-like of x-values (independent of the measurement) y: array-like of y-values, same length as x title: plot title of the fit source: data pool key of the MeasurementResult this fit belongs to y_err: optional array-like of y errors, same length as x params: optional dictionary of fit parameters, shown in the plot

get_legend()

Returns the legend of the plot (Dictionary)

get_lineplotdata()

x and y data for plotting the fit curve

get_number_of_channels()

Returns the number of channels in y

get_style()

Returns a reference to plot-styles (dictionary)

get_text(index)

Returns labels to be plotted (List)

get_title()

Returns the title of the plot

get_xdata()

Returns a reference to the x-Plotdata (array)

get_xlabel()

Returns the label for the x-axis

get_xmax()

Returns maximum of x

get_xmin()

Returns minimun of x

get_xminpos()

Returns smallest positive value of x

get_ydata([channel])

Returns the y-Plotdata of channel n (array)

get_ylabel()

Gets the label for the y-axis

get_ymax()

Returns maximimum of y

get_ymin()

Returns minimum of y

get_yminpos()

Returns smallest positive value of y

set_legend(channel, value)

Sets the legend of the plot

set_style(channel, value)

Sets a channel to a certain plot-style

set_text(index, text)

Sets labels to be plotted

set_title(title)

Sets the title of the plot

set_xdata(pos, value)

Sets a point in x

set_xlabel(label)

Sets the label for the x-axis

set_xmax(xmax)

Sets maximum of x

set_xmin(xmin)

Sets minimum of x

set_ydata(channel, pos, value)

Sets a point in y

set_ylabel(label)

Sets the label for the y-axis

set_ymax(ymax)

Sets maximum of y

set_ymin(ymin)

Sets minimum of y

uses_statistics()

drawable interface method returns False

write_to_hdf(hdffile, where, name, title[, ...])