   
   # Request FITS files for each channel
   requestChannels: =>
-    console.log 'requestChannels'
     
     subject = @opts.data[0]
     prefix  = subject.metadata.id

    @computeNormalizedScales()
    scales = @collection.getColorScales()
    
    @wfits.setAlpha(@defaultAlpha)
    @wfits.setQ(@defaultQ)
    @wfits.setScales.apply(@wfits, @defaultScales)
    @wfits.setupControls()
    @trigger 'swviewer:loaded'
  
  start: =>
    console.log 'start'
  
  log10: (x) ->
    return Math.log(x) / Math.log(10)
    
  # Automatically determine the scale for a given image
  # TODO: Generalize for telescopes other than CFHTLS
  computeScale: (header) =>
    # Get the zero point and exposure time
    zpoint = header.get('MZP_AB') or header.get('PHOT_C')
    exptime = header.get('EXPTIME')
    
    # Get the filter and wavelength
    filter = header.get('FILTER')
    wavelength = @wavelengths[filter]
    
    return Math.pow(10, zpoint + 2.5 * @log10(wavelength) - 26.0)

  # Normalize scales for color bands
  computeNormalizedScales: =>

            # Compute extent
            [min, max] = dataunit.getExtent(arr)

            # Initialize a model and push to collection
            layer = new Layer({band: band, fits: fits, minimum: min, maximum: max})
            @collection.add(layer)

            # Load texture
