Activity 2 : Digital Scanning

Ralph Aaron Aguinaldo
6 min readAug 18, 2015

--

I am aware that imaging technology has a lot of applications in the field of science, easy examples are seabed mapping and automated surgery. But this activity really pushed that importance into my head.

We were asked to find a hand-drawn plot from old journals in the college libraries. This part was actually tedious, as the NIP library does not allow the scanning of the journals. Meanwhile the College of Science Library is a ten minute walk from the building, but we still haven’t validated our ID’s in the library for this semester, and lunchtime is at hand.

I found my salvation in the journals stored in the Plasma Physics Laboratory, the research group I am a member of. The journal is about research done at the International Thermonuclear Experimental Reactor (ITER) that was presented at the Thirteenth International Conference of Plasma Physics and Controlled Nuclear Fusion Research, conducted at Washington ,DC, USA on October 1–6, 1990. It was published by the International Atomic Energy Agency in Vienna , Austria.

The graph i found belonged to the paper entitled Operational Limits and Disruptions in ITER authored by T. Tsunematsu et. al. I scanned the page at 100 dpi, and the result is below.

The scanned page of the journal with the corresponding figure caption.

I cropped off the plot from the above image to get the handier image below.

Cropped version of the initial scan

The image had immediate problems early on. The scan is not aligned well, so I had to rotate the image a bit in the clockwise direction in GIMP ( after numerous tweaks and misses, I lost track of the exact rotation value). Another noticeable problem, if you look closely, is that the x-axis is not exactly perpendicular with the y-axis. I used the skew tool to fix the perpendicularity issue (again, I lost track of the skew value). I inquired with Ms. Ventura, the substitute teacher for the day, about the effects of cropping, rotating and skewing the image, and she assured me they are safe for this activity. The result is the image below:

The test image after being corrected by rotation and skew

We can see that the image became a bit blurry along the lines after the distortions introduced, but I consider it a necessary sacrifice to avoid further tweaking difficulties later on.

I took the pixel coordinates of the major and minor tick marks of the axes. I used Microsoft Excel 2010 to handle the recording and curve fitting. On the x-axis, which represents the values for q ( the safety factor at the plasma edge, or the value at 95% magnetic flux), I took the central pixel (yi=436) along the line which is 5 pixels thick. The 0.5 q tick marks are at intervals of 41 to 43 pixels.

I did the equivalent steps on the y-axis that represents the Ii (internal inductance) values. The axis line is centered at xi=70 and the 0.25 Ii tick marks are at intervals of 34–36 pixels.

Since the pixels are not of consistent interval, I plotted the q’s and Ii’s with the corresponding xi and yi values, respectively to find a line equation for converting from image coordinates (xi,yi) to actual values (q,Ii). The resulting lines are as shown.

Best fit line for the q to xi relation

Our conversion for the x-axis is

q=0.0118xi + 1.171

Best fit line for the Ii to yi relation

For the y-axis, it is

Ii= -0.0014yi + 1.0241

Let me re-post the test image again to save you the trouble of scrolling up.

We have four curves for different values of g (which corresponds to the Troyon factor). The bottom solid curve has no g value indicated, so we will just refer to it as h.

The Troyon factor is the ratio of the MHD stationary and stable beta factor to the plasma current and multiplied by the product of the plasma minor radius and toroidal field.

Yeah, I didn’t understand that too, haha..

For h, I took 70 points along the curve. For g>2, I took 26. For g>3, I took 157 points. For g>3.5, I took 87 points. The resulting conversions resulted to the fitted overlay shown below.

The first overlay of the reconstruction over the test image. The reconstructions are off along the vertical..

The axis values easily coincided well with the test image axes. It is noticeable that the reconstructed graphs are squiggly in some parts, and this can be attributed to the difficulty of determining the right pixel to take in slanted lines of varying slopes, pixel thickness and pixel color saturation.

We can easily see, that all the reconstructed curves are off by a few values along the y-axis. To make a near-perfect fit, I tried stretching the reconstructed plot space vertically. I tried to re-calibrate my conversion hoping it is just a mistake in the initial steps, but the results were the same.

I was about to give up when I remembered something.

My face when I realized I can actually solve this.

I recalled that in our lead compensator design exercises in our Control Systems Approach to Physical Modeling from last semester, that in real world instrumentation applications, we would not always get the intended computed factors and parameters even if we did the necessary steps perfectly. There has to be some manual tweaking involved.

I inferred from the stretching test that the problem could be solved by increasing the value of the direct factor 0.0014 in the conversion from yi to Ii. Testing slightly higher values of the said factor, I observed the resulting overlay. I finally came up with 0.00143. The resulting graph is shown below.

The final overlay of the reconstruction over the test image after changing the conversion factor for the y-axis.

We can see that we got a better fit. I chose 0.00143 since it gets all the reconstructed curves be very close above the test curves while not getting the reconstructed curve for g>3.5 very off below.

I personally believe that my performance for this exercise is excellent. The resulting reconstructions may not be perfectly fitted, but they are considerably close, given the difficulty of the said graph. I’d give myself a 5 for technical correctness, as I fully understood the process.

The recording is very tedious, as I had to record and work on a total of 364 pairs of pixel coordinates. Outside of the potential bonus points, I did all four plots driven by an inner OCD complex and my inability to resist the challenge.

Aside from the internal font problems of this blogging platform, I believe that the presentation is of good quality, and for that category I’ll give myself a 5. The images are well presented with corresponding labels. The results are magnified well to avoid hiding the proof of imperfect fitting. The flow of the discussion included the challenges and solving processes encountered throughout the activity.

As for the intiative, I was able to show and discuss the problems encountered that are consequences of the limitations of the method and the current skill-set that we have. I was able to use the practical skills I learned from the previous instrumentation courses to overcome the said deviation encountered in the initial fitting attempt. Thus, I believe I have earned my extra 2 points, for a total of 12 points.

Putting the academics aside, I really learned a lot from this activity and made me appreciate my course program more. I am looking forward to bettering myself in the acivities to come.

How awesome I feel right now.

--

--