ARTICLE DETAIL

资讯详情

深耕编程入门与网站建设的一线实战洞察。

prysm处理相位图

prysm处理相位图 文章目录加载数据孔径内分析加载数据prysm提供了干涉仪类用相位图的后处理。在其sample_data中贴心地提供了Zygo干涉仪的测量数据其地址为https://github.com/brandondube/prysm/raw/master/sample_files/其中的【valid_zygo_dat_file.dat】即为干涉仪数据如下图所示代码如下fromprysm.interferogramimportInterferogramfromprysm.sample_dataimportsample_filesfrommatplotlibimportpyplotasplt plt.rcParams[font.sans-serif]Times New Romanpathsample_files(dat)interfInterferogram.from_zygo_dat(path)interf.plot2d()plt.show()孔径内分析在干涉测量中通常用PV值和RMS来衡量光学表面的不平整度 但是在上图中边缘处的落差非常大且测量数据中还有Nan值为此需要对上述图像做进一步处理步骤如下第一步是把有效数据筛选出来即无效部分置Nan第二步将有效数据从网格中抠出来第三步是去除倾斜等操作代码如下fromprysm.geometryimportcircle interf.recenter()interf.mask(circle(12,interf.r))interf.plot2d(axplt.subplot(131))interf.crop()interf.plot2d(interpolationbilinear,axplt.subplot(132))interf.recenter()interf.remove_piston()interf.remove_tiptilt()interf.remove_power()interf.plot2d(interpolationbilinear,axplt.subplot(133))plt.show()【mask】用于掩膜功能是把掩膜区域之外的数据置为Nan【crop】用一个选框将非Nan数据截取出来。【remove_piston】和【remove_tiptilt】分别去除像差的活塞和倾斜项。【remove_power】则通过最小二乘法去除数据中的功率项。在经过这些处理之后PV和RMS值如下单位是nm。interf.pv# np.float64(76.201950828473)interf.rms# np.float64(25.75297772229068)
返回列表