dataFitting

sans.guiframe.dataFitting

Adapters for fitting module

class sans.guiframe.dataFitting.Data1D

Bases: danse.common.plottools.plottables.Data1D, sans.dataloader.data_info.Data1D

__add__()

Add two data sets

Parameters:other – data set to add to the current one
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
__class__

alias of type

__delattr__

x.__delattr__(‘name’) <==> del x.name

__dict__ = <dictproxy object at 0x044B2450>
__div__()

Divided a data set by another

Parameters:other – data set that the current one is divided by
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
__getattribute__

x.__getattribute__(‘name’) <==> x.name

__hash__

x.__hash__() <==> hash(x)

__init__()
__module__ = 'sans.guiframe.dataFitting'
__mul__()

Multiply two data sets

Parameters:other – data set to subtract from the current one
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
static __new__(S, ...) → a new object with type S, a subtype of T
__radd__()

Add two data sets

Parameters:other – data set to add to the current one
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
__rdiv__()

Divided a data set by another

Parameters:other – data set that the current one is divided by
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

x.__repr__() <==> repr(x)

__rmul__()

Multiply two data sets

Parameters:other – data set to subtract from the current one
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
__rsub__()

Subtract two data sets

Parameters:other – data set to subtract from the current one
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
__setattr__()

Take care of changes in View when data is changed. This method is provided for backward compatibility.

__str__()

print data

__sub__()

Subtract two data sets

Parameters:other – data set to subtract from the current one
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
__weakref__

list of weak references to the object (if defined)

_perform_operation()
_validity_check()

Checks that the data lengths are compatible. Checks that the x vectors are compatible. Returns errors vectors equal to original errors vectors if they were present or vectors of zeros when none was found.

Parameters:other – other data set for operation
Returns:dy for self, dy for other [numpy arrays]
Raises ValueError:
 when lengths are not compatible
_xaxis = ''
_xunit = ''
_yaxis = ''
_yunit = ''
add_notes()

Add notes to datainfo

append_empty_process()
changed()
check_data_PlottableX()

Since no transformation is made for log10(x), check that no negative values is plot in log scale

check_data_PlottableY()

Since no transformation is made for log10(y), check that no negative values is plot in log scale

clone_without_data()

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
collimation = None
colors()

Return the number of colors need to render the object

copy_from_datainfo()

copy values of Data1D of type DataLaoder.Data_info

custom_color = None
detector = None
dx = None
dxl = None
dxw = None
dy = None
errors = None
filename = ''
get_xaxis()

Return the units and name of x-axis

get_yaxis()

Return the units and name of y- axis

hidden = False
instrument = ''
interactive = True
is_empty()

Returns True if there is no data stored in the plottable

is_slit_smeared()

Check whether the data has slit smearing information

Returns:True is slit smearing info is present, False otherwise
classmethod labels()

Build a label mostly unique within a collection

markersize = 5
meta_data = None
name = None
notes = None
onFitRange()

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
onReset()

Reset x, y, dx, dy view with its parameters

process = None
render()

Renders the plottable on the graph

reset_view()

Reload view with new value to plot

returnValuesOfView()

Return View parameters and it is used by Fit Dialog

run = None
run_name = None
sample = None
setLabel()

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
set_View()

Load View

set_data()
short_name = None
source = None
title = ''
transformView()

It transforms x, y before displaying

transformX()

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
transformY()

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
x = None
x_unit = '1/A'
xaxis()

Set the name and unit of x_axis

Parameters:
  • name – the name of x-axis
  • units – the units of x_axis
y = None
y_unit = '1/cm'
yaxis()

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

Bases: danse.common.plottools.plottables.Data2D, sans.dataloader.data_info.Data2D

I_unit = '1/cm'
Q_unit = '1/A'
__add__()

Add two data sets

Parameters:other – data set to add to the current one
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
__class__

alias of type

__delattr__

x.__delattr__(‘name’) <==> del x.name

__dict__ = <dictproxy object at 0x044B2DD0>
__div__()

Divided a data set by another

Parameters:other – data set that the current one is divided by
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
__getattribute__

x.__getattribute__(‘name’) <==> x.name

__hash__

x.__hash__() <==> hash(x)

__init__()
__module__ = 'sans.guiframe.dataFitting'
__mul__()

Multiply two data sets

Parameters:other – data set to subtract from the current one
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
static __new__(S, ...) → a new object with type S, a subtype of T
__radd__()

Add two data sets

Parameters:other – data set to add to the current one
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
__rdiv__()

Divided a data set by another

Parameters:other – data set that the current one is divided by
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

x.__repr__() <==> repr(x)

__rmul__()

Multiply two data sets

Parameters:other – data set to subtract from the current one
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
__rsub__()

Subtract two data sets

Parameters:other – data set to subtract from the current one
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
__setattr__()

Take care of changes in View when data is changed. This method is provided for backward compatibility.

__str__()

print data

__sub__()

Subtract two data sets

Parameters:other – data set to subtract from the current one
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
__weakref__

list of weak references to the object (if defined)

_perform_operation()

Perform 2D operations between data sets

Parameters:
  • other – other data set
  • operation – function defining the operation
_validity_check()

Checks that the data lengths are compatible. Checks that the x vectors are compatible. Returns errors vectors equal to original errors vectors if they were present or vectors of zeros when none was found.

Parameters:other – other data set for operation
Returns:dy for self, dy for other [numpy arrays]
Raises ValueError:
 when lengths are not compatible
_xaxis = ''
_xunit = ''
_yaxis = ''
_yunit = ''
_zaxis = ''
_zunit = ''
add_notes()

Add notes to datainfo

append_empty_process()
changed()
check_data_PlottableX()

