IDL Hints with Capture Data.

1. Data Orgainization  - Capture files are organized as:
    Axis 1 -   36  elements - Sensor/lenslet
    Axis 2 -    4  elements - Channel ( PhaseA, PhaseB, Primary_out, tt_out)
    Axis 3 - 30000 elements - Sample number.

2. IDL Scripts - script to help you.

   c_phasea, "mydata.fits"  - plots all 36 (6x6) graphs of the phase A data.

   c_phaseb, "mydata.fits"  - plots all 36 (6x6) graphs of the phase B data.

   c_ac, "mydata.fits"  - plots all 36 (6x6) graphs of the AC signal (PhaseA-PhaseB).

   c_ttout, "mydata.fits"  - plots all 3 (1x3) graphs of the tt_out.

   c_prflat, "mydata.fits"  - create 'prflat.fits', mean of primary_out[s]

   c_plot_all, 'mydata.fits'  - that cycles through each sensor showing 
      plots of Phase A, PhaseB, Primary_out and Signal. 
      loop stops after each sensor, type ".c" to continue.

3. Reading Data  - Capture files are 3D FITS files. Use
the IDL procedure readfits() to read the data:

   a = readfits('mydata.fits')

   Note: a contains a[sensor, channel, samples]

4. Plotting Examples

  3.1 Ploting individual data samples

  To Plot Sensor 0, Phase A : plot, a[0,0,*]
  To Plot Sensor 0, Phase B : plot, a[0,1,*]
  To Plot Sensor 0, primary_out: plot, a[0,2,*]

  4.2 flipping through data quickly.

  num_sensor = 36
  ch = 0;                 ; 0 is phase A
  ymin = min( a[*, ch, *] )
  ; ymax = max( a[*, ch, *] )
  ymax = 1000
  for s=0, num_sensor-1 do plot, a[s,ch,*], yrange=[ymin, ymax]


5. statistics Example

   5.1 Calculates the mean value of phase A for all sensors.
       Display the values as text and as a plot.

   num_sensor = 36
   ch = 0           ; 0 is phase A.
   m = fltarr( num_sensor )
   for s=0, num_sensor-1 do m[s] = mean( a[s,ch,*] )
   print, m
   plot, m

   5.2 Calculates the Standard Dev of phase A for all sensors.
       Display the values as text and as a plot.

   num_sensor = 36
   ch = 0           ; 0 is phase A.
   sd = fltarr( num_sensor )
   for s=0, num_sensor-1 do sd[s] = stddev( a[s,ch,*] )
   print, sd
   plot, sd