@@ -4135,7 +4135,7 @@ def zModifySettings(self, fileName, mType, value):
41354135 full name of the settings file, including the path & extension
41364136 mType : string
41374137 a mnemonic that indicates which setting within the file is to
4138- be mdified . See the ZPL macro command "MODIFYSETTINGS" in the
4138+ be modified . See the ZPL macro command "MODIFYSETTINGS" in the
41394139 Zemax manual for a complete list of the ``mType`` codes
41404140 value : string or integer
41414141 the new data for the specified setting
@@ -4533,7 +4533,7 @@ def zOptimize(self, numOfCycles=0, algorithm=0, timeout=None):
45334533
45344534 See Also
45354535 --------
4536- zHammer(), zLoadMerit(), zsaveMerit (), zOptimize2()
4536+ zHammer(), zLoadMerit(), zSaveMerit (), zOptimize2()
45374537 """
45384538 cmd = "Optimize,{:1.2g},{:d}".format(numOfCycles,algorithm)
45394539 reply = self._sendDDEcommand(cmd, timeout)
@@ -7259,15 +7259,15 @@ def zGetPOP(self, settingsFile=None, displayData=False, txtFile=None,
72597259
72607260 # Point spacing
72617261 pts_line = line_list[_getFirstLineOfInterest(line_list, 'Point spacing')]
7262- pat = r'-?\d\.\d{4,6}[Ee][-\+]\d{3}'
7262+ pat = r'-?\d\.\d{4,6}[Ee][-\+]\d{2, 3}'
72637263 pts_x, pts_y = [float(i) for i in _re.findall(pat, pts_line)]
72647264
72657265 width_x = pts_x*grid_x
72667266 width_y = pts_y*grid_y
72677267
72687268 if data_is_irr:
72697269 # Peak Irradiance and Total Power
7270- pat_i = r'-?\d\.\d{4,6}[Ee][-\+]\d{3}' # pattern for P. Irr, T. Pow,
7270+ pat_i = r'-?\d\.\d{4,6}[Ee][-\+]\d{2, 3}' # pattern for P. Irr, T. Pow,
72717271 peakIrr, totPow = None, None
72727272 pi_tp_line = _getFirstLineOfInterest(line_list, 'Peak Irradiance')
72737273 if pi_tp_line: # Transfer magnitude doesn't have Peak Irradiance info
@@ -7293,7 +7293,7 @@ def zGetPOP(self, settingsFile=None, displayData=False, txtFile=None,
72937293 # Pilot_size, Pilot_Waist, Pos, Rayleigh [... available for
72947294 # both Phase and Irr data]
72957295 pat_fe = r'\d\.\d{6}' # pattern for fiber efficiency
7296- pat_pi = r'-?\d\.\d{4,6}[Ee][-\+]\d{3}' # pattern for Pilot size/waist
7296+ pat_pi = r'-?\d\.\d{4,6}[Ee][-\+]\d{2, 3}' # pattern for Pilot size/waist
72977297 pilotSize, pilotWaist, pos, rayleigh = None, None, None, None
72987298 pilot_line = line_list[_getFirstLineOfInterest(line_list, 'Pilot')]
72997299 p_size_info, p_waist_info, p_pos_info, p_rayleigh_info = pilot_line.split(',')
@@ -7328,7 +7328,7 @@ def zGetPOP(self, settingsFile=None, displayData=False, txtFile=None,
73287328
73297329 if displayData:
73307330 # Get the 2D data
7331- pat = (r'(-?\d\.\d{4,6}[Ee][-\+]\d{3}\s*)' + r'{{{num}}}'
7331+ pat = (r'(-?\d\.\d{4,6}[Ee][-\+]\d{2, 3}\s*)' + r'{{{num}}}'
73327332 .format(num=grid_x))
73337333 start_line = _getFirstLineOfInterest(line_list, pat)
73347334 powerGrid = _get2DList(line_list, start_line, grid_y)
@@ -7825,7 +7825,7 @@ def zGetPSF(self, which='fft', settingsFile=None, txtFile=None,
78257825 ctr_ref_line = line_list[_getFirstLineOfInterest(line_list, 'Center coordinates')]
78267826 else:
78277827 ctr_ref_line = line_list[_getFirstLineOfInterest(line_list, 'Reference Coordinates')]
7828- ctr_ref_x, ctr_ref_y = [float(i) for i in _re.findall('-?\d\.\d{4,10}[Ee][-\+]\d{3}', ctr_ref_line)]
7828+ ctr_ref_x, ctr_ref_y = [float(i) for i in _re.findall('-?\d\.\d{4,10}[Ee][-\+]\d{2, 3}', ctr_ref_line)]
78297829 img_grid_line = line_list[_getFirstLineOfInterest(line_list, 'Image grid size')]
78307830 img_grid_x, img_grid_y = [int(i) for i in _re.findall(r'\d{2,5}', img_grid_line)]
78317831 pupil_grid_line = line_list[_getFirstLineOfInterest(line_list, 'Pupil grid size')]
@@ -7834,7 +7834,7 @@ def zGetPSF(self, which='fft', settingsFile=None, txtFile=None,
78347834 center_point_x, center_point_y = [int(i) for i in _re.findall(r'\d{2,5}', center_point_line)]
78357835
78367836 # The 2D data
7837- pat = (r'(-?\d\.\d{4,6}[Ee][-\+]\d{3}\s*)' + r'{{{num}}}'
7837+ pat = (r'(-?\d\.\d{4,6}[Ee][-\+]\d{2, 3}\s*)' + r'{{{num}}}'
78387838 .format(num=img_grid_x))
78397839 start_line = _getFirstLineOfInterest(line_list, pat)
78407840 psfGridData = _get2DList(line_list, start_line, img_grid_y)
0 commit comments