Since no transformation is made for log10(x), check that no negative values is plot in log scale

check_data_PlottableY()

Since no transformation is made for log10(y), check that no negative values is plot in log scale

clone_without_data()

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
collimation = None
colors()

Return the number of colors need to render the object

copy_from_datainfo()

copy value of Data2D of type DataLoader.data_info

custom_color = None
data = None
detector = None
dqx_data = None
dqy_data = None
dx = None
dy = None
err_data = None
errors = None
filename = ''
get_xaxis()

Return the units and name of x-axis

get_yaxis()

Return the units and name of y- axis

hidden = False
instrument = ''
interactive = True
is_empty()

Returns True if there is no data stored in the plottable

classmethod labels()

Build a label mostly unique within a collection

markersize = 5
mask = None
meta_data = None
name = None
notes = None
onFitRange()

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
onReset()

Reset x, y, dx, dy view with its parameters

process = None
q_data = None
qx_data = None
qy_data = None
render()

Renders the plottable on the graph

reset_view()

Reload view with new value to plot

returnValuesOfView()

Return View parameters and it is used by Fit Dialog

run = None
run_name = None
sample = None
setLabel()

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
setValues()

Use datainfo object to initialize data2D

Parameters:datainfo – object
set_View()

Load View

set_data()
set_zrange()
short_name = None
source = None
title = ''
transformView()

It transforms x, y before displaying

transformX()

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
transformY()

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
x = None
x_bins = None
xaxis()

set x-axis

Parameters:
  • label – x-axis label
  • unit – x-axis unit
xmax = None
xmin = None
y = None
y_bins = None
yaxis()

set y-axis

Parameters:
  • label – y-axis label
  • unit – y-axis unit
ymax = None
ymin = None
zaxis()

set z-axis

Parameters:
  • label – z-axis label
  • unit – z-axis unit
class sans.guiframe.dataFitting.Theory1D

Bases: danse.common.plottools.plottables.Theory1D, sans.dataloader.data_info.Data1D

__add__()

Add two data sets

Parameters:other – data set to add to the current one
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
__class__

alias of type

__delattr__

x.__delattr__(‘name’) <==> del x.name

__dict__ = <dictproxy object at 0x039C78D0>
__div__()

Divided a data set by another

Parameters:other – data set that the current one is divided by
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
__getattribute__

x.__getattribute__(‘name’) <==> x.name

__hash__

x.__hash__() <==> hash(x)

__init__()
__module__ = 'sans.guiframe.dataFitting'
__mul__()

Multiply two data sets

Parameters:other – data set to subtract from the current one
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
static __new__(S, ...) → a new object with type S, a subtype of T
__radd__()

Add two data sets

Parameters:other – data set to add to the current one
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
__rdiv__()

Divided a data set by another

Parameters:other – data set that the current one is divided by
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

x.__repr__() <==> repr(x)

__rmul__()

Multiply two data sets

Parameters:other – data set to subtract from the current one
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
__rsub__()

Subtract two data sets

Parameters:other – data set to subtract from the current one
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
__setattr__()

Take care of changes in View when data is changed. This method is provided for backward compatibility.

__str__()

print data

__sub__()

Subtract two data sets

Parameters:other – data set to subtract from the current one
Returns:new data set
Raises ValueError:
 raised when two data sets are incompatible
__weakref__

list of weak references to the object (if defined)

_perform_operation()
_validity_check()

Checks that the data lengths are compatible. Checks that the x vectors are compatible. Returns errors vectors equal to original errors vectors if they were present or vectors of zeros when none was found.

Parameters:other – other data set for operation
Returns:dy for self, dy for other [numpy arrays]
Raises ValueError:
 when lengths are not compatible
_xaxis = ''
_xunit = ''
_yaxis = ''
_yunit = ''
add_notes()

Add notes to datainfo

append_empty_process()
changed()
check_data_PlottableX()

Since no transformation is made for log10(x), check that no negative values is plot in log scale

check_data_PlottableY()

Since no transformation is made for log10(y), check that no negative values is plot in log scale

clone_without_data()

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
collimation = None
colors()

Return the number of colors need to render the object

copy_from_datainfo()

copy values of Data1D of type DataLaoder.Data_info

custom_color = None
detector = None
dx = None
dxl = None
dxw = None
dy = None
errors = None
filename = ''
get_xaxis()

Return the units and name of x-axis

get_yaxis()

Return the units and name of y- axis

hidden = False
instrument = ''
interactive = True
is_empty()

Returns True if there is no data stored in the plottable

is_slit_smeared()

Check whether the data has slit smearing information

Returns:True is slit smearing info is present, False otherwise
classmethod labels()

Build a label mostly unique within a collection

markersize = 5
meta_data = None
name = None
notes = None
onFitRange()

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
onReset()

Reset x, y, dx, dy view with its parameters

process = None
render()
reset_view()

Reload view with new value to plot

returnValuesOfView()

Return View parameters and it is used by Fit Dialog

run = None
run_name = None
sample = None
setLabel()

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
set_View()

Load View

set_data()
short_name = None
source = None
title = ''
transformView()

It transforms x, y before displaying

transformX()

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
transformY()

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
x = None
x_unit = '1/A'
xaxis()

Set the name and unit of x_axis

Parameters:
  • name – the name of x-axis
  • units – the units of x_axis
y = None
y_unit = '1/cm'
yaxis()

Set the name and unit of y_axis

Parameters:
  • name – the name of y-axis
  • units – the units of y_axis
sans.guiframe.dataFitting.check_data_validity()

Return True is data is valid enough to compute chisqr, else False

Table Of Contents

Previous topic

custom_pstats

Next topic

data_manager

This Page