Cosmic ray removal method and device, storage medium and electronic equipment

By normalizing and convolutional kernel processing of spectral data, combined with expansion and linear interpolation algorithms, the problem of low cosmic ray removal efficiency in the spectrum is solved, and the data accuracy and processing efficiency are improved.

CN119128384APending Publication Date: 2024-12-13奥谱天成(湖南)信息科技有限公司
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411246565.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The removal efficiency of cosmic rays in the prior art is low in spectral analysis, resulting in the impact of data accuracy, especially when processing high-resolution CCD astronomical images, the serial implementation efficiency of a single CPU is low.

Method used

By obtaining the initial signal intensity data in the original spectrogram for normalization, using a convolution kernel for second-order calculations, determining the ray threshold, and removing cosmic ray information, including cosmic rays and cosmic rays, through expansion operations and linear interpolation algorithms, are used to remove cosmic rays and cosmic rays. The point of interference.

Benefits of technology

It significantly improves the efficiency of cosmic ray removal in the spectrum, improves the accuracy and continuity of data, and ensures efficient processing capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128384A_ABST
    Figure CN119128384A_ABST
Patent Text Reader

Abstract

The invention discloses a cosmic ray removal method and device, a storage medium and electronic equipment. The method comprises the following steps: acquiring intensity data of an initial signal in an original spectrogram, and performing normalization processing on the intensity data of the initial signal to obtain target signal intensity data; performing second-order calculation on the target signal intensity data by using a convolution kernel to obtain calculated data; determining a ray threshold according to the calculated data; cosmic ray information is determined according to the ray threshold value, the cosmic ray information is removed, the cosmic ray information comprises at least one of cosmic rays and points interfered by the cosmic rays, and the points interfered by the cosmic rays are obtained through expansion operation. Through the method and the device, the problem of low removal efficiency of cosmic rays in a spectrum in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] At present, in spectral analysis, abnormal signals introduced by cosmic rays may interfere with the accuracy of data, leading to misjudgment or deviation. With the development and progress of imaging technology, the resolution of CCD astronomical images obtained is getting higher and higher, so the requirements for algorithms to eliminate cosmic rays are also getting higher and higher. For batch processing of large CCD astronomical images, the serial implementation efficiency of a single CPU is relatively low.

[0003] Currently, no effective solution has been proposed to the problem of low efficiency in removing cosmic rays from the spectrum in related technologies. Summary of the invention

[0004] The main purpose of the present application is to provide a method, device, storage medium and electronic device for removing cosmic rays, so as to solve the problem of low efficiency in removing cosmic rays in the spectrum in the related art.

[0005] In order to achieve the above-mentioned purpose, according to the first aspect of the present application, a method for removing cosmic rays is provided. The method comprises: obtaining the intensity data of the initial signal in the original spectrum, normalizing the intensity data of the initial signal to obtain the target signal intensity data; performing a second-order calculation on the target signal intensity data using a convolution kernel to obtain calculated data; determining a ray threshold according to the calculated data; determining cosmic ray information according to the ray threshold, and removing the cosmic ray information, wherein the cosmic ray information comprises at least one of the following: cosmic rays, points disturbed by cosmic rays, wherein the points disturbed by cosmic rays are obtained by an expansion operation.

[0006] Furthermore, the signal intensity data in the original spectrum graph is obtained, and the intensity data of the initial signal is normalized to obtain the target signal intensity data, including: determining the minimum data and the maximum data in the intensity data of the initial signal; normalizing the intensity data of the initial signal according to the minimum data and the maximum data to obtain the processed signal intensity data, which is the intensity data of the initial signal.

[0007] Furthermore, the intensity data of the initial signal is normalized according to the minimum data and the maximum data to obtain the target signal intensity data, including: subtracting the signal intensity of the minimum data from the initial signal intensity to translate the initial signal to obtain the translated initial signal; dividing the signal intensity of the maximum data from the signal intensity of the translated initial signal to scale the translated initial signal within a preset range to obtain the target signal intensity data.

[0008] Furthermore, a convolution kernel is used to perform a second-order calculation on the target signal strength data to obtain calculated data, including: performing a second-order derivation on an array of target signal strength data using a convolution kernel to obtain derived signal strength data; performing a data square calculation on the derived signal strength data to obtain squared signal strength data; and using the squared signal strength data as calculated data.

[0009] Furthermore, determining the ray threshold according to the calculated data includes: respectively calculating the mean and standard deviation of the squared signal strength data; and determining the ray threshold based on the mean and the standard deviation.

