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
.jpkfiles as one stack.- Parameters:
folder_path (str or pathlib.Path) – Folder of
.jpkfiles, one per frame. Files are sorted by name.channel (str) – Channel to load, for example
"height_trace"; the same names as AFMReader’sload_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 inload_h5jpk(). Default is True.
- Returns:
The stack.
pixel_size_nmis the first frame’s; eachframe_metadataentry holdstimestamp(s from the first frame),frame_pixel_size_nm,line_rate,frame_duration_s,start_epoch_msandscan_direction.stack.acquisition["bidirectional"]records whether the scan was interlaced, worked out from the frame timing.- Return type:
- Raises:
ValueError – If
folder_pathis not a folder, or the frames differ in shape.FileNotFoundError – If the folder has no
.jpkfiles.