dataFitting

sans.guiframe.dataFitting

Adapters for fitting module

class sans.guiframe.dataFitting.Data1D(x=[], y=[], dx=None, dy=None)

Bases: danse.common.plottools.plottables.Data1D, DataLoader.data_info.Data1D

class View(x=None, y=None, dx=None, dy=None)

Representation of the data that might include a transformation

check_data_logX()
Remove negative value in x vector to avoid plotting negative value of Log10
check_data_logY()
Remove negative value in y vector to avoid plotting negative value of Log10
onFitRangeView(xmin=None, xmax=None)

It limits View data range to plot from min to max

Parameters:
  • xmin – the minimum value of x to plot.
  • xmax – the maximum value of x to plot
onResetView()
Reset x,y,dx and y in their full range and in the initial scale in case their previous range has changed
returnXview()
Return View x,y,dx,dy
setTransformX(funcx, funcdx)

Receive pointers to function that transform x and dx and set corresponding View pointers

Parameters:
  • transx – pointer to function that transforms x
  • transdx – pointer to function that transforms dx
setTransformY(funcy, funcdy)

Receive pointers to function that transform y and dy and set corresponding View pointers

Parameters:
  • transx – pointer to function that transforms y
  • transdx – pointer to function that transforms dy
transform(x=None, y=None, dx=None, dy=None)

Transforms the x,y,dx and dy vectors and stores the output in View parameters

Parameters:
  • x – array of x values
  • y – array of y values
  • dx – array of errors values on x
  • dy – array of error values on y
Data1D.changed()
Data1D.check_data_PlottableX()
Since no transformation is made for log10(x), check that no negative values is plot in log scale
Data1D.check_data_PlottableY()
Since no transformation is made for log10(y), check that no negative values is plot in log scale
Data1D.clone_without_data(length=0, clone=None)

Clone the current object, without copying the data (which will be filled out by a subsequent operation). The data arrays will be initialized to zero.

Parameters:
  • length – length of the data array to be initialized
  • clone – if provided, the data will be copied to clone
Data1D.colors()
Return the number of colors need to render the object
Data1D.copy_from_datainfo(data1d)
copy values of Data1D of type DataLaoder.Data_info
Data1D.get_xaxis()
Return the units and name of x-axis
Data1D.get_yaxis()
Return the units and name of y- axis
Data1D.is_empty()
Returns True if there is no data stored in the plottable
Data1D.is_slit_smeared()

Check whether the data has slit smearing information

Returns:True is slit smearing info is present, False otherwise
classmethod Data1D.labels(collection)
Build a label mostly unique within a collection
Data1D.onFitRange(xmin=None, xmax=None)

It limits View data range to plot from min to max

Parameters:
  • xmin – the minimum value of x to plot.
  • xmax – the maximum value of x to plot
Data1D.onReset()
Reset x, y, dx, dy view with its parameters
Data1D.render(plot, **kw)
Renders the plottable on the graph
Data1D.reset_view()
Reload view with new value to plot
Data1D.returnValuesOfView()
Return View parameters and it is used by Fit Dialog
Data1D.setLabel(labelx, labely)

It takes a label of the x and y transformation and set View parameters

Parameters:
  • transx – The label of x transformation is sent by Properties Dialog
  • transy – The label of y transformation is sent Properties Dialog
Data1D.set_View(x, y)
Load View
Data1D.set_data(x, y, dx=None, dy=None)
Data1D.transformView()
It transforms x, y before displaying
Data1D.transformX(transx, transdx)

Receive pointers to function that transform x and dx and set corresponding View pointers

Parameters:
  • transx – pointer to function that transforms x
  • transdx – pointer to function that transforms dx
Data1D.transformY(transy, transdy)

Receive pointers to function that transform y and dy and set corresponding View pointers

Parameters:
  • transy – pointer to function that transforms y
  • transdy – pointer to function that transforms dy
Data1D.xaxis(name, units)

Set the name and unit of x_axis

Parameters:
  • name – the name of x-axis
  • units – the units of x_axis
Data1D.yaxis(name, units)

Set the name and unit of y_axis

Parameters:
  • name – the name of y-axis
  • units – the units of y_axis
