!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
let name &1
clean\read uv 'name'
define real allw
compute allw sum uv[10,]
let allw 1E-3/sqrt(allw)
exa allw
clean\uv_map
let fres 0
let niter 0
let ares allw*&2
!
clean\hogbom /flux 0 1000*allw
clean\write cct 'name'
!
begin data gag_scratch:uv_ccmodel.tmp
  ! UV_CCMODEL:
  ! 	Use a Clean Component Table produced by WRITE CCT
  !	to compute a UV table from an input UV coverage
  task\character "Input UV coverage" UVSAMPLE$ 'name'
  task\character "Input CLEAN Component Table" CLEAN$ 'name'
  task\character "Output UV table" UVMODEL$ 'name'-cc
  task\character "Frequency" FREQUENCY$ "0"
  task\logical "Subtract Clean Components" SUBTRACT$ NO
  task\go
end data
!
begin data gag_scratch:uv_fcct.tmp
  task\file "Input UV Sample Table" UVSAMPLE$ 'name'
  task\file "Input .LMV Cube "      IMAGE$  'name'.cct
  task\file "Output UV Model Table" UVMODEL$ 'name'-cc
  task\real "UV Model Table frequency" FREQUENCY$ 0
  task\logical "Accurate (YES) or rough (NO) precision" LARGE$ NO
  task\go
end data
!
!! run uv_ccmodel gag_scratch:uv_ccmodel.tmp /nowin
vector\run uv_fcct gag_scratch:uv_fcct.tmp /nowin
!
@ fit_flux 'name' 'name'-cc
clean\flux_scale list
delete /var myflux
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
