sinogram¶
nrxrdct.xrdct.sinogram ¶
assemble_sinogram ¶
assemble_sinogram(integrated_file: Path, n_rot: int, n_tth_angles: int, n_lines: int = 10, translation_motor: str = 'dty') -> tuple[np.ndarray, np.ndarray]
Build a 3-D sinogram from an HDF5 file of integrated patterns.
Scans stored under integrated/scan* keys are background-subtracted
(using the mean of the first and last scans), zero-padded to
(n_rot, n_tth_angles), and stacked in order of increasing
translation_motor value — read from each scan's own attribute (written
by :func:nrxrdct.azimuthal.integration.integrate_powder_parallel) rather
than trusted from its position in the file. This matters because a scan
that fails partway through integration never gets a scan_* group at
all, and stacking by raw file order would then silently shift every scan
after the gap out of alignment with the translation axis. Sorting by the
recorded motor value also keeps this sinogram's translation axis directly
comparable to per-scan dty values used elsewhere (e.g.
:mod:nrxrdct.xrdct.s3dxrd), for the same slice.
The resulting array is rolled so that the 2θ axis comes first: shape
(n_tth_angles, n_lines, n_rot).
| Parameters: |
|
|---|
| Returns: |
|
|---|
Source code in src/nrxrdct/xrdct/sinogram.py
get_fluo_full_spectra ¶
get_fluo_full_spectra(h5_file, n_angles=901, binning_factor=1, filter_size=7, dat_entry='mca_det0', binning_func=np.mean, monitor_entry='fpico6') -> tuple[np.ndarray, np.ndarray]
Assemble a full-spectrum XRF sinogram from an HDF5 master file.
Each scan entry is monitor-normalised, median-filtered, optionally energy-binned, zero-padded to n_angles, and stacked into a 3-D sinogram array.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Source code in src/nrxrdct/xrdct/sinogram.py
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 248 | |
get_fluo_roi ¶
get_fluo_roi(fn, n_angles=901, data_entry='mca_det0_all', monitor_entry='fpico6', filter_size=3) -> tuple[np.ndarray, np.ndarray, np.ndarray]
Load per-scan ROI fluorescence data from an HDF5 master file.
For each scan entry in the file the rotation axis and the chosen MCA dataset are read, optionally median-filtered, zero-padded to n_angles, and sorted in ascending rotation order.
| Parameters: |
|
|---|
| Returns: |
|
|---|