playnano.io.formats.read_jpk_folder module

Load a folder of JPK .jpk image files, one per frame, as an AFMImageStack.

Files are read with AFMReader, which converts height and amplitude channels to nm. Frames are taken in file-name order.

playnano.io.formats.read_jpk_folder.load_jpk_folder(folder_path: Path | str, channel: str, flip_image: bool = True) → AFMImageStack[source]

Load a folder of .jpk files as one stack.

Parameters:
  • folder_path (str or pathlib.Path) – Folder of .jpk files, one per frame. Files are sorted by name.

  • channel (str) – Channel to load, for example "height_trace"; the same names as AFMReader’s load_jpk.

  • flip_image (bool, optional) – Passed to AFMReader’s load_jpk, which flips each frame vertically from the row order stored in the file; playNano does not flip again. Same meaning as in load_h5jpk(). Default is True.

Returns:

The stack. pixel_size_nm is the first frame’s; each frame_metadata entry holds timestamp (s from the first frame), frame_pixel_size_nm, line_rate, frame_duration_s, start_epoch_ms and scan_direction. stack.acquisition["bidirectional"] records whether the scan was interlaced, worked out from the frame timing.

Return type:

AFMImageStack

Raises: