Wednesday, June 16, 2010

Activity 1 : Digital Scanning

There are instances that requires the use of hand-drawn plots. In these cases, only a number of computationally or experimentally determined data points are provided. But what if we need to find values other than these points?

Using our ever reliable friends, Gimp, Paint and Excel, we can reconstruct the digitally scanned hand-drawn plot. By locating the pixel points of the given data and determining the appropriate bias and scaling values, we can now know what the "missing" values are.

The original graph I used as shown below was taken from Physical Review Jul-Dec 1922 p.620. Since the scanned copy was a bit rotated, I first used Gimp to straighten the axis.

Figure 1. Ratio Curve for R (on) / I (on). Original plot taken from Physical Review Jul-Dec 1922 p.20.

To determine the pixel/unit scaling factor to use, I looked for the pixel location of each tick mark in the graph. I then computed for the average pixel length of every one unit in the plot which I then used as the scaling factor. Since the origin of the plot is not exactly at a (0,0) pixel location, I also added a bias in my computation of the reconstructed values.

The bias, scaling factors and equations I used in my reconstruction are:

Bias along x : 21 pixels
Bias along y : 379 pixels
Scaling factor for x : 66.28571 pixels/unit
Scaling factor for y : 64.2 pixels/unit

x_value = [(data_x - bias_x) / scaling_x ] + 9
y_value = [(bias_y - data_y) / scaling_y] + 1

I added 9 and1 in the x_value and y_value respectively since the origin in the original plot is at (9,1).

The reconstructed plot was superimposed on the original graph using Excel as shown below.

Figure 2. Reconstructed plot superimposed on the original graph.

As can be seen in the figure above, I was able to superimpose the reconstructed data points exactly on the location of the original data points. Some parts of the smoothing curve in the reconstructed plot, however, do not perfectly match those in the original graph. But this may have just been due to the differences in the method used in connecting the data points.

I give myself 10 in this activity since there is good correspondence between my reconstructed plot and the original graph.

Special thanks to Millicent Singson for providing me with the hand-drawn graph I used here and for teaching me how to make a picture, the background of a graph in Excel. Danke Milli!!!



No comments:

Post a Comment