Usage

iarc server [OPTION]

   -q      - quite mode. UNUSED OPTION?

   -n int  - sets NDR variable. default is 1.

   -c int  - sets coads variable. default is 1.

   -v source_file - sets source file. UNUSED OPTION?

   -l logfile  - sets logfile. LOGGING NOT OPERATIONAL?

   -i basefilename - by default is iarc runs in server mode. -i sets iarc to
                    run as a command line program. the string 'basefilename'
                    is used as the base filename when saving data.

   -r int  - set a repeat value used using command line mode (-i).

   -d      - a debug mode option. UNUSED OPTION??

   -p dsp_file  - Does init_controler at start up the provide dsp_file.
	               Default is off.

   -h          - print help and exits.

	-i          - turn off server mode, runs as command line programe.

Commands

autoincr
   set controller state from READY to BUSY. Unimplemented function?

bgren
   set controller state from READY to BUSY. Unimplemented function?


bias N
   set bias, gain, video board offsets, legal values for N are:
     _N_  ________NAME_______  _Video_bd___  __DSUB___  _GAIN_
      0   low bias, high gain.  DAC = 925.    0.312 v    HIGH
      1   low bias, low  gain.  DAC = 890.    0.400 v    LOW
      2   mid bias, low  gain.  DAC = 890.    0.500 v    LOW
      3   hig bias, low  gain.  DAC = 890.    0.600 v    LOW

    1. Set all the vidoe board DAC ( SVO command to all 4 brd x 8 DAC).
    2. Biase N values is arg to  pArcDev->Command( TIM_ID, SBS, N).
       This set the DSUB voltages on the ANU board.
    3. iarc_setup.ndatin_flag set to LOW or HIGH
       LOW  does GNL command. Set x1 gain on Video Boards
       HIGH does GNH command. Set x4 gain on Video Boards
   
    QUESTION: Doesn't match nsfcam's documentation.

comment
   TBD

fits -t type -n name -v value -c comment

   Add a card to iarc fits cards.

   type is:
      "TSTRING"
      "TFLOAT"
      "TLONG"
   name    is the FITS keywork.
   value   is the FITS values.
   comment is the FITS comment.

go

   call ic_readout() to start an imaging sequence from the controller.
   The has extensive arguments to control the GO.
   Example:
      go -f 130528019 -n 1 -r 1 --itime_ndrs 0 -c 1 -m SINGLE -p 3
         -x 0 -y 0 -w 2048 -h 2048
         --dven on --dvhn localhost --dvp 30123

   Readout options

   -r ndr_count N   - how many time to readout an array.
   --itime_ndrs N   - itime time express are ndr readouts
   -c N             - coadd value. ? to ?.
   -m mode          - supported modes are "SINGLE", "DOUBLE", "RAMP", "RAW".
   -p pixel_time N  - N can be 3, 5, 10 for 3usec, 5usec, 10usec per pixels
                        3 usec/pixel =  300kHz  = 0.43 sec_readout
                        5 usec/pixel =  200kHz  = 0.86 sec_readout
                       10 usec/pixel =  100kHz  = 1.31 sec_readout
   -x N - subarray X. default 0.
   -y N - subarray Y. default 0.
   -w N - subarray width. default 2048.
   -h N - subarray height default 2048

   File save options
   -f filename      - filename base.
   -n filenum       - filename number.    (NOT REALLY USED - REMOVE THE -n OPTION?)
   --path str       - filesave path. Default to ? /scrs1/nsfcam or /home/s2?

   --save  {0|1}     - set n_save_flag.
                       If TRUE  save the data to disk.
                       If FALSE save to temp.fit and sends to DV.

   DV options
   --dven  str - "on" enable dv, else it is disabled.
   --dvhn  str - dv hostname. default
   --dvp   num - dv portnumber
   --dvbuf str - dv buffer. Sets iarc_setup.str_dvbuf. Use 'A', 'B', ..., 'H' for values.
   --subab str - "on" to enable, "off" disable. Sets iarc_setup.n_subaben
   --dvinv num - T or F. NOP.
   --dvrot num - will issue 'rotation' command to dv.

   Awaiting Further Info
   -s save_flag    - Set save_all_flag variable to 1.
                     value is passed to ic_readout(), but not used.
   --beam          - nop.

   There are more options, but not document here yet.

init -f filename

 calls init_controller( filename ) whic:
    1. loads the DSP .lod filename into the controller.
    2. Does a PON (Power ON) command to the controller.

insturment

   loads some instrument specific data into iarc_server. Used to FITS headers.
   Details not documented here.

log

   not implemented

offset n_board n_dac n_value

   Uses controller command SVO to SET_VIDEO_OFFSET. Video offset are
   DAC on the Video Board input channel.

     n_board = 0 to 3 (4 board system)
     n_dac   = 0 to 7 (each board has 8 channels)
     n_value = 0 to 4095. (output for the DAC).

  if ( n_board < 0 and n_dac < 0 ) then value are applied to n_board 0-4, n_dac 0-7.

pof

   Issue VOF, VOLTAGES_OFF (on h2rg turns off VRST, VDSUB, VBG, VBP, VDDA).
   waits 30 seconds
   Issue POF, POWER_OFF

setst

   set iarc_server state  to ready. why?

status

   echo's the controller back to the caller.

stop

   Does pArcDev->StopContinuous() to stop the controller readout.

tcs

   Inputs some TCS data into iarc for FITS headers.

well

   not implement yet?