Package: outreachspeedoflight-tspspi
Outreach project utility: Speed of lightWork in progressThis is the frontend to thespeed of lightoutreach project. This project
has been developed to measure the speed of light similar to the idea
that Hippolyte Fizeau developed in 1848. In contrast to his experiment
in this case a little cheat is used - a bicycle works as chopper to produce
a sharp difference in light intensity of a laser source. The light travels
through two arms of the experiment - one being only a few meters away from
the chopper, the other being about hundred meters away. The signal of both
pulses is recorded on photodiodes and sampled by a fast oscilloscope (this
is where the cheating comes in - we have a definition of time and fast direct
sampling).Since this project has been developed to increase the interest in science
and let people participate actively during exhibitions it's by no way a
precision measurement - it's more of a (working) experiment that people
can look at, play with and grasp the idea of light traveling at finite speeds.This application:Gathers data from the oscilloscopeVisualizes the samplesCalculates a cross correlation of the symmetrized periodicalized recorded
functionEstimates the speed of light from this correlation function by doing
a simple peak searchDoes averaging over the estimated speed of light and visualized this.Experimental setupThe experimental setup consists of two basic parts:A chopper assembly - where a bicycle is used (or any other kind of chopper)A beam splitter and photodiode assembly as well as a long beam lineExample screenshotsRunning the embedded DAQ simulationExample run in the labConfiguration filesdaq.confThe data acquisition module configures the communication with the MSO5000 oscilloscope.Example configuration:{
	"osci" : {
		"ip" : "10.0.0.196",
		"port" : 5555,
		"sperdiv" : 1e-6,
		"trigch" : 1,
		"triglvl" : 0.5,
		"ch1" : {
			"offset" : 0,
			"scale" : 0.5
		},
		"ch2" : {
			"offset" : 0,
			"scale" : 0.1
		},
		"maxqueryrate" : 2
	},
	"chopper" : {
		"diameter" : 68e-2
	},
	"path" : {
		"length" : 100,
		"n" : 1.4
	},
	"loglevel" : "debug",
	"mode" : "continuous"
}Theoscisection configured the MSO5000 oscilloscope:Connectivity:Theipfield can be either the IP or hostname as stringportis optional and defaults to5555OptionalHorizontal axis(time) configuration:sperdivspecifies the seconds per division on the horizontal axis.
This has to be a value supported by the oscilloscopeOptionalTriggerconfiguration:trigchselects a channel (1 or 2) for the trigger to act ontriglvlselects the trigger level in volts.Optional channel configurationch1andch2:One can specify anoffsetin voltsand ascalespecified involts per divisionthat has to be
a supported value by the oscilloscopeA optional maximum query rate in Hz (i.e. queries per second) that can
be used to limit the amount of queries to the oscilloscope since at some
point it won't update it's own local display anymore due to prioritization
of network queries. When not specified the application queries as fast
as possible.Thechoppersection configures the chopper that is used. For our
experimental setup this can be a bicycle or a simple wooden wheel:diameterconfigures the diameter of the wheel in meters. This is only
used for velocity calculation from trigger rate assuming that only one trigger
is issued per cycle.An important configuration is thepath. This describes the free path
the light pulse is traveling through. One can describe thelengthin
meters and the refractive indexn(1 for air or vacuum or about 1.4 for
glass fibers)At last one can select between two modes of operation using themodeparameter:triggereduses the scope in single trigger mode and re-arms when ready to
gather more data. This ensures that both channels correspond to the same
event but looks less real time on the oscilloscopes local display.continuouscontinuously samples on the scope and queries data as fast
as possible.gui.confThe user interface can be configured usinggui.conf. This allows one to configure
some analysis parameters:The number of last measurements to be shown usinglastsamplesThe number of measurements to include in rolling averageaveragecountA optional fit of a Gaussian function into the difference signal (that can
also be used instead of the autocorrelation function to detect the time delay).
This is done in thedifffitdictionary:enableis set to the strings"true"or"false". When set
to true fitting is enabled. Keep in mind this is numerically more demanding
than the other methodsprimarycan be either"true"or"false". If set to true
the FWHM of the fit is used as measure for time delay of the signals and thus
to calculate the speed of light. When set to"false"the fit is only plotted
and the speed is still calculated using the cross correlation of both signalsdumpis set to"true"to dump fitting result and parameters
to the standard output (for debugging purposes)To handle noisy signals on the photodiodesmovingaveragecan be set to any integer
value larger than 0 (or to 0 to disable the feature). It applies a moving average
filter of the specified number of samples - and thus applies a low pass filter
to the signal.In addition one can directly configure some layout parameters:plotsizewithxandyparameters directly scales all plotsmainwindowsizewithxandyparameters scales the main window
as initially created.Note that invalid setting of those parameters might clip some graphs or cause
some strange behavior of the user interface.highscore.conf{
  "loglevel" : "debug",
  "highscorefile" : "/tmp/highscore.dat",
  "mainwindowsize" : {
    "x" : 1920,
    "y" : 1500
  },
  "tablesize" : {
    "x" : 1350,
    "y" : 250
  }
}