DIA Windows¶
tdfpy.DiaWindow
dataclass
¶
DiaWindow(
*,
window_index: int,
window_group_id: int,
scan_num_begin: int,
scan_num_end: int,
isolation_mz: float,
isolation_width: float,
collision_energy: float,
frame_id: int,
rt: float,
polarity: Polarity | None,
_timsdata: TimsData = _timsdata_field()
)
Bases: DiaWindowGroup, _MobilityWindow
A DIA isolation window in one specific MS/MS frame.
Extends DiaWindowGroup with the frame it was acquired in, and gives
spectrum access and ion-mobility ranges for the window's scan range.
timsdata
property
¶
timsdata: TimsData
The reader's open :class:TimsData.
Raises:
| Type | Description |
|---|---|
ReaderClosedError
|
If the reader that built this element was closed. |
scan_num_range
property
¶
(scan_num_begin, scan_num_end), end exclusive.
isolation_mz_range
property
¶
Quadrupole isolation window (isolation_mz - width / 2, isolation_mz + width / 2), low first.
ms_level
property
¶
MS level of the window's spectra: always 2 (an MS/MS isolation window).
ook0_range
property
¶
(ook0_begin, ook0_end): lowest and highest 1/K0 (V·s/cm²) of the scan range, low first.
ccs_range
property
¶
(ccs_begin, ccs_end): CCS (Ų) range for charge 1 at isolation_mz, low first.
ccs_begin
property
¶
Lowest CCS (Ų) of the scan range, for charge 1 at isolation_mz.
voltage_range
property
¶
(voltage_begin, voltage_end): TIMS voltage (V) range of the scan range, low first.
scan_peaks
¶
Raw peaks, one (N_i, 2) [m/z, intensity] float64 array per mobility scan.
The list has one entry per scan in this element's scan range, in scan
order; empty scans give a (0, 2) array.
Raises:
| Type | Description |
|---|---|
ReaderClosedError
|
If the reader was closed. |
TdfpyError
|
If a window's scan range does not fit its frame (corrupt file). |
Source code in src/tdfpy/elems.py
raw_peaks
¶
raw_peaks(
*,
exclude: ChargeStateRegion | None = None,
smooth: Smooth | None = None,
noise: NoiseSpec = None,
mobility_type: MobilityType = "ook0"
) -> npt.NDArray[np.float64]
Raw peaks as one (N, 3) [m/z, intensity, ion_mobility] array.
Restricted to this element's scan range. See :func:tdfpy.get_raw_peaks
for the keyword arguments.
Raises:
| Type | Description |
|---|---|
ReaderClosedError
|
If the reader was closed. |
TdfpyError
|
If a window's scan range does not fit its frame (corrupt file). |
Source code in src/tdfpy/elems.py
centroid
¶
centroid(
*,
exclude: ChargeStateRegion | None = None,
smooth: Smooth | None = None,
noise: NoiseSpec = None,
mobility_type: MobilityType = "ook0",
centroid: Centroider | None = None
) -> npt.NDArray[np.float64]
Centroided peaks as one (N, 3) [m/z, intensity, ion_mobility] array.
Restricted to this element's scan range. The raw-peak keywords are
passed to :func:tdfpy.get_raw_peaks; centroider settings live on
:class:~tdfpy.Centroider (default :class:~tdfpy.MergePeaksCentroider).
Raises:
| Type | Description |
|---|---|
ReaderClosedError
|
If the reader was closed. |
TdfpyError
|
If a window's scan range does not fit its frame (corrupt file). |
Source code in src/tdfpy/elems.py
tdfpy.DiaWindowGroup
dataclass
¶
DiaWindowGroup(
*,
window_index: int,
window_group_id: int,
scan_num_begin: int,
scan_num_end: int,
isolation_mz: float,
isolation_width: float,
collision_energy: float
)
Bases: _IsolationWindow
One window of a DIA window group, shared by every frame that uses the group.
One row of the DiaFrameMsMsWindows table. DiaWindow adds the per-frame
fields (frame_id, rt, polarity).
| Field | Type | Description |
|---|---|---|
window_index |
int |
0-based row index in the DiaFrameMsMsWindows table (not per group) |
window_group_id |
int |
Window group ID (the WindowGroup column) |
scan_num_begin |
int |
First mobility scan (inclusive) |
scan_num_end |
int |
Mobility scan range end (exclusive), so the range is [scan_num_begin, scan_num_end) |
isolation_mz |
float |
Isolation window center m/z |
isolation_width |
float |
Isolation window width in Th |
collision_energy |
float |
Collision energy in eV |