
;+ ***********************************************************************
; NAME:
;	READ_CENTER_POINT
;
; PURPOSE:
;	Cette procedure lit les valeurs associee a un point d'un fichier
;	de CENTRES ACTIFS
;
; CATEGORY:
;	Cfile
;
; CALLING SEQUENCE:
;	READ_CENTER_POINT, File, Extd, Heure, Str
;
; INPUTS:
;	FILE	Nom du fichier
;
;	EXTD	Numero de l'extension dans le fichier CENTRES 
;
;	HEURE	Heure selectionnee (HH:MN:SS:MMM)
;	
; KEYWORD PARAMETERS:
;	Non
;
; OUTPUTS:
;	STR	structure contenant les valeurs associee au point
;			type (NRH_STR_COORD)
;		Cette structure est cree dans laprocedure
;
; COMMON BLOCKS:
;	Non
;
; RESTRICTIONS:
;	Seuls les fichiers CENTRE ACTIF calcules dans NRH peuvent etre traites
;
; PROCEDURE:
;	Le numero de l'extension du fichier FITS peut etre determinee en
;	appelant CW_XTD_NRHF
;
; EXAMPLE:
;	Please provide a simple example here
;
; MODIFICATION HISTORY:
;	Ecrit par:J Bonmartin (bonmartin@obspm.fr) le 12/10/98
;-*******************************************************************

PRO READ_CENTER_POINT, File, Extd, Heure, Str

STR = {NRH_STR_COORD}
;	INIT_NRH_CFILE,File, Extd, Str, Str_lim
	FXBOPEN,UNIT,File,Extd,Header
		XCEN = FXPAR(Header, 'CRPIX1')
		YCEN = FXPAR(Header, 'CRPIX2')
		RAY = FXPAR(HEADER, 'SOLAR_R')

	FXBREAD,Unit, Time, 'TIME'
	IND= TIME_IND( Time, HMS(Heure))

	FXBREAD, Unit, Xpos, 'EWPOS'
	FXBREAD, Unit, Ypos, 'NSPOS'
	FXBREAD, Unit, Flux, 'FLUX'
		Str.Xcoord = Ind_rs(Xpos(Ind), Xcen, Ray)
		Str.Ycoord = Ind_rs(Ypos(ind), Ycen,Ray)
		Str.Inten = Flux(Ind)
		Str.Time = MSH(Time(ind))

	FXBCLOSE, Unit	

END