class sans.guiframe.dataFitting.Data2D(image=None, err_image=None, xmin=None, xmax=None, ymin=None, ymax=None, zmin=None, zmax=None, qx_data=None, qy_data=None, q_data=None, mask=None, dqx_data=None, dqy_data=None)

Bases: danse.common.plottools.plottables.Data2D, DataLoader.data_info.Data2D

class View(x=None, y=None, dx=None, dy=None)

Representation of the data that might include a transformation

check_data_logX()
Remove negative value in x vector to avoid plotting negative value of Log10
check_data_logY()
Remove negative value in y vector to avoid plotting negative value of Log10
onFitRangeView(xmin=None, xmax=None)

It limits View data range to plot from min to max

Parameters:
  • xmin – the minimum value of x to plot.
  • xmax – the maximum value of x to plot
onResetView()
Reset x,y,dx and y in their full range and in the initial scale in case their previous range has changed
returnXview()
Return View x,y,dx,dy
setTransformX(funcx, funcdx)

Receive pointers to function that transform x and dx and set corresponding View pointers

Parameters:
  • transx – pointer to function that transforms x
  • transdx – pointer to function that transforms dx
setTransformY(funcy, funcdy)

Receive pointers to function that transform y and dy and set corresponding View pointers

Parameters:
  • transx – pointer to function that transforms y
  • transdx – pointer to function that transforms dy
transform(x=None, y=None, dx=None, dy=None)

Transforms the x,y,dx and dy vectors and stores the output in View parameters

Parameters:
  • x – array of x values
  • y – array of y values
  • dx – array of errors values on x
  • dy – array of error values on y
Data2D.changed()
Data2D.check_data_PlottableX()
Since no transformation is made for log10(x), check that no negative values is plot in log scale
Data2D.check_data_PlottableY()
Since no transformation is made for log10(y), check that no negative values is plot in log scale
Data2D.clone_without_data(length=0, clone=None)

Clone the current object, without copying the data (which will be filled out by a subsequent operation). The data arrays will be initialized to zero.

Parameters:
  • length – length of the data array to be initialized
  • clone – if provided, the data will be copied to clone
Data2D.colors()
Return the number of colors need to render the object
Data2D.copy_from_datainfo(data2d)
copy value of Data2D of type DataLoader.data_info
Data2D.get_xaxis()
Return the units and name of x-axis
Data2D.get_yaxis()
Return the units and name of y- axis
Data2D.is_empty()
Returns True if there is no data stored in the plottable
classmethod Data2D.labels(collection)
Build a label mostly unique within a collection
Data2D.onFitRange(xmin=None, xmax=None)

It limits View data range to plot from min to max

Parameters:
  • xmin – the minimum value of x to plot.
  • xmax – the maximum value of x to plot
Data2D.onReset()
Reset x, y, dx, dy view with its parameters
Data2D.render(plot, **kw)
Renders the plottable on the graph
Data2D.reset_view()
Reload view with new value to plot
Data2D.returnValuesOfView()
Return View parameters and it is used by Fit Dialog
Data2D.setLabel(labelx, labely)

It takes a label of the x and y transformation and set View parameters

Parameters:
  • transx – The label of x transformation is sent by Properties Dialog
  • transy – The label of y transformation is sent Properties Dialog
Data2D.setValues(datainfo=None)

Use datainfo object to initialize data2D

Parameters:
  • datainfo – object
Data2D.set_View(x, y)
Load View
Data2D.set_data(x, y, dx=None, dy=None)
Data2D.set_zrange(zmin=None, zmax=None)
Data2D.transformView()
It transforms x, y before displaying
Data2D.transformX(transx, transdx)

Receive pointers to function that transform x and dx and set corresponding View pointers

Parameters:
  • transx – pointer to function that transforms x
  • transdx – pointer to function that transforms dx
Data2D.transformY(transy, transdy)

Receive pointers to function that transform y and dy and set corresponding View pointers

Parameters:
  • transy – pointer to function that transforms y
  • transdy – pointer to function that transforms dy
Data2D.xaxis(label, unit)

set x-axis

Parameters:
  • label – x-axis label
  • unit – x-axis unit
Data2D.yaxis(label, unit)

set y-axis

Parameters:
  • label – y-axis label
  • unit – y-axis unit
Data2D.zaxis(label, unit)

set z-axis

