imspy.chemistry package¶
Submodules¶
imspy.chemistry.amino_acids module¶
imspy.chemistry.constants module¶
imspy.chemistry.elements module¶
imspy.chemistry.mobility module¶
- imspy.chemistry.mobility.ccs_to_one_over_k0(ccs, mz, charge, mass_gas=28.013, temp=31.85, t_diff=273.15)¶
Convert CCS to reduced ion mobility (1/k0).
- Parameters:
ccs – collision cross-section
mz – mass-over-charge of the ion
charge – charge state of the ion
mass_gas – mass of drift gas
temp – temperature of the drift gas in C°
t_diff – factor to translate from C° to K
- Returns:
reduced ion mobility
- Return type:
float
- imspy.chemistry.mobility.ccs_to_one_over_k0_par(ccs, mz, charge, mass_gas=28.013, temp=31.85, t_diff=273.15, num_threads=-1)¶
Convert CCS to reduced ion mobility (1/k0) in parallel.
- Parameters:
ccs (
ndarray
[Any
,dtype
[TypeVar
(_ScalarType_co
, bound=generic
, covariant=True)]]) – collision cross-sectionmz (
ndarray
[Any
,dtype
[TypeVar
(_ScalarType_co
, bound=generic
, covariant=True)]]) – mass-over-charge of the ioncharge (
ndarray
[Any
,dtype
[TypeVar
(_ScalarType_co
, bound=generic
, covariant=True)]]) – charge state of the ionmass_gas (
float
) – mass of drift gastemp (
float
) – temperature of the drift gas in C°t_diff (
float
) – factor to translate from C° to Knum_threads (
int
) – number of threads
- Returns:
reduced ion mobility
- Return type:
NDArray
- imspy.chemistry.mobility.one_over_k0_to_ccs(one_over_k0, mz, charge, mass_gas=28.013, temp=31.85, t_diff=273.15)¶
Convert reduced ion mobility (1/k0) to CCS.
- Parameters:
one_over_k0 – reduced ion mobility
mz – mass-over-charge of the ion
charge – charge state of the ion
mass_gas – mass of drift gas
temp – temperature of the drift gas in C°
t_diff – factor to translate from C° to K
- Returns:
collision cross-section
- Return type:
float
- imspy.chemistry.mobility.one_over_k0_to_ccs_par(one_over_k0, mz, charge, mass_gas=28.013, temp=31.85, t_diff=273.15, num_threads=-1)¶
Convert reduced ion mobility (1/k0) to CCS in parallel.
- Parameters:
one_over_k0 (
ndarray
[Any
,dtype
[TypeVar
(_ScalarType_co
, bound=generic
, covariant=True)]]) – reduced ion mobilitymz (
ndarray
[Any
,dtype
[TypeVar
(_ScalarType_co
, bound=generic
, covariant=True)]]) – mass-over-charge of the ioncharge (
ndarray
[Any
,dtype
[TypeVar
(_ScalarType_co
, bound=generic
, covariant=True)]]) – charge state of the ionmass_gas (
float
) – mass of drift gastemp (
float
) – temperature of the drift gas in C°t_diff (
float
) – factor to translate from C° to Knum_threads (
int
) – number of threads
- Returns:
collision cross-section
- Return type:
NDArray
imspy.chemistry.sum_formula module¶
imspy.chemistry.unimod module¶
imspy.chemistry.utility module¶
- imspy.chemistry.utility.calculate_mz(mass, charge)¶
Calculate m/z value.
- Parameters:
mass (float) – Mass.
charge (int) – Charge.
- Returns:
m/z value.
- Return type:
float
- imspy.chemistry.utility.calculate_transmission_dependent_fragment_ion_isotope_distribution(target_spec, complement_spec, transmitted_isotopes, max_isotope)¶
Calculate transmission dependent fragment ion isotope distribution.
- Parameters:
target_spec (MzSpectrum) – Target spectrum.
complement_spec (MzSpectrum) – Complement spectrum.
transmitted_isotopes (MzSpectrum) – Transmitted isotopes.
max_isotope (int) – Maximum isotope.
- Returns:
Transmission dependent fragment ion isotope distribution.
- Return type: