Ptychography has become an indispensable tool for high-resolution, non-destructive imaging using coherent light sources. The processing of ptychographic data critically depends on robust, efficient, and flexible computational reconstruction software. We introduce Pty-Chi, an open-source ptychographic reconstruction package built on PyTorch that unifies state-of-the-art analytical algorithms with automatic differentiation methods. Pty-Chi provides a comprehensive suite of reconstruction algorithms while supporting advanced experimental parameter corrections such as orthogonal probe relaxation and multislice modeling. Leveraging PyTorch as the computational backend ensures vendor-agnostic GPU acceleration, multi-device parallelization, and seamless access to modern optimizers. An object-oriented, modular design makes Pty-Chi highly extendable, enabling researchers to prototype new imaging models, integrate machine learning approaches, or build entirely new workflows on top of its core components. We demonstrate Pty-Chi's capabilities through challenging case studies that involve limited coherence, low overlap, and unstable illumination during scanning, which highlight its accuracy, versatility, and extensibility. With community-driven development and open contribution, Pty-Chi offers a modern, maintainable platform for advancing computational ptychography and for enabling innovative imaging algorithms at synchrotron facilities and beyond.
翻译:叠层衍射成像已成为利用相干光源进行高分辨率、非破坏性成像不可或缺的工具。叠层衍射数据的处理高度依赖于稳健、高效且灵活的计算重建软件。本文介绍Pty-Chi——一个基于PyTorch开发的开源叠层衍射重建软件包,它将最先进的分析算法与自动微分方法相统一。Pty-Chi提供了一套完整的重建算法,同时支持正交探针松弛和多层切片建模等高级实验参数校正。依托PyTorch作为计算后端,该软件包实现了与硬件厂商无关的GPU加速、多设备并行化,并能无缝接入现代优化器。其面向对象的模块化设计使Pty-Chi具备高度可扩展性,研究人员可在核心组件基础上构建新的成像模型原型、集成机器学习方法或开发全新工作流程。我们通过涉及有限相干性、低重叠度和扫描过程中照明不稳定等挑战性案例研究,展示了Pty-Chi在准确性、多功能性和可扩展性方面的优势。通过社区驱动开发和开放贡献模式,Pty-Chi为推进计算叠层衍射技术发展、在同步辐射装置及其他场景实现创新成像算法,提供了一个现代化且可维护的平台。