Parameters:
  • label – z-axis label
  • unit – z-axis unit
class sans.guiframe.dataFitting.Theory1D(x=[], y=[], dy=None)

Bases: danse.common.plottools.plottables.Theory1D, DataLoader.data_info.Data1D

class View(x=None, y=None, dx=None, dy=None)

Representation of the data that might include a transformation

check_data_logX()
Remove negative value in x vector to avoid plotting negative value of Log10
check_data_logY()
Remove negative value in y vector to avoid plotting negative value of Log10
onFitRangeView(xmin=None, xmax=None)

It limits View data range to plot from min to max

Parameters:
  • xmin – the minimum value of x to plot.
  • xmax – the maximum value of x to plot
onResetView()
Reset x,y,dx and y in their full range and in the initial scale in case their previous range has changed
returnXview()
Return View x,y,dx,dy
setTransformX(funcx, funcdx)

Receive pointers to function that transform x and dx and set corresponding View pointers

Parameters:
  • transx – pointer to function that transforms x
  • transdx – pointer to function that transforms dx
setTransformY(funcy, funcdy)

Receive pointers to function that transform y and dy and set corresponding View pointers

Parameters:
  • transx – pointer to function that transforms y
  • transdx – pointer to function that transforms dy
transform(x=None, y=None, dx=None, dy=None)

Transforms the x,y,dx and dy vectors and stores the output in View parameters

Parameters:
  • x – array of x values
  • y – array of y values
  • dx – array of errors values on x
  • dy – array of error values on y
Theory1D.changed()
Theory1D.check_data_PlottableX()
Since no transformation is made for log10(x), check that no negative values is plot in log scale
Theory1D.check_data_PlottableY()
Since no transformation is made for log10(y), check that no negative values is plot in log scale
Theory1D.clone_without_data(length=0, clone=None)

Clone the current object, without copying the data (which will be filled out by a subsequent operation). The data arrays will be initialized to zero.

Parameters:
  • length – length of the data array to be initialized
  • clone – if provided, the data will be copied to clone
Theory1D.colors()
Return the number of colors need to render the object
Theory1D.copy_from_datainfo(data1d)
copy values of Data1D of type DataLaoder.Data_info
Theory1D.get_xaxis()
Return the units and name of x-axis
Theory1D.get_yaxis()
Return the units and name of y- axis
Theory1D.is_empty()
Returns True if there is no data stored in the plottable
Theory1D.is_slit_smeared()

Check whether the data has slit smearing information

Returns:True is slit smearing info is present, False otherwise
classmethod Theory1D.labels(collection)
Build a label mostly unique within a collection
Theory1D.onFitRange(xmin=None, xmax=None)

It limits View data range to plot from min to max

Parameters:
  • xmin – the minimum value of x to plot.
  • xmax – the maximum value of x to plot
Theory1D.onReset()
Reset x, y, dx, dy view with its parameters
Theory1D.render(plot, **kw)
Theory1D.reset_view()
Reload view with new value to plot
Theory1D.returnValuesOfView()
Return View parameters and it is used by Fit Dialog
Theory1D.setLabel(labelx, labely)

It takes a label of the x and y transformation and set View parameters

Parameters:
  • transx – The label of x transformation is sent by Properties Dialog
  • transy – The label of y transformation is sent Properties Dialog
Theory1D.set_View(x, y)
Load View
Theory1D.set_data(x, y, dx=None, dy=None)
Theory1D.transformView()
It transforms x, y before displaying
Theory1D.transformX(transx, transdx)

Receive pointers to function that transform x and dx and set corresponding View pointers

Parameters:
  • transx – pointer to function that transforms x
  • transdx – pointer to function that transforms dx
Theory1D.transformY(transy, transdy)

Receive pointers to function that transform y and dy and set corresponding View pointers

Parameters:
  • transy – pointer to function that transforms y
  • transdy – pointer to function that transforms dy
Theory1D.xaxis(name, units)

Set the name and unit of x_axis

Parameters:
  • name – the name of x-axis
  • units – the units of x_axis
Theory1D.yaxis(name, units)

Set the name and unit of y_axis

Parameters:
  • name – the name of y-axis
  • units – the units of y_axis

Table Of Contents

Previous topic

data_loader

Next topic

dummyapp

This Page