[0010] Furthermore, cosmic ray information is determined according to a ray threshold and the cosmic ray information is removed, including: when there is a value greater than the ray threshold in the squared signal intensity data, determining that the spectrum corresponding to the value is a cosmic ray, and determining points interfered by cosmic rays among points associated with cosmic rays through an expansion operation, and using the cosmic rays and the points interfered by cosmic rays as cosmic ray information; and removing the cosmic ray information through a linear interpolation algorithm.

[0011] Furthermore, the cosmic ray information is removed by a linear interpolation algorithm, including: marking the cosmic ray information to obtain marked cosmic ray information; and performing linear interpolation processing on the marked cosmic ray information to eliminate cosmic ray interference in the original spectrum.

[0012] In order to achieve the above-mentioned purpose, according to the second aspect of the present application, a cosmic ray removal device is provided. The device comprises: an acquisition unit, used to acquire the intensity data of the initial signal in the original spectrum, normalize the intensity data of the initial signal, and obtain the target signal intensity data; a calculation unit, used to perform a second-order calculation on the target signal intensity data using a convolution kernel to obtain the calculated data; a first determination unit, used to determine the ray threshold according to the calculated data; a second determination unit, used to determine the cosmic ray information according to the ray threshold, and remove the cosmic ray information, wherein the cosmic ray information comprises at least one of the following: cosmic rays, points disturbed by cosmic rays, wherein the points disturbed by cosmic rays are obtained by an expansion operation.

[0013] According to a third aspect of an embodiment of the present application, there is provided an electronic device, comprising: a processor; and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, any one of the above-mentioned methods for removing cosmic rays is implemented.

[0014] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for removing cosmic rays according to any one of the above items is implemented.

[0015] Through the present application, the following steps are adopted: obtaining the intensity data of the initial signal in the original spectrum, normalizing the intensity data of the initial signal, and obtaining the target signal intensity data; performing a second-order calculation on the target signal intensity data using a convolution kernel to obtain the calculated data; determining the ray threshold according to the calculated data; determining the cosmic ray information according to the ray threshold, and removing the cosmic ray information, wherein the cosmic ray information includes at least one of the following: cosmic rays, points disturbed by cosmic rays, wherein the points disturbed by cosmic rays are obtained by an expansion operation. Through the present application, the problem of low efficiency in removing cosmic rays from the spectrum in the related art is solved. By processing and analyzing the determined target signal intensity data, the cosmic ray information is identified. Thus, the effect of improving the removal efficiency of cosmic rays in the spectrum is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0017] Figure 1 is a flow chart of a method for removing cosmic rays provided in an embodiment of the present application;

[0018] Figure 2 is a schematic diagram including a cosmic ray spectrum provided according to an embodiment of the present application;

[0019] Figure 3 is a schematic diagram of spectrum normalization provided according to an embodiment of the present application;

[0020] Figure 4 is a schematic diagram of the spectrum of cosmic rays and nearby points provided according to an embodiment of the present application;

[0021] Figure 5 is a schematic diagram of a local spectrum of a cosmic ray at a point in its vicinity provided according to an embodiment of the present application;

[0022] Figure 6 is a schematic diagram of a spectrum after removing cosmic rays provided in an embodiment of the present application;

[0023] Figure 7 is a schematic diagram of another method for removing cosmic rays provided according to an embodiment of the present application;

[0024] Figure 8 It is a schematic diagram comparing the original spectrum and the spectrum after cosmic rays are removed provided in an embodiment of the present application;

[0025] Fig. 9is a schematic diagram of a cosmic ray removal device provided according to an embodiment of the present application;

[0026] Fig.10 It is a schematic diagram of the network architecture of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0027] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] According to an embodiment of the present application, a method for removing cosmic rays is provided.

[0031] Figure 1 FIG. 1 is a flow chart of a method for removing cosmic rays according to an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:

[0032] Step S101, obtaining the intensity data of the initial signal in the original spectrum, normalizing the intensity data of the initial signal, and obtaining the intensity data of the target signal.

[0033] Specifically, in spectral analysis, the raw data usually has significant differences in the amplitude of the spectral signal between different data sets due to different experimental conditions, detector characteristics or other factors. This difference will affect the subsequent data processing steps, such as the effect of peak detection or interference removal. Therefore, the spectral data needs to be normalized to eliminate these amplitude differences and ensure that each spectral signal is compared on the same scale. For the uniformity of the subsequent threshold selection, the spectral signal intensity data is usually represented in the form of a curve, where the horizontal axis (X-axis) represents the wavelength and the vertical axis (Y-axis) represents the light intensity or radiation energy at the corresponding wavelength. For example, the original spectrum graph can be Figure 2 The spectrum shown contains cosmic rays.

