     )
 
     glyphspec = {
-      type: 'line',
+      type: 'line'
       xs: 'idx'
       ys: 'power'
     }

      renderers: [glyph.ref()]
      axes: [xaxis.ref(), yaxis.ref()]
      tools: []
      width: @canvas_width - 600
      height: 200
    )



class Spectrogram
  constructor: () ->

    @gain = GAIN_DEFAULT

    # Set up image plot for the spectrogram
    @image_width = NGRAMS
    @image_height = SPECTROGRAM_LENGTH
    @image = [new Float32Array(SPECTROGRAM_LENGTH * NGRAMS)]
    @spec_source = Collections('ColumnDataSource').create(
      data:{image: @image}
    )
    spec_model = @create_spec()
    @spec_view = new spec_model.default_view(model: spec_model)

    # Set up the power waveform plot
    @power = [new Float32Array(NUM_SAMPLES)]
    @power_idx = [new Array(NUM_SAMPLES)]
    for i in [0..@power_idx[0].length-1]
      @power_idx[0][i] = (i/(@power_idx[0].length-1))*TIMESLICE
    @power_source = Collections('ColumnDataSource').create(
      data:{power: @power, idx: @power_idx}
    )
    power_model = @create_power()
    @power_view = new power_model.default_view(model: power_model)

    # Set up the single FFT plot
    @fft = [new Float32Array(SPECTROGRAM_LENGTH)]
    @fft_idx = [new Array(SPECTROGRAM_LENGTH)]
    for i in [0..@fft_idx[0].length-1]
      @fft_idx[0][i] = i
    @fft_source = Collections('ColumnDataSource').create(
      data:{fft: @fft, idx: @fft_idx}
    )
    fft_model = @create_fft()
    @fft_view = new fft_model.default_view(model: fft_model)

    # Set up the radial histogram
    @hist_source = Collections('ColumnDataSource').create(
      data: {inner_radius:[], outer_radius:[], start_angle:[], end_angle:[], fill_alpha: []}
    )
    hist_model = @create_hist()
    @hist_view = new hist_model.default_view(model: hist_model)

