!
! Setup UVF structure for UV_FIT
if .not.exist(UVF) then
  define structure UVF /global
  define integer uvf%nf /global
  define logical uvf%widget /global
endif
!
begin procedure uvfit_subpar
  if .not.exist(uvf%par&1) then
    define structure uvf%par&1 /global
    define character*12 uvf%par&1%name /global
    let uvf%par&1%name E_GAUSS
    define real  uvf%par&1%par[7] uvf%par&1%range[7] /global
    let uvf%par&1%par 0 0 0.1 2 1 0 0.8   ! 0 < Ratio < 1
    define integer  uvf%par&1%start[7]  /global
    define logical uvf%par&1%remove /global
  endif
  if .not.uvf%widget return
  let uvf%par&1%name 'uvf%par&1%name'  /prompt Function /choice -
    POINT E_GAUSS C_GAUSS C_DISK RING EXPO POWER-2 POWER-3 E_DISK U_RING E_RING
  let uvf%par&1%par 'uvf%par&1%par[1]' 'uvf%par&1%par[2]' 'uvf%par&1%par[3]' 'uvf%par&1%par[4]' -
    'uvf%par&1%par[5]' 'uvf%par&1%par[6]' 'uvf%par&1%par[7]' /Prompt "Values"
  let uvf%par&1%range 'uvf%par&1%range[1]' 'uvf%par&1%range[2]' 'uvf%par&1%range[3]' 'uvf%par&1%range[4]' -
    'uvf%par&1%range[5]' 'uvf%par&1%range[6]' 'uvf%par&1%range[7]' /Prompt "Ranges"
  let uvf%par&1%start 'uvf%par&1%start[1]' 'uvf%par&1%start[2]' 'uvf%par&1%start[3]' 'uvf%par&1%start[4]' -
    'uvf%par&1%start[5]' 'uvf%par&1%start[6]' 'uvf%par&1%start[7]' /Prompt "Number of starts"
  let uvf%par&1%remove 'uvf%par&1%remove'  /prompt "Remove fit from UV data" 
end procedure uvfit_subpar
!