[0034] In some embodiments, signal intensity data in the original spectrum graph is obtained, and the intensity data of the initial signal is normalized to obtain target signal intensity data. The following steps can be performed: minimum data and maximum data in the intensity data of the initial signal are determined; the intensity data of the initial signal is normalized according to the minimum data and the maximum data to obtain processed signal intensity data, which is the intensity data of the initial signal.

[0035] Exemplarily, first, when normalizing the signal intensity data, it is necessary to determine the minimum value of the original spectrum, that is, it is implemented by the code origin=signal.min(). In this step, the minimum value origin in the spectral data to be processed can be calculated. The minimum value represents the baseline or background level in the spectral signal. After that, the maximum value of the original spectrum is determined: that is, it is implemented by the code scale=signal.max()#, and then the maximum value scale in the spectral data is calculated. The maximum value represents the highest peak in the signal. Determining the maximum and minimum values ​​of the data in this application is one of the key steps to achieve effective normalization. Through this step, the differences in dimensions and numerical ranges between different features can be eliminated, the performance and accuracy of the data model can be improved, and the robustness of the data model can be enhanced.

[0036] In some embodiments, the intensity data of the initial signal is normalized according to the minimum data and the maximum data to obtain the target signal intensity data, which can be obtained by the following steps: subtracting the signal intensity of the minimum data from the initial signal intensity to translate the initial signal to obtain the translated initial signal; dividing the signal intensity of the maximum data by the signal intensity of the translated initial signal to scale the translated initial signal within a preset range to obtain the target signal intensity data.

[0037] For example, the result after spectral normalization can be as follows Figure 3As shown, during the normalization process, the minimum value obtained above will be used to translate the entire initial signal to 0 to eliminate the offset. The maximum value obtained above will be used to scale the amplitude of the translated initial signal to the range of [0,1] (corresponding to the preset range in this application) to obtain the target signal intensity data of this application in order to standardize the amplitudes of different spectral signals. By normalizing the initial signal data, this application can eliminate the differences in dimensions and numerical ranges between different features and improve the accuracy of subsequent data.

[0038] Step S102, performing a second-order calculation on the target signal strength data using a convolution kernel to obtain calculated data.

[0039] Among them, the target signal strength data is obtained after normalizing the initial signal. When eliminating subsequent cosmic rays, the present application first performs a second-order derivative calculation on the target signal strength data, which can more easily locate and eliminate the interference effect of cosmic rays.

[0040] In some embodiments, a convolution kernel is used to perform a second-order calculation on the target signal strength data to obtain calculated data, which can be achieved by the following steps: a convolution kernel is used to perform a second-order derivative on an array of target signal strength data to obtain derived signal strength data; a data square calculation is performed on the derived signal strength data to obtain squared signal strength data; and the squared signal strength data is used as the calculated data.

[0041] Exemplarily, in a discrete case, the second-order derivative of the target signal strength data can be calculated by the following formula:

[0042]

[0043] Among them, three adjacent points (x i+1 ,x i ,x i-1 ) to compute the second-order derivative. Therefore, the length of the result of computing the second-order derivative will be two elements less than the original sequence.

[0044] The specific implementation code is as follows (python):

[0045]

[0046]

[0047] It should be noted that the length of the array will decrease by one each time the derivative is calculated when the discrete derivative is calculated. This is due to the definition of the derivative in discrete time. Here, a convolution kernel is used to perform the second-order derivative on the array of discrete data. The convolution kernel is set to [1,-2,1], and the array is expanded by reflecting the array boundary in the convolution operation to retain the original length. The convolution kernel [1,-2,1] is used to convolve the array and fill it with a mirror image. This ensures that the length of the array remains unchanged after the derivative is calculated, and avoids obvious deviations in the calculation results of the second-order derivative caused by edge effects.

[0048] Afterwards, the derived signal strength data is squared to obtain the squared signal strength data, which can not only highlight the outlier points, but also identify the cosmic ray outlier points below the spectrum.

[0049] Step S103, determining the ray threshold according to the calculated data.

[0050] Among them, the ray threshold is used to distinguish the effective electromagnetic signal strength and electromagnetic noise. By setting a ray threshold based on the mean and standard deviation, normal signals can be effectively distinguished from abnormal signals.

[0051] In some embodiments, the ray threshold is determined based on the calculated data, which can be obtained by the following steps: respectively calculating the mean and standard deviation of the squared signal intensity data; and determining the ray threshold based on the mean and standard deviation.

