What’s New in playNano 0.5.2¶
Release date: 2026-11-18
This is a bug-fix release, and upgrading is recommended for all users. It restores
loading of .asd files and .jpk/.spm folders with AFMReader 0.0.8, and fixes
several errors that gave wrong results without any warning: in frame alignment, in
analysis exports and in the playnano analyze command.
Before You Upgrade¶
Re-run
full_cross_correlationalignment.align_frameswithmethod="full_cross_correlation"found no drift on typical AFM data, so frames were left unaligned. Any results produced with this method should be regenerated.playnano analyzewrites to./outputby default. Without--output-folder, results now go to anoutputfolder in the current directory, as the help text always said. Scripts that expected the files in the current directory need updating.playnano guihas been removed. It never worked; useplaynano playto open the GUI.Your own scripts that use AFMReader directly need updating for AFMReader 0.0.8, whose loaders now return an
AFMScanobject instead of a tuple (see below).
Fixed¶
Loading data¶
AFMReader 0.0.8 Support: AFMReader 0.0.8 (released 18 Nov 2026) changed its loaders to return an
AFMScanobject instead of a tuple. With playNano 0.5.1, loading.asdfiles and.jpkor.spmfolders failed withTypeError: cannot unpack non-iterable AFMScan object. playNano now works with AFMReader 0.0.7 and 0.0.8 and gives identical data with both. The dependency is now bounded (afmreader>=0.0.7,<0.0.9), so a future AFMReader release cannot break loading without warning.
Frame alignment¶
Full Cross-Correlation:
align_frames(method="full_cross_correlation")returned zero shifts for any data with a height offset, which is usual for AFM. It now subtracts each frame’s mean, as the FFT method already did, and both methods find the same shifts.align_framesis now version 0.2.0.NaN Pixels: A single NaN pixel broke alignment.
align_framesshifted that frame by almost the whole image, androlling_frame_alignreturned a zero shift for every frame. This affected data with missing pixels and any stack aligned a second time aftermode="pad". NaN pixels are now ignored when finding shifts and kept in the output. A frame with no finite pixels raises a clearValueError.Border Mask After Cropping: With
mode="crop"ormode="crop_square", theborder_maskin the metadata had the wrong shape or covered the wrong region. It is now cropped with the same bounds as the frames.rolling_frame_alignis now version 0.1.1.
Analysis export¶
Truncated JSON: The analysis JSON written by
playnano analyze, the wizard andAnalysisPipeline.run(log_to=...)replaced anything nested more than six levels deep with"<... truncated depth 7 ...>", so every bounding box fromparticle_region_extractionwas lost. All values are now written.HDF5 Round Trip: Analysis HDF5 files now reload exactly as written. Before,
Nonecame back as'None', empty dicts as lists, floats as integers, and a key namedvaluescrashed the loader. Files from earlier versions still load.DBSCAN Results:
playnano analyzewithdbscan_clusteringfailed after the analysis had finished, so nothing was saved.Repeated Runs: Running a pipeline twice on the same stack kept results from earlier steps that were not repeated. Each run now starts fresh.
Output Paths:
AnalysisPipeline.run(log_to=...)now creates missing folders, andexport_analysis_to_jsonaccepts a bare filename such asresults.json.
Command line and GUI¶
Input Protection:
playnano analyzecould overwrite its input.h5bundle with the analysis results.analyze, the wizard andexport_bundlesnow refuse to write over the input file.Output Names: Names such as
exp_1.5nM_proteinare no longer cut at the first dot. Only known file extensions are removed.Paths Containing
--:playnano playno longer rejects paths such asrun--2/sample.h5-jpk.Wizard Errors: An unsupported export format no longer ends the wizard session.
Scale Bar:
--scale-bar-nm 0now switches the scale bar off instead of showing a 100 nm bar.Playback Speed: The default speed in
playnano playnow comes from the frame timing, so bidirectional scans no longer play at half speed. Series slower than 1 frame per second play at 5 fps.
Citation¶
Zenodo Archiving:
CITATION.cfffailed validation, so Zenodo could not archive 0.5.1. It now validates and includes the author’s ORCID.
Changed¶
export_bundlesraisesValueErrorfor an unsupported format instead of exiting the Python process, so scripts can handle the error.
Removed¶
The
playnano guisubcommand (useplaynano play).The broken
median_filterandparticle_detectentry points, which pointed to code that does not exist.
Updating Your Own AFMReader Code¶
If your notebooks or scripts call AFMReader directly, code such as
image, px_to_nm = load_spm(path, "Height Sensor")
fails with AFMReader 0.0.8. Either keep the previous version with
pip install "afmreader<0.0.8", or use the new attributes:
scan = load_spm(path, "Height Sensor")
image, px_to_nm = scan.image, scan.pixel_to_nanometre_scaling
For the full list of changes, see the Changelog.