Software for simulation and analysis of far-field diffraction patterns in transient grating spectroscopy

IF 3.9 2区 物理与天体物理 Q1 COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS
Computer Physics Communications Pub Date : 2026-03-01 Epub Date: 2025-11-25 DOI:10.1016/j.cpc.2025.109964
Andrii Goloborodko , Myhailo Kotov , Carles Serrat
{"title":"Software for simulation and analysis of far-field diffraction patterns in transient grating spectroscopy","authors":"Andrii Goloborodko ,&nbsp;Myhailo Kotov ,&nbsp;Carles Serrat","doi":"10.1016/j.cpc.2025.109964","DOIUrl":null,"url":null,"abstract":"<div><div>We present a software package for the simulation and analysis of far-field diffraction patterns in transient grating (TG) spectroscopy. The code is designed to assist both experimental planning and post-processing interpretation by modeling the optical response of TG configurations across a wide range of conditions. It supports input through structured MATLAB variables or Excel-based spreadsheets and provides automated consistency checks and visual output generation. The implementation includes integration over detector pixels, enabling realistic simulations that account for spatial averaging and resolution effects. We demonstrate the software’s capabilities through representative use cases, including the influence of the grating-to-sample distance, the pump-to-probe intensity ratio, and the selection of the division parameter governing pixel integration accuracy. The code is freely available and modular, facilitating its adaptation to different experimental geometries and beam conditions. While full validation is provided elsewhere, this work establishes the core methodology and illustrates the practical value of the tool for TG spectroscopy research.</div><div><strong>Program summary</strong></div><div><em>Program title</em>: TGCalc.</div><div><em>Licensing provisions</em>: GNU GPLv3.</div><div><em>Programming language</em>: MATLAB/GNU Octave.</div><div><em>Operating system</em>: Linux and Windows.</div><div><em>Nature of problem</em>: The code has been developed to compute diffraction patterns of light in a transient grating geometry scheme. The output intensity distribution is calculated based on the diffraction integral in the Fresnel and Fraunhofer regimes. Together with the diffraction pattern, the spatial harmonics are obtained using a post-processing script based on the input data filename.</div><div><em>Solution method</em>: The diffraction image is calculated as the diffraction integral over the whole space of a Gaussian beam and normalized by its maximum value. For a Gaussian beam with a spherical approximation of the wavefront, an analytical expression of the electromagnetic field in the Fresnel and Fraunhofer regimes is developed, and a calculation code is implemented.</div><div><em>Additional comments</em>: The <span>TGCalc</span> script has been tested with MATLAB versions R2021a, R2022b, and R2024b. The script also works under GNU Octave software (tested with version 4.0.0). However, under GNU Octave, the matrix data writing could give an error due to the file writeout permissions.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"320 ","pages":"Article 109964"},"PeriodicalIF":3.9000,"publicationDate":"2026-03-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Computer Physics Communications","FirstCategoryId":"101","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0010465525004655","RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2025/11/25 0:00:00","PubModel":"Epub","JCR":"Q1","JCRName":"COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS","Score":null,"Total":0}
引用次数: 0

Abstract

We present a software package for the simulation and analysis of far-field diffraction patterns in transient grating (TG) spectroscopy. The code is designed to assist both experimental planning and post-processing interpretation by modeling the optical response of TG configurations across a wide range of conditions. It supports input through structured MATLAB variables or Excel-based spreadsheets and provides automated consistency checks and visual output generation. The implementation includes integration over detector pixels, enabling realistic simulations that account for spatial averaging and resolution effects. We demonstrate the software’s capabilities through representative use cases, including the influence of the grating-to-sample distance, the pump-to-probe intensity ratio, and the selection of the division parameter governing pixel integration accuracy. The code is freely available and modular, facilitating its adaptation to different experimental geometries and beam conditions. While full validation is provided elsewhere, this work establishes the core methodology and illustrates the practical value of the tool for TG spectroscopy research.
Program summary
Program title: TGCalc.
Licensing provisions: GNU GPLv3.
Programming language: MATLAB/GNU Octave.
Operating system: Linux and Windows.
Nature of problem: The code has been developed to compute diffraction patterns of light in a transient grating geometry scheme. The output intensity distribution is calculated based on the diffraction integral in the Fresnel and Fraunhofer regimes. Together with the diffraction pattern, the spatial harmonics are obtained using a post-processing script based on the input data filename.
Solution method: The diffraction image is calculated as the diffraction integral over the whole space of a Gaussian beam and normalized by its maximum value. For a Gaussian beam with a spherical approximation of the wavefront, an analytical expression of the electromagnetic field in the Fresnel and Fraunhofer regimes is developed, and a calculation code is implemented.
Additional comments: The TGCalc script has been tested with MATLAB versions R2021a, R2022b, and R2024b. The script also works under GNU Octave software (tested with version 4.0.0). However, under GNU Octave, the matrix data writing could give an error due to the file writeout permissions.
瞬态光栅光谱中远场衍射图样的模拟和分析软件
我们提出了一个用于模拟和分析瞬态光栅(TG)光谱远场衍射图的软件包。该代码旨在通过在广泛的条件下模拟TG配置的光学响应来协助实验计划和后处理解释。它支持通过结构化的MATLAB变量或基于excel的电子表格输入,并提供自动一致性检查和可视化输出生成。该实现包括探测器像素的集成,实现了考虑空间平均和分辨率影响的真实模拟。我们通过代表性的用例展示了软件的功能,包括光栅与样本距离的影响,泵与探针强度比,以及控制像素集成精度的分割参数的选择。代码是免费的和模块化的,便于其适应不同的实验几何形状和光束条件。虽然在其他地方提供了充分的验证,但这项工作建立了核心方法,并说明了热重光谱研究工具的实用价值。项目简介项目名称:TGCalc。许可条款:GNU GPLv3。编程语言:MATLAB/GNU Octave。操作系统:Linux、Windows。问题性质:该代码已开发计算光的衍射模式在瞬态光栅几何方案。根据菲涅耳区和弗劳恩霍夫区的衍射积分计算了输出光强分布。结合衍射图,利用基于输入数据文件名的后处理脚本获得空间谐波。求解方法:将衍射像计算为高斯光束在整个空间上的衍射积分,并按其最大值归一化。对于波前近似为球形的高斯光束,给出了菲涅耳和弗劳恩霍夫电磁场的解析表达式,并实现了计算程序。附加注释:TGCalc脚本已在MATLAB版本R2021a, R2022b和R2024b中进行了测试。该脚本也可以在GNU Octave软件下工作(使用版本4.0.0进行测试)。然而,在GNU Octave下,由于文件写权限,矩阵数据写入可能会产生错误。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Computer Physics Communications
Computer Physics Communications 物理-计算机:跨学科应用
CiteScore
12.10
自引率
3.20%
发文量
287
审稿时长
5.3 months
期刊介绍: The focus of CPC is on contemporary computational methods and techniques and their implementation, the effectiveness of which will normally be evidenced by the author(s) within the context of a substantive problem in physics. Within this setting CPC publishes two types of paper. Computer Programs in Physics (CPiP) These papers describe significant computer programs to be archived in the CPC Program Library which is held in the Mendeley Data repository. The submitted software must be covered by an approved open source licence. Papers and associated computer programs that address a problem of contemporary interest in physics that cannot be solved by current software are particularly encouraged. Computational Physics Papers (CP) These are research papers in, but are not limited to, the following themes across computational physics and related disciplines. mathematical and numerical methods and algorithms; computational models including those associated with the design, control and analysis of experiments; and algebraic computation. Each will normally include software implementation and performance details. The software implementation should, ideally, be available via GitHub, Zenodo or an institutional repository.In addition, research papers on the impact of advanced computer architecture and special purpose computers on computing in the physical sciences and software topics related to, and of importance in, the physical sciences may be considered.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书