Repository navigation
v0.5.2
This release restores loading of .asd files and .jpk/.spm folders with AFMReader 0.0.8 and fixes silent errors in frame alignment and analysis export. playnano analyze now writes to ./output by default and playnano gui is removed.
Upgrade: pip install -U playnano
Important
- AFMReader 0.0.8 (released 18 Nov 2026) broke loading of
.asdfiles and.jpk/.spmfolders in playNano 0.5.1. This release fixes it. If you can't upgrade yet,pip install "afmreader<0.0.8"keeps 0.5.1 working. - Re-run any alignment done with
method="full_cross_correlation". It found no drift on typical AFM data, so frames were left unaligned (#86). playnano analyzenow writes to./outputby default, andplaynano gui(which never worked) is removed; useplaynano play.
Highlights and examples: What's New in 0.5.2
Changed
playnano analyzeand the wizard's analysis export now write to./outputwhen no--output-folderis given, as the help text already said. Previously they wrote to the current folder (#84).export_bundlesraisesValueErrorfor an unsupported format instead of callingsys.exit(1), so scripts and the wizard can handle the error (#84).
Removed
- The
playnano guisubcommand. It always failed withAttributeErrorand was never documented; useplaynano playto open the GUI (#84). - The
median_filter(playnano.filters) andparticle_detect(playnano.analysis) entry points, which named functions and modules that do not exist (#84).
Fixed
.asdfiles and folders of.jpkor.spmfiles failed to load with AFMReader 0.0.8 (TypeError: cannot unpack non-iterable AFMScan object), because its loaders now return anAFMScanobject instead of a tuple. playNano now accepts both, and requiresafmreader>=0.0.7,<0.0.9, so a future AFMReader release cannot break loading without warning (#96).- Zenodo can archive releases again:
CITATION.cffnow validates (licence, citation type, affiliation and ORCID fixed). playnano analyzecould overwrite its input: run beside an.h5bundle with no output options, it replaced the bundle with the analysis results.analyze, the wizard's analysis export andexport_bundlesnow refuse to write over the input file, andanalyzechecks this before loading any data (#84).- Output names lost everything after the first dot that was not an extension:
exp_1.5nM_proteinbecameexp_1. Only known file extensions are now removed (#84). playnano playrejected any input path containing--, such asrun--2/sample.h5-jpk. Only a flag after a space (a sign of a broken Windows quote) is now rejected (#84).- An unsupported export format in the wizard ended the whole session. It now reports the error and carries on (#84).
playnano play --scale-bar-nm 0showed a 100 nm scale bar. The GUI now starts with the scale bar switched off (#84).- Default playback speed in
playnano playignored bidirectional scanning, so some videos played at half speed. It now comes from the frame timestamps or frame durations, and only falls back toline_rate. Series recorded slower than 1 fps (e.g. slow-scan AFM) play at 5 fps instead of in real time (#84). playnano analyzewithdbscan_clusteringfailed after the analysis had finished (TypeError: keys must be str, int, float, bool or None, not int64), so no results were saved. Cluster ids are now plain integers, and the JSON sanitizers convert NumPy dict keys (#85).- Analysis HDF5 files did not reload as written:
Nonecame back as'None', an empty dict as[],[0.0, 1.0]as integers, and a key namedvaluescrashed the loader.export_to_hdf5now records each value's type, andload_analysis_from_hdf5uses it to rebuild the original structure. Lists of numbers or strings now load as Python lists, not NumPy arrays. Files written by earlier versions still load as before (#85). - Running an analysis pipeline a second time on the same stack kept results from steps of the earlier run that were not repeated. Each run now starts with empty results (#85).
AnalysisPipeline.run(log_to=...)failed if the folder did not exist, andexport_analysis_to_jsonfailed for a bare filename such asresults.json(#85).- The analysis JSON written by
playnano analyze, the wizard andAnalysisPipeline.run(log_to=...)replaced anything nested more than six levels deep, including plain numbers, with"<... truncated depth 7 ...>". Every bounding box fromparticle_region_extractionwas lost this way. Values are now always written; the depth limit is 50 and applies to containers only, with a warning if it is ever reached (#90). align_frames(method="full_cross_correlation")found no drift (all-zero shifts) on data with a height offset, which is usual for AFM, so frames were left unaligned with no error. It now subtracts each frame's mean, as the FFT method already did, and both methods find the same shifts. Re-run any processing that used this method.align_framesis now version 0.2.0 (#86).- After
align_framesorrolling_frame_alignwithmode="crop", theborder_maskin the metadata kept the uncropped shape. Withmode="crop_square"it had the right shape but covered the wrong region. The mask is now cropped with the same bounds as the frames.rolling_frame_alignis now version 0.1.1 (#86). - A single NaN pixel broke frame alignment, with no error.
align_framesshifted that frame by almost the whole image, androlling_frame_alignreturned a zero shift for every frame. This affected any data with missing pixels and any stack aligned again aftermode="pad". NaN pixels are now ignored when finding shifts and kept in the output, and a frame with no finite pixels raisesValueError(#91).
What's Changed
- fix: make CITATION.cff valid for Zenodo by @derollins in #83
- fix(cli): protect analyze input and repair output naming, path check and play defaults by @derollins in #87
- Fixes the analysis export bugs in #85. by @derollins in #88
- fix(alignment): subtract mean in full cross-correlation and fix cropped border masks by @derollins in #89
- fix(analysis): stop the analysis JSON truncating nested values by @derollins in #92
- fix(alignment): ignore NaN pixels when finding frame shifts by @derollins in #93
- chore: store and check out all text files with LF line endings by @derollins in #95
- fix(io): support AFMReader 0.0.8 AFMScan results by @derollins in #97
- chore(release): prepare v0.5.2 by @derollins in #98
- Release v0.5.2 by @derollins in #99
Full Changelog: v0.5.1...v0.5.2