azint
AzimuthalIntegrator
This class is an azimuthal integrator
Source code in azint/azint.py
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
|
__init__(poni, n_splitting, radial_bins, azimuth_bins=None, unit='q', mask=None, solid_angle=True, polarization_factor=None, error_model=None)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
poni |
Union[str, Poni]
|
Name of Poni file or instance of Poni |
required |
n_splitting |
int
|
Each pixel in the image gets split into (n, n) subpixels that get binned individually |
required |
radial_bins |
Union[int, Sequence]
|
radial bins can either be number of bins or a sequence defining the bin edges in Angstrom^-1. |
required |
azimuth_bins |
Optional[Union[int, Sequence]]
|
azimthual bins can either be number of bins or a sequence defining the bin edges between [0, 360] degrees. |
None
|
unit |
str
|
Ouput units for the radial coordindate |
'q'
|
mask |
ndarray
|
Pixel mask to exclude bad pixels. Pixels marked with 1 will be excluded |
None
|
solid_angle |
bool
|
Perform solid angle correction |
True
|
polarization_factor |
Optional[float]
|
Polarization factor for the polarization correction 1 (linear horizontal polarization) -1 (linear vertical polarization) |
None
|
error_model |
Optional[str]
|
Error model used to calculate errors in the transformation. Only options is 'poisson' error model |
None
|
Attributes:
Name | Type | Description |
---|---|---|
radial_axis |
ndarray
|
radial axis depeding on units in q or 2theta |
azimuth_axis |
ndarray
|
azimuth axis in degrees is case of 2D integration |
Source code in azint/azint.py
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
|
integrate(img, mask=None, normalized=True)
Calculates the azimuthal integration of the input image
Parameters:
Name | Type | Description | Default |
---|---|---|---|
img |
ndarray
|
Input image to be integrated |
required |
mask |
Optional[ndarray]
|
Optional pixel mask to exclude bad pixels. Note if mask is constant using the mask argument in the constructor is more efficient |
None
|
normalized |
Optional[bool]
|
Whether to return the normalized result or the integrated signal and norm separately |
True
|
Returns:
Type | Description |
---|---|
ndarray
|
azimuthal integrated image or just integrated signal if normalized is True |
ndarray
|
standard error of the mean (SEM) when error_model is specified else None |
Optional[ndarray]
|
the norm if normalized is False |
Source code in azint/azint.py
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
|