Gammas#

class mrinufft.trajectories.Gammas(value)[source]#

Bases: FloatEnum

Enumerate gyromagnetic ratios for common nuclei in MR.

Methods

conjugate

Return self, the complex conjugate of any float.

as_integer_ratio

Return integer ratio.

fromhex

Create a floating-point number from a hexadecimal string.

hex

Return a hexadecimal representation of a floating-point number.

is_integer

Return True if the float is an integer.

Attributes

real

the real part of a complex number

imag

the imaginary part of a complex number

HYDROGEN

HELIUM

CARBON

OXYGEN

FLUORINE

SODIUM

PHOSPHOROUS

XENON

H

H1

PROTON

He

He3

C

C13

O

O17

F

F19

Na

Na23

P

P31

X

X129

HYDROGEN = 42576000.0[source]#
HELIUM = 32434000.0[source]#
CARBON = 10708000.0[source]#
OXYGEN = 5772000.0[source]#
FLUORINE = 40078000.0[source]#
SODIUM = 11262000.0[source]#
PHOSPHOROUS = 17235000.0[source]#
XENON = 11777000.0[source]#
H = 42576000.0[source]#
H1 = 42576000.0[source]#
PROTON = 42576000.0[source]#
He = 32434000.0[source]#
He3 = 32434000.0[source]#
C = 10708000.0[source]#
C13 = 10708000.0[source]#
O = 5772000.0[source]#
O17 = 5772000.0[source]#
F = 40078000.0[source]#
F19 = 40078000.0[source]#
Na = 11262000.0[source]#
Na23 = 11262000.0[source]#
P = 17235000.0[source]#
P31 = 17235000.0[source]#
X = 11777000.0[source]#
X129 = 11777000.0[source]#
__add__(value, /)[source]#

Return self+value.

__mul__(value, /)[source]#

Return self*value.

conjugate()[source]#

Return self, the complex conjugate of any float.

as_integer_ratio()[source]#

Return integer ratio.

Return a pair of integers, whose ratio is exactly equal to the original float and with a positive denominator.

Raise OverflowError on infinities and a ValueError on NaNs.

>>> (10.0).as_integer_ratio()
(10, 1)
>>> (0.0).as_integer_ratio()
(0, 1)
>>> (-.25).as_integer_ratio()
(-1, 4)
fromhex()[source]#

Create a floating-point number from a hexadecimal string.

>>> float.fromhex('0x1.ffffp10')
2047.984375
>>> float.fromhex('-0x1p-1074')
-5e-324
hex()[source]#

Return a hexadecimal representation of a floating-point number.

>>> (-0.1).hex()
'-0x1.999999999999ap-4'
>>> 3.14159.hex()
'0x1.921f9f01b866ep+1'
is_integer()[source]#

Return True if the float is an integer.

real[source]#

the real part of a complex number

imag[source]#

the imaginary part of a complex number