pro sum_dt_genx, dt
;+
;NAME:
;       sum_dt_genx
;PURPOSE:
;       To summarize a set of detune GENX data results
;SAMPLE CALLING SEQUENCE:
;      sum_dt_genx,dt
;INPUT:
;       dt = structure (presumably averaged) of GENX detune results
;OPTIONAL KEYWORD INPUT:
;OUTPUT:
;	This version simply prints out the means of M1 & M2 using the mask dt.m
;HISTORY:
;       Written 30-Dec-97 by T. Tarbell
;	27-Mar-00 (TDT) - put online, compute the means using standard IDL
;-

fsr1 = 189.
fsr2 = 378.
type = strmid(dt.label,0,3)
vorb = v_orbital(strmid(dt.label,4,20))
; m1 = fsr1*mean(dt.ftfit(*,*).a(0),dt.m)
; m2 = fsr2*mean(dt.ftfit(*,*).a(1),dt.m)
w = where(dt.m ne 0.)
npi = 1./float(n_elements(w))
m1 = fsr1*npi*total(dt.ftfit(w).a(0))
m2 = fsr2*npi*total(dt.ftfit(w).a(1))
print,dt.label
print,'Orbital Velocity: ',vorb
print,'Mean M1 (mA): ',m1
print,'Mean M2 (mA): ',m2
end
