Thursday, June 16, 2011

The Middle and the End(?)

The first activity in our AP 186 class is Digital Scanning. We had to find an old journal and look for an obviously hand-drawn graph. I found my hand-drawn graph in the graduate thesis manuscript entitled “Relaxation Times and the Initial Conditions of the One-Dimensional Fokker-Planck Equation” by Mr. Josefino Z. Villanueva dated September 1973.

The activity's objective was to use ratio and proportion to find the numerical values of a digitally scanned hand-drawn plot. I used paint and excel/spreadsheet for this activity.

First, I needed to scan a photocopy of the hand-drawn plot (figure 1). Using paint, I had to get the equivalent pixel values of the tick marks of the x- and y-axes. Then use ratio and proportion to get the equivalent “real” values of the pixel values. The graph's origin (0,0) has pixel values of 395,1673. Below are the pixel values of the tick marks of the X-axis (table 1) and Y-axis (table 2).

Figure 1. Scanned picture of the hand-drawn plot.

Table 1. Equivalent pixel values of the X-axis of the graph

Table 2. Equivalent pixel values of the Y-axis of the graph

Next, I moved my mouse over points in the graph to take down the pixel values of the points. Listed in table 3 are the data points that I have chosen.

Table 3. Pixel values of data points chosen from the graph.

Using the data in table 1, I plot the physical values of the tick marks of the x-axis versus the equivalent x-axis pixel values. This is shown in figure 2.

Figure 2. tick mark versus pixel values for x-axis

And also using the data in table 2, I plot the physical values of the tick marks of the x-axis versus the equivalent x-axis pixel values. This is shown in figure 3. This is for me to be able to get the best-fit line.
Figure 3. tick mark versus pixel values for Y-axis

After all of that, using the equations in the best-fit line for the x and the y, I just input the pixel value(f(x)), so that I'll get the true physical value of the points(x). I then plot the values that I have calculated and plot them with the original figure superimposed (Figure 4)

Figure 4. Plot of the calculated physical values superimposed with the scanned figure.

Before I used the best-fit line (as per suggestion of Ma'am Jing), I originally used the average for the ratio and proportion part. The values that I obtained were plotted and is shown in figure 5.

Figure 5. Plot of the calculated values w/ scanned figure superimposed (using average pixel values)


Comparing figure 4 and 5, you can see that figure 4 (using the best fit line) has a higher R-squared than that of figure 5 (using the average pixel values). And so Ma'am Jing was right.

From my results, I think I would have done a better job. Maybe taking more data points would have made the new figure have a higher R-squared.

And so, for this activity, I'd grade myself an 8/10. As much as I want to say that I did the work on my own, that's not entirely true. Krista helped me understand what I should be doing, because I was kind of lost from the start. And (I don't know why) I didn't quite understand the instructions. Anyway, after asking help form Krista, I finally understood the activity and was able to finish it.

This is my first time using paint as a source of gathering data. Never thought it could be used that way. I only use it to copy pictures, etc. It only shows how much I need to learn. And so, I'm looking forward to learning more new stuff. :)

1 comment:

  1. Tracy,

    Your figure 5 seems to show a superimposed graph that does not match the axes of the excel or spreadsheet plot. Please remember to crop the image first. Could I see a better version of Fig. 5?

    Jing

    ReplyDelete