[0052] It should be noted that the mean is the average value of the data, which reflects the central trend of the data. In the signal processing process, the square of the second-order derivative (or other eigenvalues) of most normal data points will gather near the mean. The standard deviation describes the degree of dispersion of the data, or the degree to which the data points deviate from the mean. Most data points should fall within one standard deviation of the mean (assuming that the data follows a normal distribution), and a small number of data points will deviate far from the mean. In the process of cosmic ray detection, it is generally believed that most signals are normal, and only a few points are affected by cosmic rays. Therefore, by setting a ray threshold based on the mean and standard deviation, normal signals can be effectively distinguished from abnormal signals.

[0053] Exemplarily, the mean and standard deviation of the square of the second-order derivative are calculated, and a ray threshold is set based on these values ​​(mean + parameter * standard deviation). The parameter here is user-selectable, the adaptive threshold standard deviation factor. Smaller values ​​represent more sensitive filters, and the default value is 2.

[0054] Step S104, determining cosmic ray information according to the ray threshold, and removing the cosmic ray information, wherein the cosmic ray information includes at least one of the following: cosmic rays, points disturbed by cosmic rays, wherein the points disturbed by cosmic rays are obtained by an expansion operation.

[0055] In some embodiments, cosmic ray information is determined based on a ray threshold and the cosmic ray information is removed, which can be obtained by the following steps: when there is a value greater than the ray threshold in the squared signal intensity data, the spectrum corresponding to the value is determined to be a cosmic ray, and the points interfered by the cosmic rays among the points associated with the cosmic rays are determined through an expansion operation, and the cosmic rays and the points interfered by the cosmic rays are used as cosmic ray information; the cosmic ray information is removed through a linear interpolation algorithm.

[0056] Exemplarily, the points in the squared signal strength data that are greater than the threshold are marked as cosmic rays. Squaring the second-order derivative can not only identify cosmic rays above the spectrum, but also identify cosmic rays below the spectrum.

[0057] Since cosmic rays often affect multiple neighboring pixels of a sensor, especially if the cosmic ray enters the sensor at a small angle or has high energy, it may cause abnormal readings at more than one point. In this case, simply detecting a single abnormal point does not fully capture the scope of the cosmic ray's impact. For points that have been confirmed to be cosmic rays, interpolation or other forms of smoothing operations are usually performed during processing. If the surrounding points are not included, the interpolated spectrum may have unnatural spikes or mutations. Therefore, marking and processing the points around the cosmic ray together can make the interpolated spectrum smoother and more natural.

[0058] Based on this, the present application determines the points disturbed by cosmic rays among the points associated with cosmic rays by using the dilation operation in image processing. The specific operation may be as follows:

[0059] Import the binary_dilation function from the ndimage module of the SciPy library to perform dilation operations on binary (Boolean) arrays. ndimage is a module in SciPy that specializes in multidimensional image processing and provides various image transformation, filtering, measurement, and morphological operations. binary_dilation is a morphological operation used to dilate binary images or arrays. The dilation operation expands the highlighted (i.e. True or 1) areas in the image by marking the adjacent low-brightness areas as highlighted. binary_dilation can be used to detect and expand target areas in an image. In our cosmic ray scenario, it can be used to expand the area affected by the detected cosmic rays. The implementation code is as follows (python):

[0060] First import the method: from scipy.ndimage import binary_dilation

[0061] Then, the cosmic ray is introduced into the function cosmic_ray=binary_dilation(cosmic_ray) to obtain the result after expansion. After expansion, the cosmic ray and multiple adjacent pixel points of the cosmic ray (that is, the points associated with the cosmic ray in this application) can be obtained. Specifically, Figure 4 As shown, the spectra of cosmic rays and their surrounding points are marked, where Figure 5 for Figure 4 After detecting the cosmic ray points, the dilation operation (e.g., binary dilation) can be used to expand the marked areas to ensure that all points affected by cosmic rays are included. This can avoid the situation where only individual points are corrected while ignoring the affected areas around them, thus improving the comprehensiveness of the detection.

[0062] In some embodiments, the removal of cosmic ray information by a linear interpolation algorithm can be obtained by the following steps: marking the cosmic ray information to obtain marked cosmic ray information; performing linear interpolation processing on the marked cosmic ray information to eliminate cosmic ray interference in the original spectrum.

