pytweezer.analysis.projections module

Sum an image along x and y and publish the two 1-D profiles.

Input:

One image stream (typically a ROI crop from roi_slice.py).

Output:

Two data streams (published on the Data hub, not the Image hub):

  • <name>_x – profile summed down the columns (intensity vs x),

  • <name>_y – profile summed across the rows (intensity vs y).

Each is sent as a 2xN [coords, values] array so live_plot.py and gaussian_fit.py can read A[0] as the axis and A[1] as the data.

Properties:
  • imagestreams: ([str]) input image streams.

This consumes images but emits 1-D data, so (like find_tweezer_atoms.py) it subscribes with the inherited ImageAnalysis client and publishes on a separate DataClient.

The sums use dtype=float64 so the accumulator is wide enough to avoid integer overflow on raw camera counts, without up-casting the whole frame first.

class pytweezer.analysis.projections.Projections(name)[source]

Bases: ImageAnalysis

process(head, data)[source]

Transform one received message.

Parameters:
  • head – the message header dict.

  • data – the payload (numpy array for images/data).

Returns:

(head, data) to republish, or None to drop the message. The default is a pass-through.