;pro examine_region
;
;PURPOSE:
;	To return a region in x,y, and z of the H4RG detector.  The fits_read
;	function is not used here because of memory allocation issues.  This
;	routine should only consume the amount of memory necessary to hold
;	the subregion values.
;
;INPUTS:
;	FitsFileName - The name of the fits file that holds the cube
;
;KEYWORDS:
;       XStart - The beginning column pixel number
;       XStop  - The end column pixel number
;       YStart - The beginning row pixel number
;       YStop  - The end row pixel number
;       ZStart - The beginning frame number
;       ZStop  - The end frame number
;       Naxis1 - The Number of Columns in the full frame
;       Naxis2 - The Number of Rows in the full frame

pro examine_region, FitsFileName

If not Keyword_Set(XStart) then XStart = 0
If not Keyword_Set(XStop) then XStop = 100
If not Keyword_Set(YStart) then YStart = 0
If not Keyword_Set(YStop) then YStop = 100
If not Keyword_Set(ZStart) then ZStart = 0 
If not Keyword_Set(ZStop) then ZStop = 10

Position = Fits_Open_DataCube(FitsFileName, FCB, FitsHeader, 'Read')

SubRegion = Fits_Read_DataCube_Region( FitsFileName, FCB, FitsHeader, $
	    	XStart, XStop, YStart, YStop, ZStart, ZStop)

FitsClose = Fits_Close_DataCube(FCB)

stop

end

