Optical system PSF ellipticity calculation method, system and electronic equipment
By setting the characteristic field of view and establishing dynamic links in the numerical calculation software, and using a high-precision centroid iterative calculation method, the problem of low efficiency in PSF ellipticity calculation of the large-field survey optical system is solved, and high-precision and high-speed calculation of PSF ellipticity is achieved. Automated calculations meet the accuracy requirements for dark matter detection.
Patent Information
- Application Number
- CN201911335553.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-23
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2039-12-23
AI Technical Summary
Existing technology is difficult to efficiently and automatically calculate the PSF ellipticity of a large-field survey optical system, resulting in low calculation accuracy and low efficiency, which cannot meet the high-precision requirements for dark matter detection.
By setting the characteristic field of view in the numerical calculation software and establishing a dynamic link with the optical system design software, the PSF data is obtained, and the high-precision centroid iterative calculation method is used to calculate the PSF energy centroid position, and then calculate the PSF ellipticity to achieve any number of features. High-speed automated calculation of field of view PSF ellipticity.
It improves the accuracy and efficiency of PSF ellipticity calculation, breaks through the limit of the number of fields of view set by optical design software, realizes high-speed automatic collection of PSF data, reduces redundant data, and improves calculation efficiency.
Smart Images

Figure CN111079072B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of astronomical optics technology, and more specifically, to a method, system and electronic equipment for calculating the PSF ellipticity of an optical system. Background Art
[0002] The detection of dark matter has always been one of the key research directions in the field of astronomical observation. At present, the detection of dark matter is indirectly measured through the weak gravitational lensing effect, in which the light from distant celestial bodies is gravitationally deflected by all matter (including dark matter) on the path. The weak gravitational lensing effect will cause the shape of galaxies to change. In the field of astronomical observation, "ellipticity" is used to measure the degree of change in the shape of galaxies during the dark matter detection process.
[0003] The point spread function (PSF) ellipticity of an optical system is used to characterize the shape of the PSF of the optical system. The smaller the ellipticity value, the more circularly symmetrical the PSF shape is. Since the ellipticity correlation change of the observed galaxies caused by the weak gravitational lens effect is very small, the PSF ellipticity of the astronomical observation system itself is required to be no more than 15%. The PSF ellipticity of the optical system determines the measurement accuracy of the weak gravitational lens effect. The high-precision calculation of the PSF ellipticity of the optical system is the key to the accurate detection of dark matter.
[0004] At present, many domestic and foreign literatures have reported the definition of the PSF ellipticity of the optical system. According to the definition, the size of the PSF ellipticity of the optical system can be estimated. However, for large-field survey optical systems, in order to describe the PSF ellipticity characteristics of the optical system within the full field of view, it is necessary to collect PSF data of thousands of characteristic fields on the image plane for calculation. At the same time, in order to ensure the calculation accuracy, the sampling interval, sampling grid size, pupil light number, etc. of the PSF data must be strictly controlled. Since the optical design software can only collect PSF data of no more than 25 characteristic fields of view at the same time, it takes a lot of manpower and time to complete the PSF data collection of thousands of characteristic field points. Moreover, the error of calculating the ellipticity value based only on the basic definition of the PSF ellipticity is large, and it is impossible to evaluate the PSF ellipticity characteristics of large-field survey optical systems with high precision and accuracy. Summary of the invention
[0005] The purpose of the present invention is to provide a method, system and electronic device for calculating the PSF ellipticity of an optical system in order to solve the technical problems existing in the prior art, which can efficiently and automatically calculate the PSF ellipticity of any number of optical systems.
[0006] In order to solve the above problems, the technical solution adopted by the present invention is:
[0007] A method for calculating the PSF ellipticity of an optical system, the steps of the calculation method are as follows:
[0008] Step a: In the numerical calculation software, set the characteristic field of view;
[0009] Step b: Establish a dynamic link between the numerical calculation software and the optical system design software, and open the optical system design file;
[0010] Step c: acquiring an optical system PSF data file and obtaining PSF data according to the optical system design file;
[0011] Step d: Calculate the PSF energy centroid position based on the obtained PSF data;
[0012] Step e: Calculate two components e1 and e2 of the optical system ellipticity according to the energy centroid position, and obtain the PSF ellipticity;
[0013] Step f: Repeat steps c to e to obtain the PSF ellipticity of all feature fields of view in step a.
[0014] Furthermore, the step b specifically includes the following:
[0015] Step S21: calling the optical system design software through the numerical calculation software to establish a dynamic link between the two;
[0016] Step S22: setting the file path of the optical system data;
[0017] Step S23: starting the optical system design software in the numerical calculation software, and performing parameter setting and option control on the optical system design data;
[0018] Step S24: Open the corresponding optical system design file according to the set file path.
[0019] Furthermore, the step c specifically includes the following:
[0020] Step S31: setting the characteristic field of view of the optical system data by numerical calculation software according to the characteristic field of view range and field of view interval of the characteristic field of view;
[0021] Step S32: start the PSF option, set or modify the sampling information of the PSF;
[0022] Step S33: Setting the storage path of the PSF data file;
[0023] Step S34: according to the storage path, executing the PSF data extraction and storage command, extracting and storing the PSF data of the characteristic field of view.
[0024] Furthermore, the step d specifically includes the following:
[0025] Step S41: Setting the PSF data file reading path;
[0026] Step S42: reading the PSF data file according to the reading path to obtain basic parameters and energy distribution data of the PSF;
[0027] Step S43: According to the basic parameters and energy distribution data of the PSF, a high-precision centroid iteration calculation method is used to obtain the energy centroid position of the PSF.
[0028] Furthermore, in step S43, the specific process of calculating the energy centroid position includes:
[0029] Step S431: Select the position with the largest value in the PSF energy distribution data as the initial position for calculating the energy centroid position;
[0030] Step S432: taking the initial position as the center and the distance as the weighted weight, calculating the average value of all energy centroid positions in the PSF data as the new energy centroid position;
[0031] Step S433: taking the new energy centroid position obtained in step S432 as the initial position, and continuously repeating the calculation process of step S432;
[0032] Step S433: The average value of the energy centroid position calculated for the last time in step S433 is determined as the energy centroid position of the characteristic field of view point.
[0033] Furthermore, the step e specifically includes the following:
[0034] Step S51: taking the determined energy centroid as the circle center, setting the valid data range and obtaining valid calculation data;
[0035] Step S52: Calculate the two components e1 and e2 of the ellipticity through the effective calculation data, and obtain the PSF ellipticity; the specific calculation process is as follows:
[0036] If the horizontal and vertical coordinates of the PSF data are x 1 and x 2 , the PSF energy at this coordinate is I(x 1 ,x 2 ), then the total PSF energy is defined as F:
[0037] F = ∫I(x 1 ,x 2 )d 2 x (1)
[0038] According to formula (1), the centroid of PSF energy is obtained i = 1 or 2, as shown in formula (2):
[0039]
[0040] According to formula (1) and formula (2), the second-order moment Q is obtained ij , i = 1 or 2, j = 1 or 2, as shown in formula (3):
[0041]
[0042] According to formula (3), the two components of the ellipticity, e1 and e2, are obtained, and the PSF ellipticity is obtained, as shown in formula (4):
[0043]
[0044] An optical system PSF ellipticity calculation system, the system comprising:
[0045] Feature field of view setting module: used to set the feature field of view in the numerical calculation software;
[0046] Dynamic link establishment module: used to establish a dynamic link between numerical calculation software and optical design software, and start the optical system design software in the numerical calculation software to open the optical system design file;
[0047] A PSF data acquisition module is used to acquire the optical system PSF data file according to the optical system design file, and to extract and store the PSF data of the characteristic field of view;
[0048] Energy centroid position calculation module: used to obtain the basic parameters and energy distribution data of PSF according to the PSF data file of the optical system, and calculate the energy centroid position of PSF;
[0049] PSF ellipticity calculation module: used to calculate the two components e1 and e2 of the optical system ellipticity according to the energy centroid position, and obtain the PSF ellipticity.
[0050] Furthermore, it is characterized in that: the energy centroid position calculation module adopts a high-precision centroid iterative calculation method to obtain the PSF energy centroid position, which specifically includes the following:
[0051] Initial position selection module: used to select the position with the largest value in the PSF energy distribution data as the initial position for energy centroid position calculation;
[0052] Average value calculation module: used to take the initial position as the center and the distance as the weighted weight, calculate the average value of all energy centroid positions in the PSF data as the new energy centroid position, and take the new energy centroid position as the initial position to repeat the calculation process;
[0053] Energy centroid position determination module: determines the average value of the energy centroid position calculated last time in the average value calculation module as the energy centroid position of the characteristic field of view point.
[0054] Furthermore, the PSF ellipticity calculation module specifically includes the following:
[0055] Valid data range setting module: used to set the PSF valid data range with the determined energy centroid as the center of the circle, and obtain the valid calculation data therein.
[0056] Calculation module: used to calculate the two components of ellipticity, e1 and e2, based on valid data, and obtain the PSF ellipticity; the specific process is as follows:
[0057] If the horizontal and vertical coordinates of the PSF data are x 1 and x 2 , the PSF energy at this coordinate is I(x 1 ,x 2 ), then the total PSF energy is defined as F:
[0058] F = ∫I(x 1 ,x 2 )d 2 x (1)
[0059] According to formula (1), the centroid of PSF energy is obtained i = 1 or 2, as shown in formula (2):
[0060]
[0061] According to formula (1) and formula (2), the second-order moment Q is obtained ij , i = 1 or 2, j = 1 or 2, as shown in formula (3):
[0062]
[0063] According to formula (3), the two components of the ellipticity, e1 and e2, are obtained, and the PSF ellipticity is obtained, as shown in formula (4):
[0064]
[0065] An electronic device, comprising:
[0066] at least one processor; and
[0067] a memory communicatively connected to the at least one processor; wherein,
[0068] The memory stores instructions that can be executed by the one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the following operations of the optical system PSF ellipticity calculation method:
[0069] Step a: In the numerical calculation software, set the characteristic field of view;
[0070] Step b: Establish a dynamic link between the numerical calculation software and the optical system design software, and open the optical system design file;
[0071] Step c: acquiring an optical system PSF data file and obtaining PSF data according to the optical system design file;
[0072] Step d: Calculate the PSF energy centroid position based on the obtained PSF data;
[0073] Step e: Calculate two components e1 and e2 of the optical system ellipticity according to the energy centroid position, and obtain the PSF ellipticity;
[0074] Step f: Repeat steps c to e to obtain the PSF ellipticity of all feature fields of view in step a.
[0075] Compared with the prior art, the present invention has the following beneficial effects:
[0076] The present invention realizes interface-free parameter control of the optical system by using numerical calculation software to call the optical design software, and by establishing a dynamic link between the software, solves the problem of low efficiency in extracting and storing PSF data of multiple characteristic view points in a large field of view, breaks through the setting limit of the number of fields of view of the optical design software, and achieves the purpose of high-speed automatic collection of PSF data under different parameters, so that the efficiency of PSF ellipticity calculation is greatly improved. At the same time, a high-precision PSF centroid calculation method is adopted to obtain a high-precision PSF energy centroid position and extract PSF effective data, which can not only improve the calculation accuracy of PSF ellipticity, but also reduce redundant data, and further improve the calculation efficiency of PSF ellipticity. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] Figure 1 It is a flow chart of the method for calculating the PSF ellipticity of an optical system of the present invention.
[0078] Figure 2 A flow chart for establishing a dynamic link to open an optical system design file for the present invention.
[0079] Figure 3 The flowchart of the present invention for obtaining the PSF data file of the optical system.
[0080] Figure 4 Flow chart of the PSF energy centroid position of the present invention.
[0081] Figure 5 Flow chart of PSF ellipticity calculation of the present invention.
[0082] Figure 6 It is a schematic diagram of the optical system PSF ellipticity calculation system of the present invention.
[0083] Figure 7 Schematic diagram of the hardware device structure of the optical system PSF ellipticity calculation method of the present invention. DETAILED DESCRIPTION
[0084] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. The preferred embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive.
[0085] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0086] See also Figure 1 As shown, the present invention provides a method for calculating the PSF ellipticity of an optical system, and the steps of the calculation method are as follows:
[0087] Step S1: According to the focal length, field of view and other parameters of the optical system, the characteristic field of view is set in the numerical calculation software, including the characteristic field of view range, the angle between the characteristic field of view points or the field of view interval.
[0088] In this step S1, the characteristic field of view range is the entire field of view, half the field of view, or a quarter of the field of view of the optical system, the number of characteristic field of view points within the characteristic field of view range is not less than 5×5, and the field of view interval is obtained according to the number of fields of view, the field of view size, and the characteristic field of view range.
[0089] In step S1, the numerical calculation software adopts one or more of MATLAB, Mathematica or other software. The optical system includes but is not limited to a refractive system, a reflective system, a catadioptric system and a diffractive system.
[0090] Step S2: Establish a dynamic link between the numerical calculation software and the optical system design software, open the optical system design file, and refer to Figure 2 As shown, specifically including the following:
[0091] Step S21: Calling the optical system design software through the numerical calculation software, establishing a dynamic link between the numerical calculation software and the optical system design software, and realizing the control of the sky survey optical system through the numerical calculation software. Among them, the optical system design software includes CODEV, ZEMAX, and OSLO.
[0092] Step S22: Setting the file path of the optical system data.
[0093] Step S23: by writing program codes in the numerical calculation software and starting the optical system design software in the numerical calculation software according to the category and version number of the optical system design software, parameter setting and option control of the optical system design data without an operation interface are realized.
[0094] Step S24: Open the corresponding optical system design file according to the set file path.
[0095] Step S3: According to the optical system design file, obtain the optical system PSF data file, and complete the extraction and storage of the PSF data of the characteristic field of view. Figure 3 As shown, specifically including the following:
[0096] Step S31: according to the characteristic field of view range and field of view interval obtained in step S1, the characteristic field of view is set for the optical system data through numerical calculation software; the number of the characteristic fields of view is not limited and can be any number.
[0097] Step S32: Start the PSF option and set or modify the sampling information of the PSF according to the calculation accuracy requirements, including the sampling interval, sampling grid size and the number of pupil rays.
[0098] In this step S32, there is a mutual constraint relationship between the sampling interval, the sampling grid size and the number of pupil rays. The sampling interval is 0.1 μm to 1 μm, the sampling grid size is 128×128 to 4096×4096, and the number of pupil rays is not less than 32.
[0099] Step S33: Setting the storage path of the PSF data file according to the format and content of the data.
[0100] Step S34: according to the storage path, executing the PSF data extraction and storage command, extracting and storing the PSF data of the characteristic field of view.
[0101] Step S4: Calculate the PSF energy centroid position according to the optical system PSF data file obtained in step S3, see Figure 4 As shown, specifically including the following:
[0102] Step S41: Setting the PSF data file reading path.
[0103] Step S42: Read the PSF data file according to the reading path to obtain basic parameters and energy distribution data of the PSF.
[0104] Step S43: A high-precision centroid iteration calculation method is used to obtain the energy centroid position of the PSF. The obtained energy centroid position accuracy is at least 2 orders of magnitude better than the minimum PSF sampling interval, thereby improving the calculation accuracy of the PSF ellipticity of the optical system.
[0105] In step S43, the calculation process of the PSF energy centroid position is as follows:
[0106] Step S431: Select the position with the largest value in the PSF energy distribution data as the initial position for calculating the energy centroid position;
[0107] Step S432: taking the initial position as the center and the distance as the weighted weight, calculating the average value of all energy centroid positions in the PSF data as the new energy centroid position;
[0108] Step S433: taking the new energy centroid position obtained in step S432 as the initial position, and repeating the calculation process of step S432. In this embodiment, the number of repetitions is 10 to 50 times.
[0109] Step S433: The average value of the energy centroid position calculated for the last time in step S433 is determined as the energy centroid position of the characteristic field of view point.
[0110] Step S5: According to the energy centroid position obtained in step S4, the two components e1 and e2 of the optical system ellipticity are calculated, and the PSF ellipticity is obtained. Figure 5 As shown, specifically including the following:
[0111] Step S51: setting a valid data range and obtaining valid calculation data, taking the determined energy centroid as the center of the circle, setting a PSF valid data range, and obtaining valid calculation data therein.
[0112] In this step S51, according to the pixel angular resolution of the optical system, a range of 5 to 15 times its size is taken as the PSF effective data range. By eliminating redundant data outside the effective data range so that it does not participate in the calculation of the ellipticity, the influence of the error of the redundant data on the calculation accuracy of the PSF ellipticity is avoided, the calculation accuracy of the PSF ellipticity is improved, and at the same time, the calculation efficiency of the PSF ellipticity is also improved.
[0113] Step S52: According to the effective calculation data and the definition of ellipticity, two components e1 and e2 of ellipticity are obtained by quadrupole calculation, and PSF ellipticity is obtained. The specific calculation process is as follows:
[0114] If the PSF energy distribution on the image plane is I(x 1 ,x 2 ), x 1 and x 2 is the horizontal and vertical coordinates of the PSF data, both are independent variables, I(x 1 ,x 2 ) represents the PSF energy at this coordinate, then the total PSF energy can be defined as F:
[0115] F = ∫I(x 1 ,x 2 )d 2 x (1)
[0116] According to formula (1), the centroid of PSF energy is obtained i = 1 or 2, as shown in formula (2):
[0117]
[0118] According to formula (1) and formula (2), the second-order moment Q is obtained ij , i = 1 or 2, j = 1 or 2, as shown in formula (3):
[0119]
[0120] According to formula (3), the two components of the ellipticity, e1 and e2, are obtained, and the PSF ellipticity is obtained, as shown in formula (4):
[0121]
[0122] Step S6: Repeat steps S3 to S5 to calculate the PSF ellipticity of all characteristic fields of view within the characteristic field of view range described in step S1.
[0123] See also Figure 6 As shown, the present invention also provides an optical system PSF ellipticity calculation system, the system comprising:
[0124] Feature field of view setting module: used in numerical calculation software to set the feature field of view, including the feature field of view range, and the angle or field of view interval between feature field of view points, according to the focal length, field of view and other parameters of the optical system.
[0125] Dynamic link establishment module: used to establish a dynamic link between numerical calculation software and optical design software, start the optical system design software in the numerical calculation software, and open the optical system design file.
[0126] The PSF data acquisition module is used to acquire the optical system PSF data file according to the optical system design file, and to extract and store the PSF data of the characteristic field of view.
[0127] Energy centroid position calculation module: used to obtain the basic parameters and energy distribution data of PSF according to the PSF data file of the optical system, and calculate the energy centroid position of PSF.
[0128] PSF ellipticity calculation module: used to calculate the two components e1 and e2 of the optical system ellipticity according to the energy centroid position, and obtain the PSF ellipticity.
[0129] In the above, the energy centroid position calculation module adopts a high-precision centroid iterative calculation method, and the calculation process specifically includes the following:
[0130] Initial position selection module: used to select the position with the largest value in the PSF energy distribution data as the initial position for calculating the energy centroid position.
[0131] Average value calculation module: used to take the initial position as the center and the distance as the weighted weight, calculate the average value of all energy centroid positions in the PSF data as the new energy centroid position, and take the new energy centroid position as the initial position to repeat the calculation process.
[0132] Energy centroid position determination module: determines the average value of the energy centroid position calculated last time in the average value calculation module as the energy centroid position of the characteristic field of view point.
[0133] In the above, the PSF ellipticity calculation module specifically includes the following:
[0134] Valid data range setting module: used to take the determined energy centroid as the center of the circle, and according to the pixel angular resolution of the optical system, take a range of 5 to 15 times the size as the PSF valid data range, and obtain the valid calculation data therein.
[0135] Calculation module: used to calculate the two components of ellipticity, e1 and e2, based on valid data, and obtain the PSF ellipticity; the specific process is as follows:
[0136] If the PSF energy distribution on the image plane is I(x 1 ,x 2 ), x 1 and x 2 is the horizontal and vertical coordinates of the PSF data, both are independent variables, I(x 1 ,x 2 ) represents the PSF energy at this coordinate, then the total PSF energy can be defined as F:
[0137] F = ∫I(x 1 ,x 2 )d 2 x (1)
[0138] According to formula (1), the centroid of PSF energy is obtained i = 1 or 2, as shown in formula (2):
[0139]
[0140] According to formula (1) and formula (2), the second-order moment Q is obtained ij , i = 1 or 2, j = 1 or 2, as shown in formula (3):
[0141]
[0142] According to formula (3), the two components of the ellipticity, e1 and e2, are obtained, and the PSF ellipticity is obtained, as shown in formula (4):
[0143]
[0144] Figure 7 Schematic diagram of the hardware device structure of the optical system PSF ellipticity calculation method provided in the embodiment of the present application. Figure 7 As shown, the device includes one or more processors and a memory. Taking a processor as an example, the device may also include: an input system and an output system.
[0145] The processor, memory, input system and output system can be connected through a bus or other means. Figure 7 The example of connecting through bus is taken in the following.
[0146] The memory is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs, non-transitory computer executable programs and modules. The processor executes various functional applications and data processing of the electronic device by running the non-transitory software programs, instructions and modules stored in the memory, that is, the processing method of the above method embodiment is implemented.
[0147] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processing system via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0148] The input system can receive input digital or character information and generate signal input. The output system can include display devices such as display screens.
[0149] The one or more modules are stored in the memory, and when executed by the one or more processors, perform the following operations of any of the above method embodiments:
[0150] Step a: In the numerical calculation software, set the characteristic field of view;
[0151] Step b: Establish a dynamic link between the numerical calculation software and the optical system design software, and open the optical system design file;
[0152] Step c: acquiring an optical system PSF data file and obtaining PSF data according to the optical system design file;
[0153] Step d: Calculate the PSF energy centroid position based on the obtained PSF data;
[0154] Step e: Calculate two components e1 and e2 of the optical system ellipticity according to the energy centroid position, and obtain the PSF ellipticity;
[0155] Step f: Repeat steps c to e to obtain the PSF ellipticity of all feature fields of view in step a.
[0156] The above-mentioned product can execute the method provided in the embodiment of the present application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, please refer to the method provided in the embodiment of the present application.
[0157] The embodiment of the present application provides a non-transitory (non-volatile) computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can perform the following operations:
[0158] Step a: In the numerical calculation software, set the characteristic field of view;
[0159] Step b: Establish a dynamic link between the numerical calculation software and the optical system design software, and open the optical system design file;
[0160] Step c: acquiring an optical system PSF data file and obtaining PSF data according to the optical system design file;
[0161] Step d: Calculate the PSF energy centroid position based on the obtained PSF data;
[0162] Step e: Calculate two components e1 and e2 of the optical system ellipticity according to the energy centroid position, and obtain the PSF ellipticity;
[0163] Step f: Repeat steps c to e to obtain the PSF ellipticity of all feature fields of view in step a.
[0164] An embodiment of the present application provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, and when the program instructions are executed by a computer, the computer performs the following operations:
[0165] Step a: In the numerical calculation software, set the characteristic field of view;
[0166] Step b: Establish a dynamic link between the numerical calculation software and the optical system design software, and open the optical system design file;
[0167] Step c: acquiring an optical system PSF data file and obtaining PSF data according to the optical system design file;
[0168] Step d: Calculate the PSF energy centroid position based on the obtained PSF data;
[0169] Step e: Calculate two components e1 and e2 of the optical system ellipticity according to the energy centroid position, and obtain the PSF ellipticity;
[0170] Step f: Repeat steps c to e to obtain the PSF ellipticity of all feature fields of view in step a.
[0171] The optical system PSF ellipticity calculation method, system and electronic device provided by the present invention, by establishing dynamic links between different types of software, based on the powerful programming ability of numerical calculation software and the high-speed calculation ability of large amounts of data, make up for the shortcomings of optical design software in terms of limited number of fields of view and manual control required for PSF data acquisition, and realize interface-free, high-speed and automated PSF ellipticity calculation of any number of characteristic fields of view, and greatly improve the efficiency and accuracy of PSF ellipticity calculation.
[0172] The present invention is also applicable to other detection systems or imaging optical systems that have higher requirements on PSF ellipticity.
[0173] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. A method for calculating the PSF ellipticity of an optical system, characterized in that: The method includes: Step a: In the numerical calculation software, set the characteristic field of view; Step b: Establish a dynamic link between the numerical calculation software and the optical system design software, and open the optical system design file; Step c: acquiring an optical system PSF data file and obtaining PSF data according to the optical system design file; Step d: Calculate the PSF energy centroid position based on the obtained PSF data; Step e: Calculate two components e1 and e2 of the optical system ellipticity according to the energy centroid position, and obtain the PSF ellipticity; Step f: Repeat steps c to e to obtain the PSF ellipticity of all feature fields in step a; The step c specifically comprises: Step S31: setting the characteristic field of view of the optical system data by numerical calculation software according to the characteristic field of view range and field of view interval of the characteristic field of view; Step S32: start the PSF option, set or modify the sampling information of the PSF; Step S33: Setting the storage path of the PSF data file; Step S34: executing a PSF data extraction and storage command according to the storage path to extract and store the PSF data of the characteristic field of view; Step d specifically includes: Step S41: Setting the PSF data file reading path; Step S42: reading the PSF data file according to the reading path to obtain basic parameters and energy distribution data of the PSF; Step S43: According to the basic parameters and energy distribution data of the PSF, a high-precision centroid iteration calculation method is used to obtain the energy centroid position of the PSF.
2. The method for calculating the PSF ellipticity of an optical system according to claim 1, characterized in that: The step b specifically comprises: Step S21: calling the optical system design software through the numerical calculation software to establish a dynamic link between the two; Step S22: setting the file path of the optical system data; Step S23: starting the optical system design software in the numerical calculation software, and performing parameter setting and option control on the optical system design data; Step S24: Open the corresponding optical system design file according to the set file path.
3. The method for calculating the PSF ellipticity of an optical system according to claim 2, characterized in that: The step S43 comprises: Step S431: Select the position with the largest value in the PSF energy distribution data as the initial position for calculating the energy centroid position; Step S432: taking the initial position as the center and the distance as the weighted weight, calculating the average value of all energy centroid positions in the PSF data as the new energy centroid position; Step S433: taking the new energy centroid position obtained in step S432 as the initial position, and continuously repeating the calculation process of step S432; Step S433: Determine the average value of the energy centroid position calculated for the last time in step S433 as the energy centroid position of the characteristic field of view point.
4. The method for calculating the PSF ellipticity of an optical system according to claim 3, characterized in that: The step e specifically comprises: Step S51: taking the determined energy centroid as the circle center, setting the valid data range and obtaining valid calculation data; Step S52: Calculate the two components e1 and e2 of the ellipticity through the effective calculation data, and obtain the PSF ellipticity; the specific calculation process is as follows: If the horizontal and vertical coordinates of the PSF data are x1 and x2, and the PSF energy at these coordinates is I(x1,x2), then the total PSF energy is defined as F: F=∫I(x1,x2)d 2 x (1) According to formula (1), the centroid of PSF energy is obtained i = 1 or 2, as shown in formula (2): According to formula (1) and formula (2), the second-order moment Q is obtained ij , i = 1 or 2, j = 1 or 2, as shown in formula (3): According to formula (3), the two components of the ellipticity, e1 and e2, are obtained, and the PSF ellipticity is obtained, as shown in formula (4):
5. An optical system PSF ellipticity calculation system using the optical system PSF ellipticity calculation method of claim 1, characterized in that: The system includes: Feature field of view setting module: used to set the feature field of view in the numerical calculation software; Dynamic link establishment module: used to establish a dynamic link between numerical calculation software and optical design software, and start the optical system design software in the numerical calculation software to open the optical system design file; A PSF data acquisition module is used to acquire the optical system PSF data file according to the optical system design file, and extract and store the PSF data of the characteristic field of view; Energy centroid position calculation module: used to obtain the basic parameters and energy distribution data of PSF according to the PSF data file of the optical system, and calculate the energy centroid position of PSF; PSF ellipticity calculation module: used to calculate the two components e1 and e2 of the optical system ellipticity according to the energy centroid position, and obtain the PSF ellipticity.
6. The optical system PSF ellipticity calculation system according to claim 5, characterized in that: The energy centroid position calculation module uses a high-precision centroid iterative calculation method to obtain the PSF energy centroid position, including: Initial position selection module: used to select the position with the largest value in the PSF energy distribution data as the initial position for energy centroid position calculation; Average value calculation module: used to take the initial position as the center and the distance as the weighted weight, calculate the average value of all energy centroid positions in the PSF data as the new energy centroid position, and take the new energy centroid position as the initial position to repeat the calculation process; Energy centroid position determination module: determines the average value of the energy centroid position calculated last time in the average value calculation module as the energy centroid position of the characteristic field of view point.
7. The optical system PSF ellipticity calculation system according to claim 6, characterized in that: The PSF ellipticity calculation module specifically includes: Valid data range setting module: used to set the PSF valid data range by taking the determined energy mass center as the circle center, and obtain the valid calculation data therein; Calculation module: used to calculate the two components of ellipticity, e1 and e2, based on valid data, and obtain the PSF ellipticity; the specific process is as follows: If the horizontal and vertical coordinates of the PSF data are x1 and x2, and the PSF energy at these coordinates is I(x1,x2), then the total PSF energy is defined as F: According to formula (1), the centroid of PSF energy is obtained i = 1 or 2, as shown in formula (2): According to formula (1) and formula (2), the second-order moment Q is obtained ij , i = 1 or 2, j = 1 or 2, as shown in formula (3): According to formula (3), the two components of the ellipticity, e1 and e2, are obtained, and the PSF ellipticity is obtained, as shown in formula (4):
8. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the optical system PSF ellipticity calculation method described in any one of claims 1 to 4 above.
