Data manipulations for 2D data sets. Using the meta data information, various types of averaging are performed in Q-space
Bases: sans.dataloader.manipulations.Boxsum
Perform the average of counts in a 2D region of interest.
Perform the sum in the region of interest
Parameters: | data2D – Data2D object |
---|---|
Returns: | average counts, error on average counts |
alias of type
x.__delattr__(‘name’) <==> del x.name
x.__getattribute__(‘name’) <==> x.name
x.__hash__() <==> hash(x)
helper for pickle
helper for pickle
x.__repr__() <==> repr(x)
x.__setattr__(‘name’, value) <==> x.name = value
x.__str__() <==> str(x)
list of weak references to the object (if defined)
Perform the sum in the region of interest
Parameters: | data2D – Data2D object |
---|---|
Returns: | number of counts, error on number of counts, number of entries summed |
Bases: object
Find a rectangular 2D region of interest.
Find a rectangular 2D region of interest.
Parameters: | data2D – Data2D object |
---|---|
Returns: | mask, 1d array (len = len(data)) with Trues where the data points are inside ROI, otherwise False |
alias of type
x.__delattr__(‘name’) <==> del x.name
x.__getattribute__(‘name’) <==> x.name
x.__hash__() <==> hash(x)
helper for pickle
helper for pickle
x.__repr__() <==> repr(x)
x.__setattr__(‘name’, value) <==> x.name = value
x.__str__() <==> str(x)
list of weak references to the object (if defined)
Find a rectangular 2D region of interest.
Parameters: | data2D – Data2D object |
---|---|
Returns: | out, 1d array (length = len(data)) with Trues where the data points are inside ROI, otherwise Falses |
Bases: object
Perform the sum of counts in a 2D region of interest.
Perform the sum in the region of interest
Parameters: | data2D – Data2D object |
---|---|
Returns: | number of counts, error on number of counts |
alias of type
x.__delattr__(‘name’) <==> del x.name
x.__getattribute__(‘name’) <==> x.name
x.__hash__() <==> hash(x)
helper for pickle
helper for pickle
x.__repr__() <==> repr(x)
x.__setattr__(‘name’, value) <==> x.name = value
x.__str__() <==> str(x)
list of weak references to the object (if defined)
Perform the sum in the region of interest
Parameters: | data2D – Data2D object |
---|---|
Returns: | number of counts, error on number of counts, number of entries summed |
Bases: object
Perform circular averaging on 2D data
The data returned is the distribution of counts as a function of Q
Perform circular averaging on the data
Parameters: | data2D – Data2D object |
---|---|
Returns: | Data1D object |
alias of type
x.__delattr__(‘name’) <==> del x.name
x.__getattribute__(‘name’) <==> x.name
x.__hash__() <==> hash(x)
helper for pickle
helper for pickle
x.__repr__() <==> repr(x)
x.__setattr__(‘name’, value) <==> x.name = value
x.__str__() <==> str(x)
list of weak references to the object (if defined)
Bases: object
Defines a ring on a 2D data set. The ring is defined by r_min, r_max, and the position of the center of the ring.
The data returned is the distribution of counts around the ring as a function of phi.
Phi_min and phi_max should be defined between 0 and 2*pi in anti-clockwise starting from the x- axis on the left-hand side
Apply the ring to the data set. Returns the angular distribution for a given q range
Parameters: | data2D – Data2D object |
---|---|
Returns: | Data1D object |
alias of type
x.__delattr__(‘name’) <==> del x.name
x.__getattribute__(‘name’) <==> x.name
x.__hash__() <==> hash(x)
helper for pickle
helper for pickle
x.__repr__() <==> repr(x)
x.__setattr__(‘name’, value) <==> x.name = value
x.__str__() <==> str(x)
list of weak references to the object (if defined)
Bases: object
Defines a ring on a 2D data set. The ring is defined by r_min, r_max, and the position of the center of the ring.
The data returned is the region inside the ring
Phi_min and phi_max should be defined between 0 and 2*pi in anti-clockwise starting from the x- axis on the left-hand side
Apply the ring to the data set. Returns the angular distribution for a given q range
Parameters: | data2D – Data2D object |
---|---|
Returns: | index array in the range |
alias of type
x.__delattr__(‘name’) <==> del x.name
x.__getattribute__(‘name’) <==> x.name
x.__hash__() <==> hash(x)
helper for pickle
helper for pickle
x.__repr__() <==> repr(x)
x.__setattr__(‘name’, value) <==> x.name = value
x.__str__() <==> str(x)
list of weak references to the object (if defined)
Bases: sans.dataloader.manipulations._Sector
Sector average as a function of phi. I(phi) is return and the data is averaged over Q.
A sector is defined by r_min, r_max, phi_min, phi_max. The number of bin in phi also has to be defined.
Perform sector average and return I(phi).
Parameters: | data2D – Data2D object |
---|---|
Returns: | Data1D object |
Perform sector averaging.
Parameters: |
|
---|---|
Returns: | Data1D object |
Bases: sans.dataloader.manipulations._Sector
Sector average as a function of Q for both symatric wings. I(Q) is return and the data is averaged over phi.
A sector is defined by r_min, r_max, phi_min, phi_max. r_min, r_max, phi_min, phi_max >0. The number of bin in Q also has to be defined.
Perform sector average and return I(Q).
Parameters: | data2D – Data2D object |
---|---|
Returns: | Data1D object |
Perform sector averaging.
Parameters: |
|
---|---|
Returns: | Data1D object |
Bases: object
Defines a sector (major + minor) region on a 2D data set. The sector is defined by phi_min, phi_max, where phi_min and phi_max are defined by the right and left lines wrt central line.
Phi_min and phi_max are given in units of radian and (phi_max-phi_min) should not be larger than pi
Find a rectangular 2D region of interest.
Parameters: | data2D – Data2D object |
---|---|
Returns: | mask, 1d array (len = len(data)) |
with Trues where the data points are inside ROI, otherwise False
alias of type
x.__delattr__(‘name’) <==> del x.name
x.__getattribute__(‘name’) <==> x.name
x.__hash__() <==> hash(x)
helper for pickle
helper for pickle
x.__repr__() <==> repr(x)
x.__setattr__(‘name’, value) <==> x.name = value
x.__str__() <==> str(x)
list of weak references to the object (if defined)
Find a rectangular 2D region of interest.
Parameters: | data2D – Data2D object |
---|---|
Returns: | out, 1d array (length = len(data)) |
with Trues where the data points are inside ROI, otherwise Falses
Bases: sans.dataloader.manipulations._Slab
Compute average I(Qx) for a region of interest
Compute average I(Qx) for a region of interest
Parameters: | data2D – Data2D object |
---|---|
Returns: | Data1D object |
alias of type
x.__delattr__(‘name’) <==> del x.name
x.__getattribute__(‘name’) <==> x.name
x.__hash__() <==> hash(x)
helper for pickle
helper for pickle
x.__repr__() <==> repr(x)
x.__setattr__(‘name’, value) <==> x.name = value
x.__str__() <==> str(x)
list of weak references to the object (if defined)
Compute average I(Q_maj) for a region of interest. The major axis is defined as the axis of Q_maj. The minor axis is the axis that we average over.
Parameters: |
|
---|---|
Returns: | Data1D object |
Bases: sans.dataloader.manipulations._Slab
Compute average I(Qy) for a region of interest
Compute average I(Qy) for a region of interest
Parameters: | data2D – Data2D object |
---|---|
Returns: | Data1D object |
alias of type
x.__delattr__(‘name’) <==> del x.name
x.__getattribute__(‘name’) <==> x.name
x.__hash__() <==> hash(x)
helper for pickle
helper for pickle
x.__repr__() <==> repr(x)
x.__setattr__(‘name’, value) <==> x.name = value
x.__str__() <==> str(x)
list of weak references to the object (if defined)
Compute average I(Q_maj) for a region of interest. The major axis is defined as the axis of Q_maj. The minor axis is the axis that we average over.
Parameters: |
|
---|---|
Returns: | Data1D object |
Defines a sector region on a 2D data set. The sector is defined by r_min, r_max, phi_min, phi_max, and the position of the center of the ring where phi_min and phi_max are defined by the right and left lines wrt central line and phi_max could be less than phi_min.
Phi is defined between 0 and 2*pi in anti-clockwise starting from the x- axis on the left-hand side
Perform sector averaging.
Parameters: |
|
---|---|
Returns: | Data1D object |
Bases: object
Compute average I(Q) for a region of interest
alias of type
x.__delattr__(‘name’) <==> del x.name
x.__getattribute__(‘name’) <==> x.name
x.__hash__() <==> hash(x)
helper for pickle
helper for pickle
x.__repr__() <==> repr(x)
x.__setattr__(‘name’, value) <==> x.name = value
x.__str__() <==> str(x)
list of weak references to the object (if defined)
Compute average I(Q_maj) for a region of interest. The major axis is defined as the axis of Q_maj. The minor axis is the axis that we average over.
Parameters: |
|
---|---|
Returns: | Data1D object |
Correct phi to within the 0 <= to <= 2pi range
Returns: | phi in >=0 and <=2Pi |
---|
Returns the fraction of the side at which the q-value intercept the pixel, None otherwise. The values returned is the fraction ON THE SIDE OF THE LOWEST Q.
A B
+-----------+--------+ <--- pixel size
0 1
Q_0 -------- Q ----- Q_1 <--- equivalent Q range
if Q_1 > Q_0, A is returned
if Q_1 < Q_0, B is returned
if Q is outside the range of [Q_0, Q_1], None is returned
Returns the fraction of the pixel defined by the four corners (q_00, q_01, q_10, q_11) that has q < qmax.:
q_01 q_11
y=1 +--------------+
| |
| |
| |
y=0 +--------------+
q_00 q_10
x=0 x=1
Return the fraction of the length from xmin to x.:
A B
+-----------+---------+
xmin x xmax
Parameters: |
|
---|---|
Returns: | (x-xmin)/(xmax-xmin) when xmin < x < xmax |
Parameters: |
|
---|---|
Returns: | q-value at the given position |
This reduces tiny error at very large q. Implementation of this func is not started yet.<–ToDo
convert old 2d format opened by IhorReader or danse_reader to new Data2D format
Parameters: | data2d – 2d array of Data2D object |
---|---|
Returns: | 1d arrays of Data2D object |