	PRO LOAD_EXPOSURE, RASTER, PACKET
;+
; Project     : SOHO - CDS
;
; Name        : LOAD_EXPOSURE
;
; Purpose     : Loads exposure information into raster arrays.
;
; Explanation : Stores data from exposure header packets into their proper
;		places in the arrays within the raster structure.
;
; Use         : LOAD_EXPOSURE, RASTER, PACKET
;
; Inputs      : RASTER	 = Structure variable defined by FORM_RASTER.
;		PACKET	 = Structure variable containing an exposure header
;			   packet.
;
; Opt. Inputs : None.
;
; Outputs     : RASTER	= This variable is updated by this routine.
;
; Opt. Outputs: None.
;
; Keywords    : None.
;
; Calls       : EVS_DECODE
;
; Common      : None.
;
; Restrictions: None.
;
; Side effects: None.
;
; Category    : Data Handling, Telemetry.
;
; Prev. Hist. : Taken from earlier routine called READ_VDS_RASTER, written
;		by William Thompson, GSFC, February 1993.
;
; Written     : William Thompson, GSFC, 5 April 1993.
;
; Modified    : Version 1, William Thompson, GSFC, 5 April 1993.
;		Version 2, William Thompson, GSFC, 16 November 1993.
;			Modified for version 3.0 of packet format document.
;		Version 3, William Thompson, GSFC, 22 December 1994
;			Added SOLAR_X, SOLAR_Y, EV_STATUS, and EV_LEVEL to
;			output structure.
;
; Version     : Version 3, 22 December 1994
;-
;
	ON_ERROR, 2
;
;  Test the number of parameters.
;
	IF N_PARAMS() NE 2 THEN MESSAGE,	$
		'Syntax:  LOAD_EXPOSURE, RASTER, PACKET'
;
;  Get the exposure number.
;
	I_EXP = PACKET.PKT.EXPOSURENUMBER
;
;  Store the exposure data in the appropriate places. 
;
	STARTTIME = RASTER.STARTTIME
	STARTTIME(0,I_EXP) = PACKET.PKT.STARTTIME
	RASTER.STARTTIME = STARTTIME
;
	RASTER.OPSLPOSITION(I_EXP)	= PACKET.PKT.OPSLPOSITION
	RASTER.OPSRPOSITION(I_EXP)	= PACKET.PKT.OPSRPOSITION
	RASTER.MIRRORPOSITION(I_EXP)	= PACKET.PKT.MIRRORPOSITION
	RASTER.SLITPOSITION(I_EXP)	= PACKET.PKT.SLITPOSITION
	RASTER.SUNSENSORPITCH(I_EXP)	= PACKET.PKT.SUNSENSORPITCH
	RASTER.SUNSENSORYAW(I_EXP)	= PACKET.PKT.SUNSENSORYAW
	RASTER.SOLAR_X(I_EXP)		= PACKET.PKT.SOLAR_X
	RASTER.SOLAR_Y(I_EXP)		= PACKET.PKT.SOLAR_Y
	RASTER.EV_LEVEL(I_EXP)		= PACKET.PKT.EVENT_LEVEL
;
;  Store the data from the event status byte.
;
	EVS_DECODE, PACKET.PKT.EVENT_STATUS, EV_STATUS
	RASTER.EV_STATUS = EV_STATUS
;
;  Signal that the exposure header was found.
;
	RASTER.HEADERFOUND(I_EXP)	= 1
;
	RETURN
	END