[0063] Exemplarily, linear interpolation is used to remove cosmic rays, and the values ​​of the points marked as cosmic rays are modified, while the unmarked values ​​remain unchanged. Among them, linear interpolation is performed on the marked cosmic ray points. That is, according to the values ​​of the unaffected adjacent points, the interpolation values ​​of these points are calculated and the values ​​of the affected points are replaced. Since the positions of the cosmic ray points have been obtained before, the interpolation implementation method is as follows (python): def remove_cosmic_rays(signal,cosmic_ray):

[0064] """

[0065] Use linear interpolation to remove cosmic rays from the spectrum.

[0066] """

[0067] xaxis=np.arange(len(signal))

[0068] # Find unaffected points

[0069] xaxis_no_cr=xaxis[~cosmic_ray]

[0070] signal_no_cr=signal[~cosmic_ray]

[0071] # Linear interpolation of the affected points

[0072] signal_filtered=np.interp(xaxis,xaxis_no_cr,signal_no_cr)

[0073] return signal_filtered

[0074] Through the above steps, the abnormal peaks in the spectrum caused by the interference of cosmic rays can be removed. For specific examples, please refer to Figure 6 As shown, the present application significantly improves the accuracy, continuity and reliability of data by integrating the cosmic ray removal methods of convolution and expansion and effectively detecting, marking and correcting the impact of cosmic rays on spectral data.

[0075] Optionally, in the method for removing cosmic rays provided in the embodiment of the present application, if Figure 7 As shown, the specific operation steps may be:

[0076] 1. Normalize the spectrum: Spectral normalization.

[0077] 2. Take the second-order derivative of the spectrum: Take the second-order derivative (convolution) of the normalized spectrum.

[0078] 3. Calculate the square of the second derivative: and square it (to highlight the spike, but also to identify the cosmic rays underneath).

[0079] 4. Set the threshold: Calculate the mean and standard deviation of the square of the second-order derivative, and set a threshold based on these values ​​(mean + parameter * standard deviation).

[0080] 5. Cosmic rays: We mark the points where the square of the second-order derivative is greater than the threshold as cosmic rays.

[0081] 6. Points near cosmic rays: Use the expansion in the image mentioned earlier to mark the range of cosmic rays (binary expansion is used here because we have converted it into an array containing only 0s and 1s when judging cosmic rays in the fourth step).

[0082] 7. Remove cosmic rays: Use linear interpolation to remove cosmic rays, then refer to Figure 8 As shown, a comparison diagram of the original spectrum and the spectrum after removing cosmic rays is obtained.

[0083] In summary, the cosmic ray removal method provided in the embodiment of the present application obtains the intensity data of the initial signal in the original spectrum, normalizes the intensity data of the initial signal, and obtains the target signal intensity data; uses the convolution kernel to perform a second-order calculation on the target signal intensity data to obtain the calculated data; determines the ray threshold according to the calculated data; determines the cosmic ray information according to the ray threshold, and removes the cosmic ray information, wherein the cosmic ray information includes at least one of the following: cosmic rays, points disturbed by cosmic rays, wherein the points disturbed by cosmic rays are obtained by an expansion operation. Through the present application, the problem of low efficiency in removing cosmic rays from the spectrum in the related art is solved. By processing and analyzing the determined target signal intensity data, the cosmic ray information is identified. Thereby achieving the effect of improving the removal efficiency of cosmic rays in the spectrum.

[0084] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0085] The embodiment of the present application also provides a cosmic ray removal device. It should be noted that the cosmic ray removal device of the embodiment of the present application can be used to execute the cosmic ray removal method provided in the embodiment of the present application. The cosmic ray removal device provided in the embodiment of the present application is introduced below.

[0086] Fig. 9 Schematic diagram of a cosmic ray removal device according to an embodiment of the present application. Fig. 9 As shown, the device 900 includes: an acquisition unit 901, a calculation unit 902, a first determination unit 903, and a second determination unit 904.

[0087] Specifically, the acquisition unit 901 is used to acquire the intensity data of the initial signal in the original spectrum, and perform normalization processing on the intensity data of the initial signal to obtain the target signal intensity data;

[0088] A calculation unit 902 is used to perform a second-order calculation on the target signal strength data using a convolution kernel to obtain calculated data;

[0089] A first determining unit 903, configured to determine a ray threshold according to the calculated data;

[0090] The second determination unit 904 is used to determine cosmic ray information according to the ray threshold and remove the cosmic ray information, wherein the cosmic ray information includes at least one of the following: cosmic rays, points disturbed by cosmic rays, wherein the points disturbed by cosmic rays are obtained by an expansion operation.

