function constInput(waveformData) {
                this.type = waveformData.type;
                //Process inputs
                this.amplitudes = JSON.parse("[" + waveformData.ints + "]");
                this.amplitudes = numeric.round(this.amplitudes); // Make sure all ints are whole numbers
                this.channel = waveformData.wavelengthIndex;
                //Gives the number of different waveforms that this input will create
                this.getNumWaveforms = function () {
                    return this.amplitudes.length;
                }
                //returns a list of waveforms associated with this constant input
                this.generateWaveforms = function () {
                    var waveforms = [];
                    for (var i = 0; i < this.amplitudes.length; i++) {
                        (function (amp) {
                            waveforms.push(function (time) {
                                return amp;
                            })
                        })(this.amplitudes[i]);
                    }
                    return waveforms;
                }
            }
//contains the inputs associated a constant input in the webform
contains the inputs associated a constant input in the webform
contains the inputs associated a constant input in the webform
function constInput(waveformData) {
                this.type = waveformData.type;
                this.amplitudes = JSON.parse("[" + waveformData.ints + "]");
                this.amplitudes = numeric.round(this.amplitudes); 
                this.channel = waveformData.wavelengthIndex;
                this.getNumWaveforms = function () {
                    return this.amplitudes.length;
                }
                this.generateWaveforms = function () {
                    var waveforms = [];
                    for (var i = 0; i < this.amplitudes.length; i++) {
                        (function (amp) {
                            waveforms.push(function (time) {
                                return amp;
                            })
                        })(this.amplitudes[i]);
                    }
                    return waveforms;
                }
            }
function constInput ( waveformData ) { this . type = waveformData . type ; this . amplitudes = JSON . parse ( "[" + waveformData . ints + "]" ) ; this . amplitudes = numeric . round ( this . amplitudes ) ; this . channel = waveformData . wavelengthIndex ; this . getNumWaveforms = function ( ) { return this . amplitudes . length ; } this . generateWaveforms = function ( ) { var waveforms = [ ] ; for ( var i = 0 ; i < this . amplitudes . length ; i ++ ) { ( function ( amp ) { waveforms . push ( function ( time ) { return amp ; } ) } ) ( this . amplitudes [ i ] ) ; } return waveforms ; } }
contains the inputs associated a constant input in the webform
contains the inputs associated a constant input in the webform
//Process inputs // Make sure all ints are whole numbers //Gives the number of different waveforms that this input will create //returns a list of waveforms associated with this constant input