openacquisition.instrumentation.isolation

Module Contents

Classes

IsolationShape

Isolation efficiency model constructor

class openacquisition.instrumentation.isolation.IsolationShape(a, b, c, d)

Isolation efficiency model constructor

Generalized bell-shaped function representing the isolation efficiency shape of a quadrupole or linear ion trap.

Parameters:
  • a (float) – half-width at half-maximum

  • b (float) – proportional to the slope at the edges of the function

  • c (float) – offset from center

  • d (float) – full maximum

Notes

Let \(y = \frac{d}{1+\left|\frac{x-c}{a}\right|^{2b}}\), where \(y\) represents the isolation efficiency, and \(x\) represents the offset from the center of the window.

Examples

>>> from openacquisition.isolation_windows.isolation_shape import IsolationShape
>>> shape = IsolationShape(1, 10, 0, 1)
get_isolation_efficiency(offset)

Computes the isolation efficiency at a given offset from the center of the isolation window.

Parameters:

offset (float) – offset from the isolation window’s center

Returns:

isolation efficiency

Return type:

float

Examples

>>> from openacquisition.isolation_windows.isolation_shape import IsolationShape
>>> shape = IsolationShape(1, 10, 0, 1)
>>> shape.get_isolation_efficiency(0.0)
get_isolation_efficiency_unshifted(offset)

Computes the isolation efficiency at a given offset from the center of the isolation efficiency model.

Parameters:

offset (float) – offset from the isolation window’s center of isolation efficiency

Returns:

isolation efficiency

Return type:

float

Notes

This ignores the c parameter of the generalized bell-shaped function.

Examples

>>> from openacquisition.isolation_windows.isolation_shape import IsolationShape
>>> shape = IsolationShape(1, 10, 1, 1)
>>> shape.get_isolation_efficiency_unshifted(0.0)
get_offset_range(efficiency_threshold=0.01)

Returns the positive unshifted offset (ignores the c parameter) with the given isolation efficiency threshold

Parameters:

efficiency_threshold (float, optional) – minimum isolation efficiency, by default 0.01

Returns:

positive unshifted offset with the given isolation efficiency

Return type:

float

Notes

Since the generalized bell-shaped function is convex and symmetric, the range from the negative and postive values will contain all offsets with efficiency >= efficiency_threshold.

Examples

>>> from openacquisition.isolation_windows.isolation_shape import IsolationShape
>>> shape = IsolationShape(1, 10, 0, 1)
>>> shape.get_offset_range()
>>> shape.get_offset_range(0.01)
>>> shape.get_offset_range(0.001)
offset_range()

Returns the positive unshifted offset (ignores the c parameter) at 0.01 isolation efficiency

Returns:

positive unshifted offset at 0.01 isolation efficiency

Return type:

float

Notes

Lazy evaluation. Will only be computed at first request and then the result will be cached.

Examples

>>> from openacquisition.isolation_windows.isolation_shape import IsolationShape
>>> shape = IsolationShape(1, 10, 0, 1)
>>> shape.offset_range()