[0091] In summary, the cosmic ray removal device provided in the embodiment of the present application is used to obtain the intensity data of the initial signal in the original spectrum through the acquisition unit 901, and normalize the intensity data of the initial signal to obtain the target signal intensity data; the calculation unit 902 is used to perform a second-order calculation on the target signal intensity data using a convolution kernel to obtain the calculated data; the first determination unit 903 is used to determine the ray threshold according to the calculated data; the second determination unit 904 is used to determine the cosmic ray information according to the ray threshold, and remove the cosmic ray information, wherein the cosmic ray information includes at least one of the following: cosmic rays, points disturbed by cosmic rays, wherein the points disturbed by cosmic rays are obtained by expansion operations, which solves the problem of low efficiency in removing cosmic rays in the spectrum in the related art. By processing and analyzing the determined target signal intensity data, the cosmic ray information is identified. Thereby achieving the effect of improving the removal efficiency of cosmic rays in the spectrum.

[0092] Optionally, in the cosmic ray removal device provided in an embodiment of the present application, an acquisition unit includes: a first determination module, used to determine the minimum data and the maximum data in the intensity data of the initial signal; a processing module, used to normalize the intensity data of the initial signal according to the minimum data and the maximum data, and obtain the processed signal intensity data of the initial signal.

[0093] Optionally, in the cosmic ray removal device provided in the embodiment of the present application, the processing module includes: a translation submodule, used to subtract the signal strength of the minimum data from the initial signal strength to translate the initial signal to obtain the translated initial signal; and a scaling submodule, used to divide the signal strength of the maximum data from the signal strength of the translated initial signal to scale the translated initial signal within a preset range to obtain target signal strength data.

[0094] Optionally, in the cosmic ray removal device provided in an embodiment of the present application, the computing unit includes: a derivation module, used to perform a second-order derivative of an array of target signal strength data using a convolution kernel to obtain derived signal strength data; a first computing module, used to perform a data square calculation on the derived signal strength data to obtain squared signal strength data; and a second determination module, used to use the squared signal strength data as calculated data.

[0095] Optionally, in the cosmic ray removal device provided in an embodiment of the present application, the first determination unit includes: a second calculation module, used to respectively calculate the mean and standard deviation of the squared signal intensity data; and a third determination module, used to determine the ray threshold based on the mean and standard deviation.

[0096] Optionally, in the cosmic ray removal device provided in the embodiment of the present application, the second determination unit includes: a fourth determination module, which is used to determine that the spectrum corresponding to the value is a cosmic ray when there is a value greater than a ray threshold in the squared signal strength data, and to determine the points interfered by cosmic rays among the points associated with the cosmic rays through an expansion operation, and use the cosmic rays and the points interfered by cosmic rays as cosmic ray information; and a removal module, which is used to remove the cosmic ray information through a linear interpolation algorithm.

[0097] Optionally, in the cosmic ray removal device provided in the embodiment of the present application, the removal module includes: a marking submodule, used to mark the cosmic ray information to obtain the marked cosmic ray information; and a processing submodule, used to perform linear interpolation processing on the marked cosmic ray information to eliminate cosmic ray interference in the original spectrum.

[0098] The cosmic ray removal device includes a processor and a memory. The above-mentioned fetching unit 901, calculation unit 902, first determination unit 903, second determination unit 904, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.

[0099] The processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the removal of cosmic rays can be achieved by adjusting the kernel parameters.

[0100] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0101] In the exemplary embodiment of the present application, a computer storage medium capable of implementing the above method is also provided. A program product capable of implementing the above method of the present specification is stored thereon. In some possible embodiments, various aspects of the present application can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps described in the above "Exemplary Method" section of this specification according to various exemplary embodiments of the present application, such as the following steps can be performed: obtaining the intensity data of the initial signal in the original spectrum graph, normalizing the intensity data of the initial signal, and obtaining the target signal intensity data; performing a second-order calculation on the target signal intensity data using a convolution kernel to obtain the calculated data; determining a ray threshold according to the calculated data; determining cosmic ray information according to the ray threshold, and removing the cosmic ray information, wherein the cosmic ray information includes at least one of the following: cosmic rays, points disturbed by cosmic rays, wherein the points disturbed by cosmic rays are obtained by an expansion operation.

[0102] In an optional implementation: minimum data and maximum data in the intensity data of the initial signal are determined; the intensity data of the initial signal is normalized according to the minimum data and the maximum data to obtain processed signal intensity data (intensity data of the initial signal).

