I Have a Research Support System
Chapter 53 Batch Operations
The light source data is a tif format file, which is a grayscale image composed of 3072*3072 points, in which each point has a signal intensity value in addition to the horizontal and vertical coordinates.
After obtaining these data, the first step is to confirm the coordinates of the center of the circle and calibrate the distance between the sample and the detector.
Open fit2D software, import the file of lanthanum hexaboride, its image is a group of concentric circles.
Through software fitting, its center coordinates can be confirmed. In addition, the distance between the sample and the detector can be calculated. These two data will be used in the subsequent drawing process.
The second step is to import the sample file and the blank silicon wafer file corresponding to the exposure time, and then make a difference between the two files to subtract the background signal.
The image of the blank silicon wafer is the signal of this semicircle. If the effect of background subtraction is not good and there are still obvious signals of the silicon wafer, we need further processing.
First, in the sample image, find a place where there is a signal from the silicon wafer but almost no signal from the sample, choose a point at random, and record its intensity.
Then look at the intensity of that spot at the same location on the blank wafer image.
Then multiply the intensities of all data points on the blank substrate by a factor to make the intensities of the two previously selected points equal.
Finally, the difference between the two files can be used to remove the background signal.
The third step is to export the processed file, the format is still tif, and the subsequent data processing is based on this file.
The fourth step, points.
What we get is a two-dimensional picture. For organic polymer materials, the main molecular packing structure information is near the coordinate axis of the picture.
The horizontal axis represents the direction in the plane, expressed as qxy, and the vertical axis represents the direction outside the plane perpendicular to the plane, expressed as qz, and the unit is the negative power of angstroms.
Therefore, we integrate the intensity of the data points near the coordinate axis to obtain two integral curves, and then we can analyze the molecular stacking structure information in the plane and out of the plane respectively.
The specific integration angle is generally 0-3 degrees and 88-92 degrees.
The fifth step is to process the grayscale image with PS software, convert it into a color image, use different colors to represent the intensity of the data points, and add coordinate axes, legends, etc.
In the previous few steps, Chen Wanqing and Luo Yang were not much different.
Until the last step, the senior sister took out the PS software.
Xu Qiu finally found the reason for her slowness.
Senior sister, the last PS step can be programmed to achieve batch operations, and there is no need for individual P pictures. Xu Qiu said.
I also heard that you can export pictures in batches, Chen Wanqing said helplessly, but I don't know how to program.
I will, leave it to me, Xu Qiu said, Send me the final rendering, and I will study it.
Really? If it works, it can save a lot of time. Chen Wanqing was dubious and sent the picture to Xu Qiu.
Wait for my good news. Xu Qiu said confidently.
He started the computer's MATLAB software, looked at the renderings, and made a thoughtful gesture.
Then, open the auxiliary system, view the program code in the system image, and analyze their functions line by line.
Because of the existence of comments, it didn't take long for Xu Qiu to understand the principle of the program's operation.
However, one of the steps belongs to superclass knowledge.
Therefore, Xu Qiu asked Chen Wanqing for advice:
Senior sister, how do you determine the coordinate axis scale of the picture?
According to the distance between the sample and the detector and the wavelength of X-rays, it can be calculated. The formula is... Chen Wanqing said.
I see.
Xu Qiu nodded, and then input the code in the system image into the MATLAB software of his computer.
While coding, he explained to Chen Wanqing:
“This procedure is mainly divided into three steps:
The first step is to calculate the position of the origin of the coordinates and the scale of the coordinate axes through the previously calibrated coordinates of the center of the circle, the distance between the sample and the detector, and the wavelength of the X-ray.
The second step is to convert the signal strength of each data point into RGB color data, which can be directly applied to the jet color model that comes with MATLAB.
This model is that the greater the signal strength, the redder the converted color, and the smaller the signal strength, the bluer the converted color.
The third step is to automatically save the picture to the specified folder, and then set a batch operation command.
The code is only a few dozen lines, so Xu Qiu finished typing it quickly.
The train of thought is very clear, Chen Wanqing basically believed Xu Qiu's words, but still asked:
Can batch operations be achieved with only these codes?
Let me demonstrate. After all, seeing is believing. Xu Qiu said:
Just take the original data without deducting the background signal as a demonstration.
First, name the files to be processed uniformly according to the sample numbers: 1.tif, 2.tif, 3.tif, let's test with 3 files first.
Then, the coordinates of the center of the circle, the distance between the sample and the detector, and the wavelength of the X-rays are entered manually.
Finally, just click Run.
After Xu Qiu clicked the run button, a calculation dialog box popped up on the computer screen, and the numbers on it were constantly scrolling.
After tens of seconds, the processing of the first picture is completed.
After the automatic save, the software continues to run and starts processing the second picture.
Two minutes later, the processing of the three pictures was completed, and Xu Qiu opened them from the folder.
Chen Wanqing was very excited after seeing the picture of the finished product: It's really okay, it's no different from the one I made in PS, and sometimes there will be mistakes in the picture manually produced by PS.
By the way, junior, don't let Teacher Wei know about this method. She added.
Why? Xu Qiu was puzzled.
If he knows, he will ask us to process the experimental data that day after measuring the light source data. Chen Wanqing spread her hands and said, After testing all night, I still want to paddle.
Okay, I will keep my mouth shut. Xu Qiu said:
Then let's deal with half of the data. First, we only need to deduct the background and calculate the points, and finally finish all of them, and then use MATLAB to export the color map.
Okay, how about I start with sample No. 1 and process the data in the forward order, and you start with sample No. 72 and process it in reverse order? Chen Wanqing said.
Can.
…………
Two hours later, Xu Qiu finished processing sample No. 37, turned his head to look at the progress of the senior sister, and said that sample No. 31 was still there:
Senior sister, I finished dealing with the 37th, let me help you share 3 more. You can get the 33rd and leave it to me on the 34th, 35th, and 36th.
You are so fast, then please. Chen Wanqing said.
After the two finished processing the last few data, Chen Wanqing copied her data to Xu Qiu's computer, because she did not install MATLAB software.
Xu Qiu operated the computer and exported the color pictures in batches without any accident.
Thanks to the help of my younger brother today, it was done so quickly. I invite you to dinner tonight, the cafeteria. Chen Wanqing said happily.
Okay, but tomorrow is the postgraduate interview, so I'll go straight back to the dormitory after dinner.
Yeah, come on, junior.
You'll Also Like
-
Traveling through the myriad worlds: Divine skills automatically reach maximum level
Chapter 1766 7 hours ago -
Kingdom of Light: Looks too fierce, mistaken for a villain
Chapter 544 18 hours ago -
Wizard's Life Simulator
Chapter 588 18 hours ago -
After simulating crimes 100,000 times, I became an ace detective
Chapter 627 18 hours ago -
Online games: Recharge 10 billion to draw SSS-level talents at the beginning
Chapter 694 18 hours ago -
At the beginning, he became a baby and worshipped Uncle Jiu as his godfather!
Chapter 117 18 hours ago -
Fantasy villain: The heroine can't control it, let the father come
Chapter 592 18 hours ago -
Lord: My ant tribe evolves infinitely
Chapter 232 18 hours ago -
Global Ocean Tortoises: Developing Cities on Their Backs
Chapter 274 18 hours ago -
Douluo: Soul Shadow King
Chapter 264 18 hours ago