Data manipulations for 2D data sets. Using the meta data information, various types of averaging are performed in Q-space
Bases: DataLoader.manipulations.Boxsum
Perform the average of counts in a 2D region of interest.
Bases: object
Find a rectangular 2D region of interest.
Bases: object
Perform the sum of counts in a 2D region of interest.
Bases: object
Perform circular averaging on 2D data
The data returned is the distribution of counts as a function of Q
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
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
Bases: 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.
Bases: 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.
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
Bases: DataLoader.manipulations._Slab
Compute average I(Qx) for a region of interest
Bases: DataLoader.manipulations._Slab
Compute average I(Qy) for a region of interest
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 |