[0103] In an optional embodiment: the initial signal strength is subtracted from the signal strength of the minimum data to translate the initial signal to obtain a translated initial signal; the signal strength of the translated initial signal is divided by the signal strength of the maximum data to scale the translated initial signal within a preset range to obtain target signal strength data.

[0104] In an optional implementation: a convolution kernel is used to perform a second-order derivative on an array of target signal strength data to obtain derived signal strength data; a data square calculation is performed on the derived signal strength data to obtain squared signal strength data; and the squared signal strength data is used as calculated data.

[0105] In an optional implementation: the mean and standard deviation of the squared signal strength data are calculated respectively; and the ray threshold is determined based on the mean and standard deviation.

[0106] In an optional implementation: when there is a value greater than a ray threshold in the squared signal intensity data, the spectrum corresponding to the value is determined to be a cosmic ray, and the points interfered by the cosmic rays among the points associated with the cosmic rays are determined through an expansion operation, and the cosmic rays and the points interfered by the cosmic rays are used as cosmic ray information; the cosmic ray information is removed through a linear interpolation algorithm.

[0107] In an optional implementation, the cosmic ray information is marked to obtain the marked cosmic ray information; and the marked cosmic ray information is subjected to linear interpolation processing to eliminate cosmic ray interference in the original spectrum.

[0108] In an optional embodiment, the embodiment of the present application may also include a program product for implementing the above method, which may adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.

[0109] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0110] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0111] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0112] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0113] In addition, in an exemplary embodiment of the present application, an electronic device capable of implementing the above method is also provided.

[0114] Those skilled in the art will appreciate that various aspects of the present application may be implemented as a system, method or program product. Therefore, various aspects of the present application may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to as "circuit", "module" or "system" herein.

[0115] Refer to the following Fig.10 The electronic device 1000 according to this embodiment of the present application is described. Fig.10 The electronic device 1000 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0116] like Fig.10 As shown, the electronic device 1000 is in the form of a general computing device. The components of the electronic device 1000 may include, but are not limited to: the at least one processing unit 1010, the at least one storage unit 1020, a bus 1030 connecting different system components (including the storage unit 1020 and the processing unit 1010), and a display unit 1040.

[0117] The storage unit stores program codes, and the program codes can be executed by the processing unit 1010, so that the processing unit 1010 executes the steps according to various exemplary embodiments of the present application described in the above “Exemplary Method” section of this specification. For example, the processing unit 1010 can execute the following steps: obtaining the intensity data of the initial signal in the original spectrum, normalizing the intensity data of the initial signal, and obtaining the target signal intensity data; performing a second-order calculation on the target signal intensity data using a convolution kernel to obtain the calculated data; determining a ray threshold according to the calculated data; determining cosmic ray information according to the ray threshold, and removing the cosmic ray information, wherein the cosmic ray information includes at least one of the following: cosmic rays, points disturbed by cosmic rays, and wherein the points disturbed by cosmic rays are obtained by an expansion operation.

[0118] In an optional implementation: minimum data and maximum data in the intensity data of the initial signal are determined; the intensity data of the initial signal is normalized according to the minimum data and the maximum data to obtain processed signal intensity data (intensity data of the initial signal).

[0119] In an optional embodiment: the initial signal strength is subtracted from the signal strength of the minimum data to translate the initial signal to obtain a translated initial signal; the signal strength of the translated initial signal is divided by the signal strength of the maximum data to scale the translated initial signal within a preset range to obtain target signal strength data.

[0120] In an optional implementation: a convolution kernel is used to perform a second-order derivative on an array of target signal strength data to obtain derived signal strength data; a data square calculation is performed on the derived signal strength data to obtain squared signal strength data; and the squared signal strength data is used as calculated data.

[0121] In an optional implementation: the mean and standard deviation of the squared signal strength data are calculated respectively; and the ray threshold is determined based on the mean and standard deviation.

[0122] In an optional implementation: when there is a value greater than a ray threshold in the squared signal intensity data, the spectrum corresponding to the value is determined to be a cosmic ray, and the points interfered by the cosmic rays among the points associated with the cosmic rays are determined through an expansion operation, and the cosmic rays and the points interfered by the cosmic rays are used as cosmic ray information; the cosmic ray information is removed through a linear interpolation algorithm.

[0123] In an optional implementation, the cosmic ray information is marked to obtain the marked cosmic ray information; and the marked cosmic ray information is subjected to linear interpolation processing to eliminate cosmic ray interference in the original spectrum.

[0124] The storage unit 1020 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 10201 and / or a cache storage unit 10202 , and may further include a read-only storage unit (ROM) 10203 .

