Chapter 53: Bulk operation


  "The light source data is a tif format file, which is a grayscale image composed of 30723072 points, where each point has a signal intensity value in addition to the horizontal and vertical coordinates.
   After getting these data, the first step is to confirm the coordinates of the center of the circle and the distance between the calibration sample and the detector.
   Open the fit2D software and import the lanthanum hexaboride file. Its image is a set of concentric circles.
   Through software fitting, it can confirm its center coordinates. 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 the difference between the two files to subtract the background signal.
   The image of the blank silicon chip is a semicircular signal. If the background subtraction effect is not good, and there are still obvious silicon chip signals, we need further processing.
   First, in the sample image, find a place where there is a silicon chip signal but almost no sample signal, choose a spot at random, and record its intensity.
   Then at the same position of the blank wafer image, check the intensity of that point.
   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 subtract 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 got is a two-dimensional picture. For organic polymer materials, the main "molecular stacking structure" information is near the coordinate axis of the picture.
   where the horizontal axis represents the in-plane direction, expressed as qxy, and the vertical axis represents the out-of-plane direction perpendicular to the plane, expressed as qz, and the units are all negative powers of angstroms.
   Therefore, we integrate the intensity of the data points near the coordinate axis to obtain two integration curves, and then we can analyze the "molecular stacking structure" information in and out of the plane respectively.
  The specific integral angles are generally 0-3 degrees and 88-92 degrees.
   The fifth step is to process the grayscale image with PS software and convert it into a color image. Use different colors to indicate the intensity of the data points, plus coordinate axes, legends, etc. "
   In the previous steps, Chen Wanqing and Luo Yang are not much different.
   Until the last step, the senior sister took out the PS software.
   Xu Qiu finally found the reason for her slowness.
   "Sister, the last PS step can be programmed to achieve batch operation, no need for P pictures." Xu Qiu said.
   "I also heard that you can export pictures in batches," Chen Wanqing said helplessly: "But I can't program."
   "I will, leave it to me," Xu Qiu said: "Send me the final renderings and I will study them."
   "Really? If it succeeds, it can save a lot of time." Chen Wanqing was suspicious and sent the picture to Xu Qiu.
   "Waiting for my good news." Xu Qiu said confidently.
   He started the computer software, looked at the renderings, and thought.
   Then, turn on the auxiliary system, check the program codes 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 figure out the principle of the program's operation.
   However, one of the steps is super-class knowledge.
   So, Xu Qiu asked Chen Wanqing for advice:
   "Sister, how do you determine the axis scale of the picture?"
   "According to the distance between the sample and the detector and the wavelength of the X-ray, it can be calculated. The formula is..." Chen Wanqing said.
"I understand."
   Xu Qiu nodded, then input the code in the system image into the software of his computer.
   While coding the code, 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 coordinate and the scale of the coordinate axis 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 intensity of each data point into RGB color data. This can be directly applied to the built-in jet color model.
   This model is that the higher the signal intensity, the redder the converted color, and the lower the signal intensity, 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 quickly entered it.
   "The thinking is very clear," Chen Wanqing basically believed Xu Qiu's words, but still asked:
   "With these codes, can batch operations be realized?"
   "Let me demonstrate, after all, seeing is believing." Xu Qiu said:
  "Just use the original data without background signal deduction for demonstration.
   First, name the files to be processed uniformly according to the sample number: 1.tif, 2.tif, 3.tif, let's test with 3 files first.
   Then, manually enter the center coordinates, the distance between the sample and the detector, and the X-ray wavelength.
   Finally, just click to 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 dozens of seconds, the first picture is processed.
After    is automatically saved, the software continues to run and starts processing the second picture.
   Two minutes later, all three pictures were processed, and Xu Qiu opened them from the folder.
   Chen Wanqing was excited after seeing the picture of the finished product: "It's really okay, UU reading www.uukanshu.com is no different from what I got out of PS, and I sometimes make mistakes using PS manual P pictures.
   "By the way, my younger brother, don't let Teacher Wei know about this method," she added.
   "Why?" Xu Qiu puzzled.
   "If he knows, after testing the light source data, we will let us process the experimental data that day," Chen Wanqing said, "After the overnight test, I still want to paddle."
   "Well, I must be tight-lipped." Xu Qiu said:
   "Let's process half of the data, first deduct the background and calculate the points, and finally finish all of them, and then export the color pictures together."
   "Okay, then I will start with sample No. 1 and process the data in positive order. You start with sample No. 72 and process the data in reverse order, how about?" Chen Wanqing said.
   "Yes."
  …………
   Two hours later, Xu Qiu processed the No. 37 sample, turned his head to see the progress of the senior sister, and was still on the No. 31 sample, and said:
   "Senior Sister, I have finished handling the number 37, so let's help you share 3 more. You can get the number 33 and leave it to me 34, 35, 36."
   "You are so fast, then I beg you." Chen Wanqing said.
   After the two processed the last few data, Chen Wanqing copied her data to Xu Qiu's computer because she did not install the software.
   Xu Qiu operated the computer and exported color pictures in batches without any accident.
   "Thanks to the help of my younger brother, I will make it so soon. I invite you to dinner in the cafeteria tonight." Chen Wanqing said happily.
   "Okay, but tomorrow will be an interview for the graduate student. I will go back to the dorm after dinner."
   "Yeah, come on, brother."
Latest chapter of Ebook I Have a Research Support System Click here