;+
;Project
;          Hinode/EIS
;
; Name
;          eis_xrt_flare_control_initialize
;
; Purpose
;          To initialize eis_event_control structure values
;
; Category
;          Timeline planning
;          Response Studies
;
; Written
;          John Rainnie 26-Jan-2010
;
; Version
;          v0.0 JAR 26-Jun-2013
;               Instead of populating "eis_control.xrt_flare_control" with
;               parameters from studyRasters, get values directly from
;               the response db
;
;-
;______________________________________________________________________________
FUNCTION eis_xrt_flare_control_initialize , trigger ;, tlc

; Read response entry from response DB
resp = db_read_response_entry(id = trigger.resp_id)
; This is CPT's xrtf structure. Populate it with values from the
; response entry
xrtf = {eis_xrt_flare_control}

; OK, let's get on with it.
xrtf.response_identifier = resp.response_st_id		;2
xrtf.raster_identifier   = resp.raster_identifier	;2
xrtf.filler_identifier   = resp.filler_st_id		;0
xrtf.verify_fov          = resp.line_index			;1
xrtf.x0                  = resp.locate_x			;36
xrtf.y0                  = resp.locate_y			;-18
xrtf.nodata              = 0B						;n/a
xrtf.adjust_x            = resp.adjust_x			;1
xrtf.adjust_y            = resp.adjust_y			;1
xrtf.no_hunt_data        = resp.no_hunt_data		;0
xrtf.ra1_xcen            = resp.ra1_xcen			;10.0
xrtf.ra1_ycen            = resp.ra1_ycen			;20.0
xrtf.ra1_mip             = resp.ra1_mip				;1160
xrtf.ra1_yip             = resp.ra1_yip				;326
xrtf.ra1_sc_x            = resp.ra1_sc_x			;0.0
xrtf.ra1_sc_y            = resp.ra1_sc_y			;0.0
xrtf.ra1_pointed         = resp.ra1_pointed			;0

RETURN , xrtf

END