[0125] The storage unit 1020 may also include a program / utility 10204 having a set (at least one) of program modules 10205, such program modules 10205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0126] Bus 1030 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0127] The electronic device 1000 may also communicate with one or more external devices 1100 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1000, and / or may communicate with any device that enables the electronic device 1000 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1050. Furthermore, the electronic device 1000 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 1060. As shown, the network adapter 1060 communicates with other modules of the electronic device 1000 via a bus 1030. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0128] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation methods of the present application.

[0129] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present application, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0130] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application. The specification and embodiments are to be regarded as exemplary only, and the true scope and spirit of the present application are indicated by the claims.

Claims

1. A method for removing cosmic rays, It is characterized in that include: Acquire the intensity data of the initial signal in the original spectrum, and perform normalization processing on the intensity data of the initial signal to obtain the intensity data of the target signal; Performing a second-order calculation on the target signal strength data using a convolution kernel to obtain calculated data; Determine a ray threshold according to the calculated data; Cosmic ray information is determined according to the ray threshold, and the cosmic ray information is removed, wherein the cosmic ray information includes at least one of the following: cosmic rays, points disturbed by the cosmic rays, wherein the points disturbed by the cosmic rays are obtained by an expansion operation.

2. The method according to claim 1, It is characterized in that Acquiring signal intensity data in the original spectrum, normalizing the intensity data of the initial signal to obtain target signal intensity data, including: Determine minimum data and maximum data in the intensity data of the initial signal; The intensity data of the initial signal is normalized according to the minimum data and the maximum data to obtain processed signal intensity data (the intensity data of the initial signal).

3. The method according to claim 2, It is characterized in that Normalizing the intensity data of the initial signal according to the minimum data and the maximum data to obtain target signal intensity data, including: Subtract the signal strength of the minimum data from the initial signal strength to shift the initial signal to obtain a shifted initial signal; The signal strength of the initial signal after translation is divided by the signal strength of the maximum data to obtain the signal strength of the initial signal after translation. The initial signal is scaled within a preset range to obtain the target signal strength data.

4. The method according to claim 1, It is characterized in that The target signal strength data is subjected to a second-order calculation using a convolution kernel to obtain calculated data, including: Performing a second-order derivation on the array of the target signal strength data using a convolution kernel to obtain the derived signal strength data; Performing data square calculation on the derived signal strength data to obtain squared signal strength data; The squared signal strength data is used as the calculated data.

5. The method according to claim 4, It is characterized in that Determining a ray threshold according to the calculated data includes: Respectively calculating the mean and standard deviation of the squared signal strength data; The ray threshold is determined based on the mean and the standard deviation.

6. The method according to claim 4, It is characterized in that Determining cosmic ray information according to the ray threshold and removing the cosmic ray information includes: In the case where there is a value greater than the ray threshold in the squared signal strength data, determining that the spectrum corresponding to the value is a cosmic ray, and determining the point disturbed by the cosmic ray among the points associated with the cosmic ray through the expansion operation, and using the cosmic ray and the point disturbed by the cosmic ray as the cosmic ray information; The cosmic ray information is removed by a linear interpolation algorithm.

7. The method according to claim 6, It is characterized in that The cosmic ray information is removed by a linear interpolation algorithm, including: marking the cosmic ray information to obtain marked cosmic ray information; Linear interpolation processing is performed on the marked cosmic ray information to eliminate cosmic ray interference in the original spectrum.

8. A device for removing cosmic rays, It is characterized in that include: An acquisition unit, used for acquiring intensity data of an initial signal in an original spectrum graph, and performing normalization processing on the intensity data of the initial signal to obtain intensity data of a target signal; A calculation unit, used for performing a second-order calculation on the target signal strength data using a convolution kernel to obtain calculated data; A first determining unit, configured to determine a ray threshold according to the calculated data; A second determination unit is used to determine cosmic ray information according to the ray threshold and remove the cosmic ray information, wherein the cosmic ray information includes at least one of the following: cosmic rays and points disturbed by the cosmic rays, wherein the points disturbed by the cosmic rays are obtained through an expansion operation.

9. A computer-readable storage medium, It is characterized in that The storage medium includes a stored program, wherein the program executes the cosmic ray removal method according to any one of claims 1 to 7.

10. An electronic device, It is characterized in that include: One or more processors, a memory, a display device, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for executing the cosmic ray removal method described in any one of claims 1 to 7.

Citation Information

Cited By

  • Cosmic ray identification method, electronic equipment and storage medium

    CN122130667A