Home : Map : Chapter 11 :Java : Tech : Physics :
Experiment Simulation: Data Generation & Analysis Examples
JavaTech
Course Map
Chapter 11

Introduction
Image Class
Image Loading
  Demo 1 Demo 2  
Pixels/Transparency
  Demo 3
Pixel Handling
  Demo 4  
Demo 5
Exercises

    Supplements
Java 2D Imaging
BufferedImage
Creating Buf.Image
Pixel Handling
  Demo 1 Demo 2
Filters
  Convolutions
     Demo 3
  AffineTransforms
     Demo 4
  LookupTable
     Demo 5 Demo 6
  Rescale
     Demo 7
  Color Conversion
     Demo 8
  Custom
     Demo 9
Exercises
Java Adv Imaging
AWT Flicker:
  Override Update
     Demo 1  Demo 2
  Clipping
     Demo 3
  Double Buffer
     Demo 4

     About JavaTech
     Codes List
     Exercises
     Feedback
     References
     Resources
     Tips
     Topic Index
     Course Guide
     What's New

Below we show several examples of how our data simulation and analysis might be used. Though the drop example is very simple, the basic techniques here emulated what is done with modern complex experiments, which almost always require a simulation to obtain reliable results.

We set the mass to be dropped from 200cm and it crosses into the detector's sensitive region at 190cm. In the graphic shown below, the parameters are shown for the fit to the polynominal:

y = y0 + v0 * t + 0.5 * g * t2

If an instrument offset is added to the position data, then the y0 value will be displaced from 200cm.

Note that for the calibration run, the initial t=0 goes with the start of the detector sensitive region at 190cm. So the intercept fit to the calibration run data is at 190cm rather than 200cm.

Below we give 5 examples of different modes in running the simulator/analysis programs:

  1. Drop with no instrument effects - no offsets are added to the position data.
  2. Run with calibration offsets - the position data values have a constant value added to them
  3. Calibration Run with no Instrument Effect - no offset added to the position data
  4. Calibration Run with Instrument Effect - add an offset to the position data
  5. Run with systematic error - vary the time span between position measurements

 

Demo 1: Drop with no Instrument Effects

DropGenCalSysErr

Normal run in which the data for 10 drops is written to a file named dropData.dat. The position values are smeared with a Gaussian using a sigma of 2.0, as input by the user in the second text field.

DropDataAnalysisCalSysErr

The user chose the dropData.data file with the file chooser dialog opened via the File drop down menu. Clicking on Go will cause the program to read in the data from the chosen file and fit the data points.

The blue points represent the average position for the 10 drops for each time increment. The std. dev. for the averages are barely visible as vertical red lines on each dot.

The dropped mass starts at 200cm and at zero velocity. It crosses into the detector sensitive region at 190cm. The fitted curve extends back to t=0 when the We see that the fitted parameters are consistent with these values. The g acceleration value determined by the fit is also consistent within the error with the 980 cm/s2 value used in the simulation.

 

Demo 2: Run with Instrument Offsets

DropGenCalSysErr

Add an instrument effect on the position data by choosing the "Add Calibration" checkbox and putting a value of 10.0 into the calibration constant value field. We send the data to a file named dropDataCal10.dat.

DropDataAnalysisCalSysErr

Because of the instrument offset, the fit intercept has been displaced by 10 cm upwards as compared to the fit in Demo 1.

DropDataAnalysisCalSysErr

We can rerun the analysis but use a calibration constant of 10.0 to subtract from the data. Now the fit intercept is back at the correct 200cm position.

Demo 3: Calibration Run with no Instrument Effect

DropGenCalSysErr

Do a calibration run with 0.0 value put into the calibration constant field. Send the data to a file named runCalWith0.dat.

DropDataAnalysisCalSysErr

A fit to the calibration run data shows a straight line and an intercept at 190cm, which is the position where the detector sensitive region starts.

Demo 4: Calibration Run with Instrument Effect

DropGenCalSysErr

Do a calibration run with 10.0 value put into the calibration constant field. Send the data to a file named runCalWith10.dat.

DropDataAnalysisCalSysErr

A fit to the runCalWith10.dat calibration run data with a calibration of 10 subtracted from the data shows a straight line and an intercept at 190cm.

Demo 5: Run with Systematic Error

DropGenCalSysErr

Here we generate drop data with the systematic error checkbox selected and a value of 1.2 put into the systematic error field. This will cause the time step between position measurements to be expanded by 20 percent. The data goes to a file named runSysErr1_2.dat.

DropDataAnalysisCalSysErr

A fit to the runSysErr1_2.dat shows that the intercept and initial velocity values are still as expected but now the acceleration has gotten significantly smaller. This is due to the fact that the mass took longer to reach each measurement point.

In a more complex experiment, many such variaions in different aspects of the experimental system, even those that are expected to be well understood and fixed, should be studied to see if they affect the results signficantly.

 

 

Most recent update: Nov. 8, 2005

 

              Tech
Fractals
Fractal Drawing
   Demo 1
Fractal Draw Code
Fractal Images
  Demo 2
Image Processing
  Demo 3
Histogram Image
  Demo 4
Exercises

           Physics
Calibration/SysError
SimWithCal/SysErr
  Demo 1
Analysis
  Demo 2
Examples

Exercises

  Part I Part II Part III
Java Core 1  2  3  4  5  6  7  8  9  10  11  12 13 14 15 16 17
18 19 20
21
22 23 24
Supplements

1  2  3  4  5  6  7  8  9  10  11  12

Tech 1  2  3  4  5  6  7  8  9  10  11  12
Physics 1  2  3  4  5  6  7  8  9  10  11  12

Java is a trademark of Sun Microsystems, Inc.