

FUNCTION eis_fit_windata, fitdata

;+
; NAME:
;     EIS_FIT_WINDATA()
;
; PURPOSE:
;     Return the windata structure that was used to generate the
;     fitdata structure that is output by EIS_AUTO_FIT.
;
; CATEGORY:
;     Hinode/EIS; line fitting.
;
; INPUTS:
;     Fitdata:  A structure produced by the routine EIS_AUTO_FIT.
;
; OUTPUTS:
;     A windata structure in the form produced by eis_getwindata.pro.
;
; MODIFICATION HISTORY:
;     Ver.1, 1-Aug-2014, Peter Young
;-


file=eis_find_file(fitdata.date_obs,/lev)
wd=eis_getwindata(file,fitdata.refwvl[0],/refill)

return,wd

END
