;---------------------------------------------------------------------------
; Document name: hsi_annsec_pattern_control.pro
; Created by:    Andre Csillaghy, May 17, 1999
;
; Last Modified: Fri Mar 23 14:35:14 2001 (Administrator@TOURNESOL)
;---------------------------------------------------------------------------
;
;+
; PROJECT:
;       HESSI
;
; NAME:
;       ANNULAR SECTOR MODULATION PATTERN
;       CONTROL STRUCTURE INITIALIZATION
;
; PURPOSE:
;       This function returns an initialized structure of type
;       {hsi_ANNSEC_pattern_control}
;
; CATEGORY:
;       HESSI Utilities
;
; CALLING SEQUENCE:
;       var = HSI_Annsec_Pattern_Control()
;
; OPTIONAL OUTPUTS:
;       var: a variable containing the following tag names:
;		R0_offset: is the distance in arcseconds between
;                          the annular sector axis (not nececessarily
;		           the telescope axis or sun-center)
;                          and the map center. r0_offset must be greater than
;		           the half-length of the FOV along the radial
;		           directions.
;                          Its default is image_dim[0]*pixel_size[0] * pixel_scale  * 10.
;		Xaxis_fov: is a switch.  Default value is 1.
;                          When set, the orientation of the annular sector
;		           FOV is along the positive X axis, i.e. the
;		           direction defined by the radial running through
;		           the axis of symmetry is parallel to the X axis.
;
; HISTORY:
;	Release 5, 5-jun-2000.
;	             richard.schwartz@gsfc.nasa.gov,
;                    added xaxis_fov and r0_offset parameters.
;       Version 1, May 17, 1999,
;           A Csillaghy, csillag@ssl.berkeley.edu
;		11-dec-2001, ras, moved pixel_scale to modul_pattern_control from annsec_pattern_control
;-

FUNCTION hsi_annsec_pattern_control, $
            R0_OFFSET= r0_offset, $
            XAXIS_FOV= xaxis_fov


var = {hsi_annsec_pattern_control}

Struct_Assign, HSI_Modul_Pattern_Strategy_Control(), var

;var.xaxis_fov=Keyword_Set(XAXIS_FOV) ? xaxis_fov: 1

var.r0_offset=Keyword_Set(R0_OFFSET) ? R0_offset: (640.> $
        max(var.image_dim)*max(var.pixel_size)*( max(var.pixel_scale)>1)*10.0)
var.modpat_skip = 1
var.factor_by = 1

RETURN, var

END


;---------------------------------------------------------------------------
; End of 'hsi_modul_pattern_control.pro'.
;---------------------------------------------------------------------------
