!CONTENTS
8. SCL FUNCTIONS (OPG-section 8)

8.1 Overview 
8.1.1 Library Functions 
8.1.2 General Level 3 Functions 
8.1.3 Restricted Level 3 Functions 
8.1.4 Level 4 Functions 
8.2 Alphabetical Description 


!Overview
8.1 Overview
============

The SUMER Command Language supports a number of library, level 3, and
level 4 functions. All library functions and most of the level 3 functions are
available to all users, some level 3 functions and all level 4 functions are
available to authorized personnel only. These restricted functions generally
perform actions that could harm the system's integrity if executed
improperly. 

The following tables list these functions in alphabetical order; for detailed
descriptions, please refer to chapter 8.2. 

!Lib-FUNTIONS
8.1.1 Library Functions (available to all users) 

   type function

   INT32 abs( INT32 x) 
   REAL32 atan( REAL32 x) 
   REAL32 atan2( REAL32 y, REAL32 x) 
   REAL32 ceil( REAL32 x) 
   REAL32 cos( REAL32 x) 
   REAL32 exp( REAL32 x) 
   REAL32 fabs( REAL32 x) 
   INT32 FilesInRAMDisk(void) 
   REAL32 floor( REAL32 x) 
   REAL32 fmod( REAL32 x, REAL32 y) 
   uINT16 GetImageMax(void) 
   uINT16 GetPixelB2( uINT16 nrch, uINT16 ch, uINT16 zpos)
   REAL32 log( REAL32 x) 
   REAL32 log10( REAL32 x) 
   REAL32 ParamR( uINT8 nr) 
   INT32 ParamS( uINT8 nr) 
   uINT32 ParamU( uINT8 nr) 
   REAL32 pow( REAL32 x, REAL32 y) 
   INT32 PutPixelB1( uINT16 nrch, uINT16 ch, uINT16 zpos,
      uINT8 val) 
   INT32 PutPixelB2( uINT16 nrch, uINT16 ch, uINT16 zpos,
      uINT16 val) 
   INT32 PutPixelI2( uINT16 nrch, uINT16 ch, uINT16 zpos,
      INT16 val) 
   INT32 PutPixelR4( uINT16 nrch, uINT16 ch, uINT16 zpos,
      REAL32 val) 
   INT32 PutSystemR( uINT8 nr, REAL32 val) 
   INT32 PutSystemS( uINT8 nr, INT32 val) 
   INT32 PutSystemU( uINT8 nr, uINT32 val) 
   INT32 SendImage( uINT8 fmt) 
   REAL32 sin( REAL32 x) 
   REAL32 sqrt( REAL32 x) 
   REAL32 SystemR( uINT8 nr) 
   INT32 SystemS( uINT8 nr) 
   uINT32 SystemU( uINT8 nr) 
   REAL32 tan( REAL32 x) 
   INT32 Wait( uINT16 time) 
   INT32 WaitImage( void) 

!L3 FUNTIONS
8.1.2 General Level 3 Functions (available to all users)

   All level 3 functions return error codes in their return values. If no
   error has occurred, this return value is set to 0. For a list of error
   codes, please refer to OPG-section 6/9.1. 

   type function 

   INT32 AFT( void) 
   INT32 binning( uINT16 spec, uINT16 spat) 
   INT32 celestial_obj( uINT16 tmax, REAL32 tstp, uINT16
      nrimg, INT16 dark, REAL32 lambda, REAL32 delta, uINT16
      nrinc) 
   INT32 compression( INT16 n) 
   INT32 cont( void) 
   INT32 contY( void) 
   INT32 contZ( void) 
   INT32 expl_event_search( uINT16 dt, uINT8 f, uINT8 dy,
      INT16 n, uINT8 lev, uINT16 tmin, uINT16 tmax) 
   INT32 FF_mode( uINT8 mode); 
   INT32 flag( INT16 y, INT16 z, INT16 ev) 
   INT32 FlatField( uINT16 dt, REAL32 lam, REAL32 f1,
      REAL32 f0) 
   INT32 full_disk( uINT16 dt, uINT8 f, INT16 dy, INT16 schm,
      INT16 centr) 
   INT32 IIM_mode( INT16 mode) 
   INT32 IIM_div( uINT16 div) 
   INT32 lambda11( uINT16 px, REAL32 lm1) 
   INT32 lambda13( uINT16 px, REAL32 lm1, REAL32 lm2,
      REAL32 lm3) 
   INT32 lambda18( uINT16 px, REAL32 lm1, REAL32 lm2,
      REAL32 lm3, REAL32 lm4, REAL32 lm5, REAL32 lm6,
      REAL32 lm7, REAL32 lm8) 
   INT32 lambda21( uINT16 px, REAL32 la1) 
   INT32 lambda23( uINT16 px, REAL32 la1, REAL32 la2,
      REAL32 la3) 
   INT32 lambda28( uINT16 px, REAL32 la1, REAL32 la2,
      REAL32 la3, REAL32 la4, REAL32 la5, REAL32 la6,
      REAL32 la7, REAL32 la8) 
   INT32 point( INT16 y, INT16 z) 
   INT32 ref_spec( uINT16 dt, uINT8 f, REAL32 lambda,
      REAL32 delta, uINT16 nrinc) 
   INT32 rot_comp( REAL32 dt) 
   INT32 RSC( uINT8 dt) 
   INT32 RSC_scan( uINT8 dt, INT16 dy, uINT8 count) 
   INT32 Set_SphelDirection( INT16 dir) 
   INT32 Set_SphelPointCenter( INT16 y, INT16 z) 
   INT32 slit( uINT8 n) 
   INT32 spectrohelio1( uINT16 dt, uINT8 f, INT16 dy, INT16
      n) 
   INT32 spectrohelio2( uINT16 dt, uINT8 f, INT16 dy, INT16
      n) 
   INT32 spectrohelio3( uINT16 dt, uINT8 f, INT16 dy, INT16
      n) 
   INT32 spectrohelio4( uINT16 dt, uINT8 f, INT16 dy, INT16
      n) 
   INT32 sphel_mode( uINT8 mode) 

!!L3 FUNC (restricted)
8.1.3 Restricted Level 3 Functions (available to authorized personnel only) 

   For functional descriptions of these functions, please refer to the
   corresponding telecommands (TC) as reported in OPG-section 6. 

   type function 

   INT32 Do_DET_Cmd( INT16 cmd, INT16 par1, INT16 par2)
   INT32 MCInitPos( INT16 MCDev) 
   INT32 MCMove( INT16 MCDev, INT16 newpos, INT16
      mode) 
   INT32 MCPos2( INT16 MCDev1, INT16 MCDev2, INT16
      newpos1, INT16 newpos2) 
   INT32 PowerUp( void) 
   INT32 RestoreSettings( void) 
   INT32 SaveSettings( void) 
   INT32 SetMCPHighVoltage( INT16 voltage) 
   INT32 ShutDown( void) 
   INT32 StandBy( void) 
   INT32 SwitchOFF_PSU( void) 
   INT32 SwitchON_PSU( void) 

!L4 FUNTIONS
8.1.4 Level 4 Functions (available to authorized personnel only) 

   All level 4 functions are available to authorized users only. For
   functional descriptions, please refer to the corresponding
   telecommands (TC) as reported in OPG-section 6. 

   type function 

   INT32 DET_HighV( INT16 act) 
   INT32 DET_MCPHigh( INT16 act) 
   INT32 DET_QualifyHV( INT16 act, INT16 StimPulser) 
   INT32 DET_Readout( void) 
   INT32 DET_X_Charge( INT16 Threshold) 
   INT32 DET_X_Timing( INT16 Threshold) 
   INT32 DET_X_UpperThreshold( INT16 Threshold) 
   INT32 DET_Y_Charge( INT16 Threshold) 
   INT32 DET_Y_Timing( INT16 Threshold) 
   INT32 DET_Y_UpperThreshold( INT16 Threshold) 

   INT32 HEA_Auto( INT16 HeaterNr) 
   INT32 HEA_Bias( INT16 HeaterNr, INT16 Bias) 
   INT32 HEA_Interval( INT16 TickSize) 
   INT32 HEA_Manual( INT16 HeaterNr, INT16 OnTicks) 
   INT32 HEA_Mode 

   INT32 IIM_AutoClear( INT16 action) 
   INT32 IIM_ChannelSelect( INT16 action) 
   INT32 IIM_Chk( void) 
   INT32 IIM_Clear( void) 
   INT32 IIM_HMrequest( INT16 mode) 
   INT32 IIM_InputGate( INT16 action) 
   INT32 IIM_LatchUpTest( INT16 mode) 
   INT32 IIM_LUStrobeA( void) 
   INT32 IIM_LUStrobeB( void) 
   INT32 IIM_PowerCommandA( INT16 action) 
   INT32 IIM_PowerCommandB( INT16 action) 
   INT32 IIM_SetPowerSwitch( INT16 action) 
   INT32 IIM_Status( void) 

   INT32 MC_GetERAMValue( INT16 dev, uINT16 addr) 
   INT32 MC_GetErr( INT16 dev) 
   INT32 MC_GetFreq( INT16 dev) 
   INT32 MC_GetIRAMValue( INT16 dev, INT16 addr) 
   INT32 MC_GetSteps( INT16 dev) 
   INT32 MC_MC1Qualify( INT16 dev, INT16 qual) 
   INT32 MC_Power( INT16 dev, INT16 func) 
   INT32 MC_ReadHK( INT16 dev, INT16 channel) 
   INT32 MC_Reset( INT16 dev) 
   INT32 MC_ScanStep( INT16 dev, INT16 steps) 
   INT32 MC_ScanMotion( INT16 dev) 
   INT32 MC_Selftest( INT16 dev) 
   INT32 MC_SetERAMValue( INT16 dev, uINT16 addr,
      INT16 dat) 
   INT32 MC_SetIRAMValue( INT16 dev, INT16 addr, INT16
      dat) 
   INT32 MC_SetMoveVars( INT16 dev, INT16 pattern, uINT8
      phase, uINT8 retain) 
   INT32 MC_SetVariable( INT16 dev, INT16 var, INT16 val) 
   INT32 MC_TST_RelPos( INT16 dev, INT16 steps) 

   INT32 POW_Execute( INT16 dev, INT16 act) 
   INT32 POW_ReadHK( void) 
   INT32 POW_WAXpulse( void) 
   INT32 POW_WAXrequest( INT16 request_delay, INT16
      pulse_delay) 
   INT32 POW_WAXTest( void) 

   INT32 RSC_Off( void) 
   INT32 RSC_On( INT16 time) 
   INT32 RSC_PowChk( void) 
   INT32 RSC_ReadImage( void) 

   INT32 SYS_CCBStatus( INT16 CU) 
   INT32 SYS_ClrError( INT16 CU) 
   INT32 SYS_Config( uINT16 b00_15, uINT16 b16_31,
      uINT16 b32_47, uINT16 b48_63, uINT16 b64_71) 
   INT32 SYS_CU_Monitor( INT16 CU, INT16 mode) 
   INT32 SYS_CU_Stop( INT16 CU) 
   INT32 SYS_Dump( INT16 CU, uINT16 HiAddr, uINT16
      LoAddr) 
   INT32 SYS_GetBankSelect( INT16 CU) 
   INT32 SYS_GetBankStatus( INT16 CU) 
   INT32 SYS_GetError( INT16 CU) 
   INT32 SYS_GetHKrecord( INT16 HKnum, INT16 MCdev) 
   INT32 SYS_GetVersion 
   INT32 SYS_IO_Select( INT16 interface) 
   INT32 SYS_Operator( INT16 Sci, INT16 Loc, INT16 Tar,
      INT16 FOR_Num, INT16 FOR_Date) 
   INT32 SYS_Peek( INT16 CU, uINT16 HiAddr, uINT16
      LoAddr) 
   INT32 SYS_Poke( INT16 CU, uINT16 HiAddr, uINT16
      LoAddr, uINT8 byte) 
   INT32 SYS_RamDisk( INT16 mode, INT16 index, INT16
      mark) 
   INT32 SYS_ReadStatus( void) 

   INT32 TST_CRCPatternTest( INT16 CU, INT16 BgnAddr,
      INT16 EndAddr) 
   INT32 TST_MoviTest( INT16 CU, INT16 BgnAddr, INT16
      EndAddr) 
   INT32 TST_WalkTest( INT16 CU, INT16 BgnAddr, INT16
      EndAddr) 

!ALPHABETICAL ORDER

8.2 Description
===============

!!A

!!!abs Library 

Syntax
   INT32 abs( INT32 x);
Function
   The function abs returns the absolute value of an integer.
see also
   fabs 


!!!AFT Level 3 

Syntax
   INT32 AFT( void); 
Function

   The function AFT is a simple operational routine for diagnostic
   purposes that performs an abbreviated functional test of the SUMER
   instrument's hardware, i.e. of the DPU, the PDU, the RSC, the
   MAMA detectors, the image integration memories, the motor
   controllers, and the heaters. As it does not execute any possibly
   dangerous operations, it can be used at any time during testing. 

   The function AFT returns an error code (AFTERR) if any error has
   been detected. The 16-bit AFT result (SKAFTRES) is transferred
   in SOHO SUMER HK channel 0. 


!!!atan Library 

Syntax
   REAL32 atan( REAL32 x); 
Function
   The function atan returns the arc tangent of x, i.e. an angle alpha in
   radians, -þ/2þalphaþ+þ/2. 
see also
   sin,cos, tantan, atan2 
Example

                         REAL32 alpha;
                         alpha = atan( 1.0);



!!!atan2 Library 

Syntax
   REAL32 atan2( REAL32 y, REAL32 x); 
Function
   The function atan2 returns the arc tangent of y/x, i.e. an angle alpha
   in radians, -þþalphaþ+þ. The resulting angle is placed into the
   correct quadrant. 
see also
   sin,cos, tantan, atan 
Example

                  REAL32 alpha;
                  alpha = atan2( 2.0, -1.0);

!!B

!!!binning Level 3 

Syntax
   INT32 binning( uINT16 spec, uINT16 spat); 
Function
   The function binning takes two arguments that control the bin-ning
   of the image data before the compression is performed. The factors
   spec (range [1 .. 1024]) and spat (range [1 .. 360]) indicate the
   number of pixels that are to be binned in the spectral and spatial
   direction, respectively. To select no binning, the function is to be
   called with both parameters set to 1. Please note that only very few
   combinations of spec and spat produce data formats compliant with
   the existing telemetry data formats and the compression scheme
   selected (cf. spectrohelio1). 
see also
   a>compression, a>spectrohelio1 
Example

                  INT32 res;
                  res = binning( 4, 2);  /* 4-fold spectral, 2-fold spatial
                  :
                  /* --- data acquisition ---*/
                  :
                  res = binning( 1, 1);  /* turn off binning */


!!C

!!!ceil Library 

Syntax
   REAL32 ceil( REAL32 x); 
Function
   The function ceil returns the smallest integer greater or equal than
   the argument. 
see also
   floor 


!!!celestial_obj Level 3 

Syntax
   INT32 celestial_obj( uINT16 tmax, REAL32 tstp, uINT16 nrimg,
   INT16 dark, REAL32 lambda, REAL32 delta, uINT16 nrinc); 
Function
   The function celestial_obj can be used to locate (search phase) and
   observe (study phase) celestial objects outside the Sun. 

   Preparing for celestial_obj, the largest (4.0"*360") available has slit
   has to be selected. The wavelength band to be used for detection has
   to be set up (by calling lambda11). The telescope has to be pointed to
   a position outside the Sun where the object can be expected to pass.
   The function celestial_obj starts by determining the detection
   threshold value. If the parameter dark is negative, the threshold level
   is derived from a dark signal image acquired at the current position.
   A non-negative value (darkþ0) gives the threshold value to be used. 

   In the search phase, images are acquired using an integration time of
   40% of the step time tstp seconds. If four consecutive images contain
   pixel values higher than twice the threshold value, the object has
   been detected and the study phase begins. If no object has been
   detected after the maximum search time tmax seconds, the function
   celestial_obj stops and returns a NOTRIGGER error. 

   After the object has been located, the study phase begins. As SOHO
   will always be pointed to the Sun, objects outside the Sun will pass
   through SUMER's field of view. To correct for this motion, the
   telescope's pointing has to be changed by two half steps (=0.76")
   every tstp seconds (for stars, the value of tstp will be about 18.5s; for
   planets and comets, values different from 18.5 s have to be given
   according to the object's expected motion. If tstp is set to < 0.0, the
   direction of tracking is reversed. If tstp is set to 0.0, the default value
   is selected. 

   During study phase, the object is observed in (nrinc+1) wave-length
   bands starting at lambda � and incrementing by delta �. In every
   wavelength band, nrimg images will be acquired. The integration
   time has to be about 1.5 seconds less than tstp to allow for updating
   the pointing between consecutive images. One image will be omitted
   whenever the wavelength is changed. 

see also
   expl_event_search 


!!!compression Level 3 

Syntax
   INT32 compression( INT16 cmp); 
Function

   The function compression selects a compression scheme that will be
   used, if necessary, to compress the SUMER image data prior to
   transmission. Whether the image data have to be compressed at all
   will be determined by the image format requested in an imaging
   function (e.g. spectrohelio1). The compression scheme selected has
   to comply with the image format. 

   If the parameter cmp is set to 0, no automatic compression will be
   performed. Instead, the user can use the SCL facilities to operate on
   the image (user defined compression). 

   If the parameter cmp is set to a negative value, in addition to the user
   defined compression an automatic compression will be performed
   after the user has released the image to the telemetry. The
   compression scheme to be used is determined by negating the
   scheme's number. 

   Note: User defined compression schemes (cmpþ0) cannot be set if
   the RAM disk contains uncompressed images. 

   The table below lists the parameter values cmp for the compression
   schemes available and the compression execution times. 

   The execution times are valid for the compression of an image of
   format #9 (50*360 pixels of 16 bit raw data, i.e. 50 pixels in spectral
   and 360 pixels in spatial direction). For compression scheme 17,
   three format #9 images taken from the same integration are
   extracted for compression. 

   The execution times are valid for the nominal SUMER DPU system
   configuration where both ECP and SPU are active. In the emergency
   configuration where only one of theses CUs is operational, expect the
   compression times to be higher at least by a factor of 2. 

   For a table giving all possible combinations of input image formats,
   output image formats, and compression schemes, please refer to
   spectrohelio1. 

   compression scheme time/s 

    1. bytescale_min_max 0.69 
    2. bytescale_local_high 0.89 
    3. squareroot_min_max 1.15 
    4. squareroot_local_high 1.35 
    5. quasilog_min_max 0.92 
    6. relevant_squareroot_max 8.28 
    7. gauss_a1 1.03 
    8. gauss_a2 1.03 
    9. gauss_a4 1.03 
    10. gauss_b1 0.96 
    11. gauss_b2 0.96 
    12. gauss_b4 0.96 
    13. prim_1 0.63 
    14. prim_2 0.69 
    15. prim_4 0.77 
    16. Lemaire's addition scheme 0.29 
    17. Lemaire's 5 moments of 3 lines scheme 0.84 

Remarks
   Description of Compression Schemes (by I.E.Dammasch, MPAe)

   for possible input image formats: arbitrary spectral dimension *
   arbitraty spatial dimension * 16 bits (resulting output formats:
   spectral dimension * spatial dimension * 8 bits) 

cmp=1 (bytescale_min_max):

   2-byte integers are transformed to 1-byte integers by linear scaling.
   The maximum and the minimum value of the image are transmitted
   in the header (for decompression). - This is the best global bytescale
   method. 

cmp=2 (bytescale_local_high): 

   2-byte integers are transformed to 1-byte integers by linear scaling.
   The highest significant bit of each single profile of the image is
   searched; the number of bits thus to be reduced is transmitted (for
   decompression), together with its profile. Therefore, one byte is
   overwritten, i.e. one value per profile is lost. - This method is better
   than all global bytescale methods. 

cmp=3 (squareroot_min_max):

   2-byte integers are transformed to 1-byte integers by square rooting.
   The maximum and the minimum value of the image are transmitted
   in the header (for decompression). - This is the best global
   squareroot method. 

cmp=4 (squareroot_local_high):

   2-byte integers are transformed to 1-byte integers by square rooting.
   The highest significant bit of each single profile of the image is
   searched; the number of bits thus to be reduced is transmitted (for
   decompression), together with its profile. Therefore, one byte has to
   be overwritten, i.e. one value per profile is lost. - This method is
   better than all global squareroot methods. 

cmp=5 (quasilog_min_max):

   2-byte integers are transformed to 1-byte integers by using their
   natural logarithm. The maximum and the minimum value of the
   image are transmitted in the header (for decompression). Values
   below a break-even level are not compressed. - This is the best
   quasilog method. 

   for possible input image formats: 50 * {120 or 360} * 16 bits, i.e.
   "spectral line", short or long slit (resulting output formats: 25 * {120
   or 360} * 8 bits) 

cmp=6 (relevant_squareroot_max):

   A procedure for preprocessing the profiles of the image (no longer
   used in schemes 7 ... 12) selects the data entries considered relevant
   for each profile and seperates them from the background: Profiles are
   sorted according to their total intensity; a number of relevant entries
   is assigned to each profile according to its rank (these numbers were
   calculated such that (a) they reflect the correlation between total
   intensity and width of a profile, and (b) that the number of bits after
   reduction and coding fits the right format); only the upper intensities
   of a profile are considered relevant, the others are averaged to form
   the profile background which is subtracted. Resulting 2- byte
   integers are transformed to 1-byte integers by square rooting. The
   maximum value of the image is transmitted in the header for
   decompression (the minimum is 0 by construction.) Afterwards, the
   data are coded: First, the background value of each profile is stored in
   1 byte, then the relevant data of the profile are coded with their 1
   byte preceded by a '1', while the irrelevant (background) data are
   coded with a '0'. The resulting string can be cut into dim*25 bytes
   which are then transmitted. (For a detailed description, see:
   I.E.Dammasch, "Analysis Of Solar UV Spectra On-Board The
   SOHO Spacecraft", in: ESO Conference and Workshop Proc. No. 41,
   Garching 1992, 137-140.) 

   for possible input image formats: 50 * {120 or 360} * 16 bits, i.e.
   "spectral line", short or long slit (resulting output formats: {1 or 2 or
   4} * {120 or 360} * 16 bits) 

cmp=7, 8, 9 (gauss_a):

   First, the profiles are preprocessed and their background subtracted
   (see cmp=13,14,15), then a procedure tries to fit the upper part of
   each profile to a gaussian: After finding the maximum of the profile
   and starting from its wavelength, the half maximum is searched on
   the left and right side and calculated at sub-pixel accuracy by linear
   interpolation. (Since the procedure does not work when the
   maximum is at the edges, the edges are set to 0. If the whole profile is
   0, the half maximum is supposed to be between pixel 24 and 25.)
   Later, up to four parameters can be transmitted: the background, the
   realized maximum, the estimated centroid half way between the full
   width at half maximum, and the width, which can easily be
   transformed to the standard deviation. The centroid and the width,
   being by construction smaller than 50 (pixels), are later transmitted
   with two decimal points as 2- byte integers. The profile maximum is
   automatically a 2-byte integer. The header is used to transmit
   additional information, e.g. the average width or the average centroid
   of the whole line. - By using this fit, the maximum of each profile
   remains unchanged; the profile intensity may be underestimated. 

cmp=7 (gauss_a1):

   A spectral line of 2-byte integers is transformed to a format
   containing one column of 2-byte integers, namely the profile
   maximum. Averaged centroid and width are transmitted in the
   header for restoring the profiles (minus background). 

cmp=8 (gauss_a2):

   A spectral line of 2-byte integers is transformed to a format
   containing two columns of 2-byte integers, namely the profile
   maximum and centroid. The averaged width is transmitted in the
   header for restoring the profiles (minus background). 

cmp=9 (gauss_a4):

   A spectral line of 2-byte integers is transformed to a format
   containing four columns of 2-byte integers, namely the profile
   background, maximum, centroid and width. 

cmp=10, 11, 12 (gauss_b):

   First, the profiles are preprocessed and their background subtracted
   (see cmp=13,14,15), then a procedure tries to fit each profile to a
   gaussian: After calculating the integral of the profile, the relation
   between the integral and the 'probable error' is exploited; the points,
   where 25% and 75% of the total intensity are reached, are calculated
   at sub-pixel accuracy by linear interpolation; the width between
   these points is twice the probable error and can easily be transformed
   to the standard deviation. The point, where 50% is reached, is
   supposed to be the centroid. While other things are similar to the
   scheme gauss_a, here the total intensity is estimated correctly
   instead of the maximum, which is generally underestimated. To
   make sure that the value to be transmitted takes only 2 bytes, the
   total intensity is later transformed to the estimated maximum,
   dividing it by the profile's (or averaged) width. 

cmp=10 (gauss_b1):

   A spectral line of 2-byte integers is transformed to a format
   containing one column of 2-byte integers, namely the estimated
   profile maximum. Averaged centroid and width are transmitted in
   the header for restoring the profiles (minus background). 

cmp=11 (gauss_b2):

   A spectral line of 2-byte integers is transformed to a format
   containing two columns of 2-byte integers, namely the estimated
   profile maximum and the centroid. The averaged width is
   transmitted in the header for restoring the profiles (minus
   background). 

cmp=12 (gauss_b4):

   A spectral line of 2-byte integers is transformed to a format
   containing four columns of 2-byte integers, namely the profile
   background, estimated maximum, centroid and width. 

cmp=13, 14, 15 (prim):

   This procedure tries to fit a profile to a gaussian in a primitive and
   fast way, but possibly not so exact. First, the background is taken to
   be the average of the three leftmost and the three rightmost spectral
   pixels of the input format. Therefore, the experimenter has to place
   the spectral line within the image such that there are no systematic
   deviations from the background at the edges. The total intensity of
   the profile and the center of gravity are calculated after subtracting
   this background. For determining the standard deviation, the
   equation sigma=integral/(maximum*sqrt(2*pi)) is exploited. The
   parameters are estimated correctly if there is only one line in the
   observed spectrum, and if the line is not situated on the right or left
   border of the input format, but rather 3 pixels within. If there is more
   than one line in the input format, their intensities are added; the
   resulting center of gravity and the width would be something like a
   weighted average. Averaged width and centroid of the whole line are
   not calculated because of time performance considerations, therefore
   the profiles can only be restored from four parameters (i.e. last
   scheme). 

cmp=13 (prim_1):

   A spectral line of 2-byte integers is transformed to a format
   containing one column of 2-byte integers, namely the (scaled) total
   profile intensity. For transmission, the intensity is divided by the
   spectral dimension to make sure that it fits into 2 bytes. 

cmp=14 (prim_2):

   A spectral line of 2-byte integers is transformed to a format
   containing two columns of 2-byte integers, namely the (scaled) total
   profile intensity and centroid. For transmission, the intensity is
   divided by the spectral dimension to make sure that it fits into 2
   bytes; the centroid is transmitted with two decimal points. 

cmp=15 (prim_4):

   A spectral line of 2-byte integers is transformed to a format
   containing four columns of 2-byte integers, namely profile
   background, maximum, centroid and width. Using this fit, the profile
   maximum remains unchanged; the total intensity could be slightly
   influenced due to the background subtraction. 

cmp=16 (Lemaire's addition scheme):

   A spectral line of 2-byte integers is transformed to a format
   containing one column of 2-byte integers by simply taking the sum
   of all 50 intensities of a profile. 

cmp=17 (Lemaire's 5 moments of 3 lines scheme):

   Three spectral lines of 2-byte integers are transformed to a format
   containing five columns of 2-byte integers by taking profile
   maximum, centroid and width from the first line like in method
   prim_4, as well as the total profile intensities from the second and
   the third line; see the applying POPs. 

see also

   binning, spectrohelio1, spectrohelio2, SendImage, WaitImage 

Example

           
                  /* perform automatic compression */
                  res = compression( +3);
                  :
                  :
                  /* set up for user-defined compression scheme */
                  res = compression( 0);
                  :
                  :
                  /* set up combination of an user-defined */
                  /* compression scheme and an automatic one */
                  res = compression( -3);


!!!cont Level 3 

Syntax
   INT32 cont( void); 
Function
   The function cont checks if a valid IIF flag or a repoint TC has been
   received. If so, the solar coordinates given there can be retrieved by
   calling contY and contZ. The value returned indicates the mode: 

   mode = 0: neither IIF nor repoint TC received
   mode = 1: IIF received
   mode = 2: repointing TC received 

   In case both an IIF and a repoint telecommand were received, the IIF
   is regarded to be of higher priority. In consequence, the coordinates
   given in the IIF are evaluated. 

   The conversion of the coordinates given in the inter-instrument
   message from the SOHO coordinate system (Xii, Yii) to the SUMER
   coordinate system (YE, ZE) involves an offset of the origin by deltaY
   and deltaZ in the YO, ZO system of SOHO and a rotation by an
   angle alpha (positive from -ZO to +ZE): Yii is parallel to ZO, and
   Xii is antiparallel to YO: 

   hy = Xii + deltaY
   hz = -Yii - deltaZ

   YE = cos(alpha) * hy + sin(alpha) * hz
   ZE = -sin(alpha) * hy + cos(alpha) * hz 

   The values of alpha, deltaY, and deltaZ are global system parameters
   (cf. SystemR,SystemS, SystemU). 

see also
   contY, contZ, flag 


!!!contY Level 3 

Syntax
   INT32 contY( void); 
Function
   The function contY returns the solar coordinate YE (in units of
   0.0625") retrieved by cont from the latest IIF (converted from the
   coordinates YO, ZO given there) or repoint TC. No error codes are
   returned. 

see also
   cont, contZ, flag 


!!!contZ Level 3 

Syntax
   INT32 contZ( void); 
Function
   The function contZ returns the solar coordinate ZE (in units of
   0.0625") retrieved by cont from the latest IIF (converted from the
   coordinates YO, ZO given there) or repoint TC. No error codes are
   returned. 

see also
   cont, contY, flag 


!!!cos Library 

Syntax
   REAL32 cos( REAL32 x); 
Function
   The function cos returns the cosine of the angle given in radians. 

see also
   atan, atan2, sin, tan 

!!D

!!!DET_HighV Level 4 

Syntax
   INT32 DET_HighV( INT16 act) 
Function
   cf. telecommand DET_HighV, OPG-section 6.8.4 


!!!DET_QualifyHV Level 4 

Syntax
   INT32 DET_QualifyHV( INT16 act, INT16 StimPulser) 
Function
   cf. telecommand DET_QualifyHV, OPG-section 6.8.4 


!!!DET_Readout Level 4 

Syntax
   INT32 DET_Readout( void) 
Function
   cf. telecommand DET_Readout, OPG-section 6.8.4 


!!!DET_X_Charge Level 4 

Syntax
   INT32 DET_X_Charge( INT16 voltage) 
Function
   cf. telecommand DET_X_Charge, OPG-section 6.8.4 


!!!DET_X_Timing Level 4 

Syntax
   INT32 DET_X_Timing( INT16 voltage) 
Function
   cf. telecommand DET_X_Timing, OPG-section 6.8.4 


!!!DET_X_UpperThreshold Level 4 

Syntax
   INT32 DET_X_UpperThreshold( INT16 voltage) 
Function
   cf. telecommand DET_X_UpperThreshold, OPG-section 6.8.4 


!!!DET_Y_Charge Level 4 

Syntax
   INT32 DET_Y_Charge( INT16 voltage) 
Function
   cf. telecommand DET_Y_Charge, OPG-section 6.8.4 


!!!DET_Y_Timing Level 4 

Syntax
   INT32 DET_Y_Timing( INT16 voltage) 
Function
   cf. telecommand DET_Y_Timing, OPG-section 6.8.4 


!!!DET_Y_UpperThreshold Level 4 

Syntax
   INT32 DET_Y_UpperThreshold( INT16 voltage) 
Function
   cf. telecommand DET_Y_UpperThreshold, OPG-section 6.8.4 


!!!Do_DET_Cmd Restricted Level 3 

Syntax
   INT32 Do_DET_Cmd( INT16 cmd, INT16 Par1, Par2) 
Function
   cf. telecommand Do_DET_Cmd, OPG-section 6.7.2 

!!E

!!!exp Library 

Syntax
   REAL32 exp( REAL32 x); 
Function
   The function exp returns the value of the exponential function e to
   the power of x. 
see also
   log, log10, pow, sqrt 


!!!expl_event_search Level 3 

Syntax
   INT32 expl_event_search( uINT16 dt, uINT8 f, uINT8 dy, INT16 n,
   uINT8 lev, uINT16 tmin, uINT16 tmax); 
Function

   The function expl_event_search looks for explosive events on the
   Sun in a field of view that is represented by the rectangle (yñn*dy/2,
   zñm/2) where (y,z) are the solar coordinates set with
   Set_SphelPointCenter (for coordinate directions, cf. point). The
   height of the slit used is m. The integration time is indicated by dt
   (cf. spectrohelio1), the image data format is f (cf. table 5-3, section
   5). The search starts after the minimum time tmin (in units of 250
   ms), it ends after the maximum time tmax (in units of 250 ms). If an
   event ex-ceeding the threshold lev is detected within that time
   range, an inter-instrument flag is issued providing the solar
   coordinates of the event (cf. flag) to other instruments. In addition,
   the telescope's pointing is adjusted accordingly by calling the level 3
   function point. 

   The function expl_event_search cannot be started if the RAM disk
   contains any images (cf. FilesInRAMDisk). The function acquires
   and stores images until the minimum search time tmin is reached.
   After that, it will overwrite the oldest image available in the RAM
   disk by the latest image until the maximum search time tmax has
   been reached. If no event has been detected by then, the function
   returns 0; if an event has been detected, it returns 1. A trigger bit is
   then set in the image header. 

   Remarks: Description Of Detection Algorithm (by I.E.Dammasch,
   MPAe): 

   The algorithm, deciding if the trigger threshold lev is exceeded,
   works as follows. First, the centroid pixel (center of gravity) of the
   observed line has to be calculated. This is done by simply summing
   the whole image to get the average profile. The pixel where the
   maximum is situated is taken to be the centroid. The discrimination
   to be figured out is then: Are there any strong processes on blue
   shifted or on red shifted wings apart from the central and basically
   Gaussian process of the observed line? This is decided by calculating
   the ratio: integrated intensities of the blue and red shifted processes
   of approximately 40 - 70 km/s divided by the integrated intensities
   around the centroid, i.e. less than 30 km/s. 

   In the case of small profile intensities, the ratio is dominated by
   background noise and physically meaningless. Therefore, in a first
   discriminatory step, only those profiles are taken into account that
   have total intensities above 50% of the maximum total intensity in
   the observed image. The total intensities are calculated in a way
   similar to compression method 13 (prim_1). The significant profile
   with the highest ratio is then taken to be a candidate for an explosive
   event and can be compared with the trigger level. In the positive case,
   the position of the possible explosive event can be calculated from
   the raster step (y-coordinate) and the local pixel of the candidate (z-
   coordinate). 

   From HRTS data provided to us by Olaf Kjeldseth-Moe (University
   of Oslo) and from literature data (Dere, Bartoe & Brueckner, Solar
   Physics, 123:41- 68, 1989), the following ratio percentages can be
   expected (estimates TBC). 

   5-15 no explosive events.
   30-40 explosive events maybe in starting or declining phase.
   50-120 full blown explosive events.

   By setting the parameter lev, the user can therefore decide about the
   desired level of sensitivity and use knowledge about the usual shape
   of the observed line and maybe hidden lines. 

see also
   celestial_obj, FilesInRAMDisk, point, Set_SphelPointCenter, 
   Set_SphelDirection, spectrohelio3 

!!F

!!!fabs Library 

Syntax
   REAL32 fabs( REAL32 x); 
Function
   The function fabs returns the absolute value of a floating-point
   number. 
see also
   abs 


!!!FF_mode Level 3 

Syntax
   INT32 FF_mode( uINT8 mode); 
Function
   The function FF_mode enables or disables the flat-field correction
   that is to be performed before binning and compressing the raw
   image data: 

   mode = 0: disable flat-field correction
   mode = 1: enable flat-field correction
   mode = 2: execute flat field correction
   (for single image operations only!!!)

   In case the user is performing single image operations (compression
   scheme numbers þ 0), no automatic flat field correction will be
   performed even if mode was set to 1. Instead, the user is responsible
   for executing the correction after the end of the data acquistion, i.e.
   when an image is stored in the internal image buffer. 

see also
   FlatField, WaitImage 
Example

             :
             /* set user-defined and automatic compression */
             res = compression( -5);
             :
             /*--- acquire image ---*/
             :
             /*--- perform action on the image ---*/ 
             : 
             /* finished, ready to send the image, so ... */ 
             /* ... perform flat field correction now ... */ 
             res = FF_mode( 2); 
             : 
             /* ... and finally send the image */ 
             /* as a negative compression scheme (-1) has been specified, 
             an automatic image compression will be performed before 
             transmission */ 
             res = SendImage( 2); 
             :



!!!FilesInRAMDisk Library 

Syntax
   INT32 FilesInRAMDisk( void); 
Function
   The function FilesInRAMDisk returns the number of files
   (compressed + uncompressed) in the RAM disk. The function
   returns zero if no files are in the RAM disk and no image is currently
   transferred. 

   In conjunction with the library function Wait a waiting loop can be
   set up which terminates an UDP when all science data produced by
   the UDP have been transferred to ground. 

see also
   Wait 
Example

         :
         /* record images and wait until all data is transferred */ 
         main; 
             INT32 res; 

             res = compression (5);          /* compression log */ 
             res = spectrohelio1 (4, 8, 0, 5); 
 
             while (FilesInRAMDisk()) 
                 res = Wait (4);             /* wait 1 second */ 
             whileend; 
         end; 



!!!flag Level 3 

Syntax
   INT32 flag( INT16 y, INT16 z, INT16 ev); 
Function
   The function flag sets up the parameters of an inter-instrument
   message:

   - the inter-instrument solar coordinates Xii, Yii in units of
      2", converted from the SUMER coordinates YE, ZE given by
      y and z, 
   - the inter-instrument message validity flag, and 
   - the event ID given by ev. 

   If no valid event has been detected, the coordinates indicate the
   current telescope pointing; the message validity flag is set to invalid. 

   The conversion of y, z from the SUMER coordinate system (YE, ZE)
   to the SOHO coordinate system (Xii, Yii) involves a rotation by an
   angle alpha (positive from -ZO to ZE) and an offset of the origin by
   deltaY and deltaZ defined in the YO, ZO system of SOHO: 

   Yii is parallel to ZO, Xii is anti-parallel to YO: 
   Yii = ZO, Xii = - YO.

   Xii = cos(alpha) * YE - sin(alpha) * ZE - deltaY

   Yii = - sin(alpha) * YE - cos(alpha) * ZE - deltaZ

   The values of alpha, deltaY, and deltaZ are global system parameters
   (cf. SystemR,SystemS, SystemU ). By default, alpha=0. 

   List of Solar event codes: 

   ID Code event application 

   4 0100 Jets/Turbulent events POPs 8 and 24
   3 0011 Micro/Subflares -
   2 0010 Bright Points POP 12
   5 0101 Transverse Velocity Events tbd.
   6 0110 Activated prominences tbd.
   7 0111 Eruptive prominences -
   8 1000 Coronal Mass ejection -
   1 0001 Flares -
   9 1001 Precursor Activity -
   12 1100 Celestial objects POPs 15 and 27
   15 1111 Any other event tbd.

   - means not applicable to SUMER tbd. means potential candidate 

see also
   cont, contY, contZ 


!!!FlatField Level 3 

Syntax
   INT32 FlatField( uINT16 dt, REAL32 lam, REAL32 f1, REAL32
   f0) 
Function

   The function FlatField acquires a single raw image at the wavelength
   lam � using an integration time dt (in units of 250 ms). The 16 bit raw
   image data [J] are filtered using an 7*7 median filter resulting in a
   second data array [L]. Dividing all elements of [J] by the
   corresponding elements of [L] creates an array that allows to
   separate the effects of the row amplifiers and the column amplifiers
   of the MAMA detector by computing the row average vector {z} and
   the column average vector {s}. These vectors are combined with the
   median filtered image data to obtain the detector pixels' relative
   responsivities [R]. To reduce storage requirements, they are scaled to
   the range 0 ... 255 by multiplying by f1 and adding f0, and stored as 8
   bit values [E]. 

   [L] = median ([J])
   l = mean ([L])

   {z} = row_avg ([J] / [L])
   {s} = column_avg ([J] / [L])

   [R] = [L] / l * {s} / {z} 

   [E] = [R] * f1 + f0 

   where f1>0 and f0<0. 

   Whenever the flat-field correction is enabled (cf. FF_mode), every
   image [I] acquired will be flat-field corrected giving the image [K] 

   [K] = [I] / [R] = [I] * f1 / ([E] - f0) 

   Before calling FlatField, the SUMER instrument has to be prepared
   for the flat-field acquisition by executing telecommands to

   - select a slit, 
   - defocus the telescope as much as possible, 
   - defocus the spectrometer as much as possible,
   to ensure that all detector pixels receive the same intensity of
   radiation. 

   To ensure correct operation of FlatField, call the function FF_Mode
   to disable the flat-field correction just before the acquisition of the
   new flat- field image. 

see also
   FF_mode, lambda11, lambda13, lambda18 
Example

          : /* select slit 4"*360" */
          : /* defocus telescope as much as possible */
          : /* defocus spectrometer as much as possible */
          :
            /* make sure flat-field correction is turned off */
            res = FF_mode( 0);
                   
            /* acquire new flat-field image, exposure 3600 s at 900 �.
               assuming the relative responsivities are in the range
               0.5 .. 1.5, the values f1 and f0 are 256.0 and -128.0 */
            res = FlatField( 3600*4, 900.000, 256.0, -128.0);
            :
            : /* refocus telescope */
            : /* refocus spectrometer */
            : /* select slit, binning, compression for spectrohelio */
            :
              /* prepare for spectrohelio with flat-field correction */
            res = FF_mode( 1);
                   
              /* now that flat-field correction is on, select wavelength.
                 lambda1? will compute the new flat-field values corrected
                 for the new wavelength range. */
             res = lambda11( 511, 1400.0);
                   
               /* image acquisition */
             res = spectrohelio1( .., .., .., ..);
                   
               /* turn off flat-field correction if it is no longer needed */
             res = FF_mode( 0);



!!!floor Library 

Syntax
   REAL32 floor( REAL32 x); 
Function
   The function floor returns the largest integer not greater than the
   argument. 
see also
   ceil 


!!!fmod Library 

Syntax
   REAL32 fmod( REAL32 x, REAL32 y); 
Function
   The function fmod returns x mod y, i.e. the floating-point remainder
   of x/y. 
see also
   ceil, floor 


!!!full_disk Level 3 

Syntax
   INT32 full_disk( uINT16 dt, uINT8 f, INT16 dy, INT16 schm, INT16
   centr) 
Function

   The function full_disk acquires a huge spectroheliogram covering
   either the whole solar disk (centr=0) or the central meridian only
   (centr=1). The images are acquired using the integration time
   indicated by dt (cf. spectrohelio3) and the raster step (increment) dy
   (in units of 0.38"). Each image covers more than one pixel's width if
   the parameter schm is set to a negative value ("Schmierschritt", cf.
   spectrohelio3). The telemetry format used for data transmission is
   given by parameter f (cf. table 5-3, section 5). 

   The sun is scanned by subsequent calls to level 3 functions
   Set_SphelPointCenter and spectrohelio3. If centr=0 the sun is
   scanned in 8 swathes of different length: 1260", 1750", 1980", 2040",
   2040", 1980", 1750 ", 1260". The central meridian divides the
   swathes symmetrically, the swathes are displaced by 270" in
   elevation to cover the entire disk starting at +945" to -945". If
   centr=1 each scan has the same length of 240". The displacement is
   as for centr=0. 

   full_disk observes the Sun in three wavelengths only. These
   wave-lengths have to be set up before starting by calling lambda13. 

see also
   Set_SphelPointCenter, spectrohelio3 

!!G

!!!GetImageMax Library 

Syntax
   uINT16 GetImageMax( void); 
Function
   The function GetImageMax returns the maximum value found in the
   image in the compression buffer. If no image is available, the
   function will return an error code (NOPIC). 
see also
   WaitImage 
Example
   see WaitImage 


!!!GetPixelB2 Library 

Syntax
   uINT16 GetPixelB2( uINT16 nrch, uINT16 ch, uINT16 zpos); 
Function
   The function GetPixelB2 reads a pixel from the RAM image buffer.
   The pixel is specified by the spectral channel ch (0þch
see also
   PutPixelB1, PutPixelB2, PutPixelI2, PutPixelR4 
Example

               INT16  pos, ch, res;
               REAL32 sum;
                   :
                 for (pos=0 to 359)                         /* 360 spatial */
                     sum = 0.0;
                     for (ch=0 to 49)                       /* 50 spectral */
                         res = GetPixelB2( 50, ch, pos);
                         sum = sum + res;
                     forend;
                     res = PutPixelR4( 1, 0, pos, sum);     /* image 1*360 */
                 forend;



!!!GetSpatVectorB2, GetSpecVectorB2 Library 

Syntax
   INT32 GetSpatVectorB2 (uINT16 nrch, uINT16 ch, uINT16 zpos,
   uINT16 dest[], uINT16 nele); INT32 GetSpecVectorB2 (uINT16
   nrch, uINT16 ch, uINT16 zpos, uINT16 dest[], uINT16 nele); 
Function

   The functions GetSpatVectorB2, GetSpecVectorB2 read nele values
   into the data vector given by the parameter dest from the RAM
   image buffer starting at the spectral channel ch (0þch

   GetSpatVectorB2 reads the data in spatial direction from the RAM
   image buffer, GetSpecVectorB2 reads the data in spectral direction. 

   If no image is avaliable, the function will return an error code
   (NOPIC). The data read is of type uINT16. 

see also
   PutSpatVectorB2, PutSpecVectorB2, PutConstSpatVectorB2, 
   PutConstSpecVectorB2 

!!H

!!!HEA_Auto Level 4 

Syntax
   INT32 HEA_Auto( INT16 HeaterNr) 
Function
   cf. telecommand HEA_Auto, OPG-section 6.8.9 


!!!HEA_Bias Level 4 

Syntax
   INT32 HEA_Bias( INT16 HeaterNr, INT16 Bias) 
Function
   cf. telecommand HEA_Bias, OPG-section 6.8.9 


!!!HEA_Interval Level 4 

Syntax
   INT32 HEA_Interval( INT16 TickSize) 
Function
   cf. telecommand HEA_Interval, OPG-section 6.8.9 


!!!HEA_Manual Level 4 

Syntax
   INT32 HEA_Manual( INT16 HeaterNr, INT16 OnTicks) 
Function
   cf. telecommand HEA_Manual, OPG-section 6.8.9 


!!!HEA_Mode Level 4 

Syntax
   INT32 HEA_Mode( INT16 Mode) 
Function
   cf. telecommand HEA_Mode, OPG-section 6.8.9 

!!I

!!!IIM_AutoClear Level 4 

Syntax
   INT32 IIM_AutoClear( INT16 action) 
Function
   cf. telecommand IIM_AutoClear, OPG-section 6.8.2 


!!!IIM_ChannelSelect Level 4 

Syntax
   INT32 IIM_ChannelSelect( INT16 action) 
Function
   cf. telecommand IIM_ChannelSelect, OPG-section 6.8.2 


!!!IIM_Chk Level 4 

Syntax
   INT32 IIM_Chk( void) 
Function
   cf. telecommand IIM_Chk, OPG-section 6.8.2 


!!!IIM_Clear Level 4 

Syntax
   INT32 IIM_Clear( void) 
Function
   cf. telecommand IIM_Clear, OPG-section 6.8.2 


!!!IIM_div Level 3 

Syntax
   INT32 IIM_div( uINT16 div); 
Function
   The function IIM_div divides all data values in the RAM image
   buffer by a given constant div. In cooperation with the level 3
   functions IIM_mode and spectrohelio1, it enables the user to
   calculate the average of several images taken in succession (see
   IIM_mode). If no image is available, the function will return an error
   code (NOPIC). 
see also
   spectrohelio1, IIM_mode, WaitImage spectrohelio1, IIM_mode, 
   WaitImage 
Example
   see IIM_mode 


!!!IIM_HMrequest Level 4 

Syntax
   INT32 IIM_HMrequest( INT16 mode) 
Function
   cf. telecommand IIM_HMrequest, OPG-section 6.8.2 


!!!IIM_InputGate Level 4 

Syntax
   INT32 IIM_InputGate( INT16 action) 
Function
   cf. telecommand IIM_InputGate, OPG-section 6.8.2 


!!!IIM_LatchUpTest Level 4 

Syntax
   INT32 IIM_LatchUpTest( INT16 mode) 
Function
   cf. telecommand IIM_LatchUpTest, OPG-section 6.8.2 


!!!IIM_LUStrobeA Level 4 

Syntax
   INT32 IIM_LUStrobeA( void) 
Function
   cf. telecommand IIM_LUStrobeA, OPG-section 6.8.2 


!!!IIM_LUStrobeB Level 4 

Syntax
   INT32 IIM_LUStrobeB( void) 
Function
   cf. telecommand IIM_LUStrobeB, OPG-section 6.8.2 


!!!IIM_mode Level 3 

Syntax
   INT32 IIM_mode( INT16 mode); 
Function

   The function IIM_mode sets the image integration memory's
   read-out mode. Valid modes are: 

   mode = 0: transfer IIM contents to RAM 
   mode = +1: add IIM contents into RAM 
   mode = -1: subtract IIM contents from RAM 

   The mode thus set will be valid for the next image only. This causes
   the usual read-out mode 0 (transfer) to be used whenever IIM_mode
   has not been called. 

   Before using IIM_mode, make sure that the compression scheme to
   be used is set to 0 or to a negative value. In addition, only one
   wavelength can be used, i.e. the wavelengths lam2 to lam8 in the
   main line register will be set to 0.0. This feature can only be used for
   imaging via spectrohelio1. Other functions will produce an error
   (WRONGIIMMODE). 

   IIM_mode enables the user to perform tasks like adding, subtracting,
   and summing up (totaling) images. After totaling several images, a
   call to IIM_div with the number of images used will calculate the
   average of several images (see example). As only one image can be
   operated on, the repetition count in the call to spectrohelio1 will be
   set to 0. 

see also
   spectrohelio1, IIM_div, WaitImage, SendImage 
Example

 
          uINT8 cnt;
          INT32 res;
              :
            /* set up pointing, slit, etc. */
              :
            /* set up wavelength and compression scheme */
           res = lambda11( 511, 1136.7);
           res = compression( 0);
              
            /* store first image in RAM */
           res = IIM_mode( 0);
           res = spectrohelio1( 40, 3, 0, 0);
           if (res != 0)
             goto exit;
           ifend;
           res = WaitImage( );
              
            /* add the following images to RAM */
           for (cnt=2 to 10)
               res = IIM_mode( +1);
               res = spectrohelio1( 40, 3, 0, 0);
               if (res != 0)
                  goto exit;
               ifend;
               res = WaitImage( );
           forend;
              
            /* RAM contains the sum of 10 images */
            /* calculate the mean */
              
           res = IIM_div( cnt - 1);
              
           exit:
            /* release RAM to telemetry */
           res = SendImage( 3);



!!!IIM_PowerCommandA Level 4 

Syntax
   INT32 IIM_PowerCommandA( INT16 action) 
Function
   cf. telecommand IIM_PowerCommandA, OPG-section 6.8.2 


!!!IIM_PowerCommandB Level 4 

Syntax
   INT32 IIM_PowerCommandB( INT16 action) 
Function
   cf. telecommand IIM_PowerCommandB, OPG-section 6.8.2 


!!!IIM_SetPowerSwitch Level 4 

Syntax
   INT32 IIM_SetPowerSwitch( INT16 action) 
Function
   cf. telecommand IIM_SetPowerSwitch, OPG-section 6.8.2 


!!!IIM_Status Level 4 

Syntax
   INT32 IIM_Status( void) 
Function
   cf. telecommand IIM_Status, OPG-section 6.8.2 

!!L

!!!lambda1X
lambda11, lambda13, lambda18Level 3 

Syntax
   INT32 lambda11( uINT16 px, REAL32 lam1); 
   INT32 lambda13( uINT16 px, REAL32 lam1, REAL32 lam2,
   REAL32 lam3); 
   INT32 lambda18( uINT16 px, REAL32 lam1, REAL32 lam2,
   REAL32 lam3, REAL32 lam4, REAL32 lam5, REAL32 lam6,
   REAL32 lam7, REAL32 lam8); 
Function
   The functions lambda11, lambda13, and lambda18 put the spectral
   line given by the wavelength lam1 � onto the detector pixel position
   px. The detector pixel positions for the other lines (lam2 � to lam8 �)
   are calcula- ted, all pixel positions are loaded into the main line
   register for observation in calls to spectrohelio1, spectrohelio2,
   spectrohelio3 and spectrohelio4. In addition, they set up the
   wavelengths given for observation by positioning the grating scan
   and grating focus motors. Lines to be disregarded are indicated by
   parameter values of 0.0. The EGSE has to ensure that all
   wavelengths given corres-pond to spectral lines that can be imaged
   by the detector at the same time. 
see also
   lambda21, lambda23, lambda28 

!!!lambda2X
lambda21, lambda23, lambda28Level 3 

Syntax
   INT32 lambda21( uINT16 px, REAL32 lam1); 
   INT32 lambda23( uINT16 px, REAL32 lam1, REAL32 lam2,
   REAL32 lam3); 
   INT32 lambda28( uINT16 px, REAL32 lam1, REAL32 lam2,
   REAL32 lam3, REAL32 lam4, REAL32 lam5, REAL32 lam6,
   REAL32 lam7, REAL32 lam8); 
Function
   The functions lambda21, lambda23, and lambda28 use the alternate
   line register to store the detector pixel positions of the wavelengths
   given for observation in calls to spectrohelio2 and spectrohelio4. The
   EGSE has to ensure that all wavelengths given (lam1 � to lam8 �) can
   be observed at the same time provided that the wavelength lam1 � is
   projected onto the pixel column px of the detector. Unlike lambda11,
   lambda13, and lambda18, the functions lambda21, lambda23, and
   lambda28 do not set up the wavelengths given for subsequent
   observation by positioning the grating scan and grating focus motors.
   This setting up is performed by spectrohelio2 and spectrohelio4
   when needed. 
see also
   lambda11, lambda13, lambda18 


!!!log Library 

Syntax
   REAL32 log( REAL32 x); 
Function
   The Function log returns the natural logarithm of the argument. 
see also
   exp, log10, pow 


!!!log10 Library 

Syntax
   REAL32 log10( REAL32 x); 
Function
   The function log10 returns the base 10 logarithm(argument). 
see also
   exp, log, pow 

!!M

!!!MCInitPos Restricted Level 3 

Syntax
   INT32 MCInitPos( INT16 MCDev) 
Function
   cf. telecommand MCInitPos, OPG-section 6.7.4 


!!!MCMove Restricted Level 3 

Syntax
   INT32 MCMove( INT16 MCDev, INT16 newpos, INT16 mode) 
Function
   cf. telecommand MCMove, OPG-section 6.7.4 


!!!MCPos2 Restricted Level 3 

Syntax
   INT32 MCPos2( INT16 MCDev1, INT16 MCDev2, INT16 newpos1,
   INT16 newpos2) 
Function
   cf. telecommand MCPos2, OPG-section 6.7.4 


!!!MC_GetERAMValue Level 4 

Syntax
   INT32 MC_GetERAMValue( INT16 dev, uINT16 addr) 
Function
   cf. telecommand MC_GetERAMValue, OPG-section 6.8.3 


!!!MC_GetErr Level 4 

Syntax
   INT32 MC_GetErr( INT16 dev) 
Function
   cf. telecommand MC_GetErr, OPG-section 6.8.3 


!!!MC_GetFreq Level 4 

Syntax
   INT32 MC_GetFreq( INT16 dev) 
Function
   cf. telecommand MC_GetFreq, OPG-section 6.8.3 


!!!MC_GetIRAMValue Level 4 

Syntax
   INT32 MC_GetIRAMValue( INT16 dev, INT16 addr) 
Function
   cf. telecommand MC_GetIRAMValue, OPG-section 6.8.3 


!!!MC_GetSteps Level 4 

Syntax
   INT32 MC_GetSteps( INT16 dev) 
Function
   cf. telecommand MC_GetSteps, OPG-section 6.8.3 


!!!MC_MC1Qualify Level 4 

Syntax
   INT32 MC_MC1Qualify( INT16 dev, INT16 qual) 
Function
   cf. telecommand MC_MC1Qualify, OPG-section 6.8.3 


!!!MC_Power Level 4 

Syntax
   INT32 MC_Power( INT16 dev, INT16 func) 
Function
   cf. telecommand MC_Power, OPG-section 6.8.3 


!!!MC_ReadHK Level 4 

Syntax
   INT32 MC_ReadHK( INT16 dev, INT16 channel) 
Function
   cf. telecommand MC_ReadHK, OPG-section 6.8.3 


!!!MC_Reset Level 4 

Syntax
   INT32 MC_Reset( INT16 dev) 
Function
   cf. telecommand MC_Reset, OPG-section 6.8.3 


!!!MC_ScanMotion Level 4 

Syntax
   INT32 MC_ScanMotion( INT16 dev) 
Function
   cf. telecommand MC_ScanMotion, OPG-section 6.8.3 


!!!MC_ScanStep Level 4 

Syntax
   INT32 MC_ScanStep( INT16 dev, INT16 steps) 
Function
   cf. telecommand MC_ScanStep, OPG-section 6.8.3 


!!!MC_Selftest Level 4 

Syntax
   INT32 MC_Selftest( INT16 dev) 
Function
   cf. telecommand MC_Selftest, OPG-section 6.8.3 


!!!MC_SetERAMValue Level 4 

Syntax
   INT32 MC_SetERAMValue( INT16 dev, uINT16 addr, INT16 dat) 
Function
   cf. telecommand MC_SetERAMValue, OPG-section 6.8.3 


!!!MC_SetIRAMValue Level 4 

Syntax
   INT32 MC_SetIRAMValue( INT16 dev, INT16 addr, INT16 dat) 
Function
   cf. telecommand MC_SetIRAMValue, OPG-section 6.8.3 


!!!MC_SetMoveVars Level 4 

Syntax
   INT32 MC_SetMoveVars( INT16 dev, INT16 pattern, uINT8 phase,
   uINT8 retain) 
Function
   cf. telecommand MC_SetMoveVars, OPG-section 6.8.3 


!!!MC_SetVariable Level 4 

Syntax
   INT32 MC_SetVariable( INT16 dev, INT16 var, INT16 val) 
Function
   cf. telecommand MC_SetVariable, OPG-section 6.8.3 


!!!MC_TST_RelPos Level 4 

Syntax
   INT32 MC_TST_RelPos( INT16 dev, INT16 steps) 
Function
   cf. telecommand MC_TST_RelPos, OPG-section 6.8.3 

!!P

!!!ParamX

 ! Please Notice that UDPs with Parameters are no longer !
 ! supported                                             !
 
ParamR, ParamS, ParamU Library 

Syntax
   REAL32 ParamR( uINT8 nr); INT32 ParamS( uINT8 nr); uINT32
   ParamU( uINT8 nr); 
Function
   The functions ParamR, ParamS, and ParamU return the specified
   value of the POP or UDP parameter (in different data types): 

   ParamR: REAL32 
   ParamS: INT32 
   ParamU: uINT32 

see also
   SystemR, SystemS, SystemU 


!!!point Level 3 

 ! y has to be 0 because MC2 is not available !

Syntax
   INT32 point( INT16 y, INT16 z); 
Function

   The function point steps the azimuth and elevation motors to point
   the telescope to the solar coordinates y and z, given in units of
   0.0625". Positive steps in elevation and azimuth change the pointing
   to +YE and -ZE: 

   y = Xii = YE , z = Yii = -ZE 

   point also sets the azimuth and elevation center for spectrohelio3,
   spectrohelio4 and expl_event_search to the solar coordinates y and z.

   When solar rotation compensation is on, each call to point will
   restart the timer of the solar rotation compensation routine. 

see also
   slit, Set_SphelPointCenter, rot_comp 


!!!pow Library 

Syntax
   REAL32 pow( REAL32 x, REAL32 y); 
Function
   The function pow returns x to the power of y. 
see also
   exp, log, log10 


!!!PowerUp Restricted Level 3 

Syntax
   INT32 PowerUp( void) 
Function
   cf. telecommand PowerUp, OPG-section 6.7.2 


!!!POW_Execute Level 4 

Syntax
   INT32 POW_Execute( INT16 dev, INT16 act) 
Function
   cf. telecommand POW_Execute, OPG-section 6.8.6 


!!!POW_ReadHK Level 4 

Syntax
   INT32 POW_ReadHK( void) 
Function
   cf. telecommand POW_ReadHK, OPG-section 6.8.6 


!!!POW_WAXpulse Level 4 

Syntax
   INT32 POW_WAXpulse( void) 
Function
   cf. telecommand POW_WAXpulse, OPG-section 6.8.6 


!!!POW_WAXrequest Level 4 

Syntax
   INT32 POW_WAXrequest( INT16 request_delay, INT16
   pulse_delay) 
Function
   cf. telecommand POW_WAXrequest, OPG-section 6.8.6 


!!!POW_WAXTest Level 4 

Syntax
   INT32 POW_WAXTest( void) 
Function
   cf. telecommand POW_WAXTest, OPG-section 6.8.6 

!!!PutPixel
PutPixelB1, PutPixelB2, PutPixelI2, PutPixelR4 Library 

Syntax
   INT32 PutPixelB1( uINT16 nrch, uINT16 ch, uINT16 zpos, uINT8
   val); 
   INT32 PutPixelB2( uINT16 nrch, uINT16 ch, uINT16 zpos, uINT16
   val); 
   INT32 PutPixelI2( uINT16 nrch, uINT16 ch, uINT16 zpos, INT16
   val); 
   INT32 PutPixelR4( uINT16 nrch, uINT16 ch, uINT16 zpos, REAL32
   val); 
Function

   The functions PutPixelB1, PutPixelB2, PutPixelI2, and PutPixelR4
   write the data value given by the parameter val into a position in the
   RAM image buffer that is specified by the spectral channel ch (0þch

   The functions PutPixelB1, PutPixelB2, PutPixelI2, and PutPixelR4
   write values of different data types: 

   PutPixelB1: uINT8 
   PutPixelB2: uINT16 
   PutPixelI2: INT16 
   PutPixelR4: REAL32 
see also
   GetPixelB2 
Example
   see GetPixelB2 

!!!PutSystem
PutSystemR, PutSystemS, PutSystemU Library 

Syntax
   INT32 PutSystemR( uINT8 nr, REAL32 val); 
   INT32 PutSystemS( uINT8 nr, INT32 val); 
   INT32 PutSystemU( uINT8 nr, uINT32 val); 
Function

   The functions PutSystemR, PutSystemS, and PutSystemU set the
   global system parameter nr to the value val. For possible values of nr,
   please cf. SystemR. 

Note:
   As writing to most of the global parameter variables will be
   dangerous to the system's integrity, the use of the functions
   PutSystemR, PutSystemS, and PutSystemU is restricted to
   authorized personnel!!! The use of these functions should be restricted
   to the absolute minimum!!! The functions should be used with the
   utmost care!!! 
see also
   SystemR, SystemS, SystemU ParamR, ParamS, ParamU 


!!!PutSp...
PutSpatVectorB2, PutSpecVectorB2 Library 

Syntax
   INT32 PutSpatVectorB2 (uINT16 nrch, uINT16 ch, uINT16 zpos,
   uINT16 src[], uINT16 nele); 
   INT32 PutSpecVectorB2 (uINT16 nrch, uINT16 ch, uINT16 zpos,
   uINT16 src[], uINT16 nele); 
Function

   The functions PutSpatVectorB2, PutSpecVectorB2 write the first
   nele values of the data vector given by the parameter src into the
   RAM image buffer starting at the spectral channel ch (0þch

   PutSpatVectorB2 writes the vector in spatial direction into the RAM
   image buffer, PutSpecVectorB2 writes the vector in spectral
   direction. 

   If no image is avaliable, the function will return an error code
   (NOPIC). 

   The data written is of type uINT16. 

see also
   GetSpatVectorB2, GetSpecVectorB2, PutConstSpatVectorB2, 
   PutConstSpecVectorB2 
Example

           ExitOnError  ALIAS  if (res < (INT32)0) goto exit; ifend
 
                   INT32 recordpic();
                       INT32 res;
 
                       /* record one image with 60 msecond and format 50x360xB2 */
                       res = spectrohelio1( 0, 9, 0, 0);
                       if (res == 0)
                           res = WaitImage( );
                       ifend;
 
                       return( res);
                   end;
 
 
                   main;
                       INT32 res;
                       uINT16 i, j, src[1024], *psrc;
 
                   uINT16 length = (uINT16) ParamU(1); /* num of elements per
                   spectral row (50)*/
                   uINT16 start  = (uINT16) ParamU(2); /* spectral start element
                   of dest   ( 0)*/
                   uINT16 cnt = (uINT16) ParamU(3); /* num elements to copy (50)*/
                   uINT8  format = (uINT8)  ParamU(4); /* format of image  ( 9)*/
                   uINT16 zstart = (uINT16) ParamU(5); /* first row to put  ( 0)*/
                   uINT16 znum   = (uINT16) ParamU(6); /* last row to put  (359)*/
 
                       res = compression (0);
 
                       /* record one picture */
 
                       res = recordpic( );
                       ExitOnError;
 
                       for (i = 0 to 1023)
                           src[i] = i;
                       forend;
 
                       psrc = &src[0];
 
                       for (i = zstart to znum)
                           res = PutSpecVectorB2( length, start, i, psrc, cnt);
                       forend;
 
                       exit:
 
                       /* release RAM to telemetry */
                       res = SendImage( format);
 
                       /* reset default compression */
                       res = compression( 5);
 
                  end;


!!!PutCon...
PutConstSpatVectorB2, PutConstSpecVectorB2 Library 

Syntax
   INT32 PutConstSpatVectorB2 (uINT16 nrch, uINT16 ch, uINT16
   zpos, uINT16 val, uINT16 nele); 
   INT32 PutConstSpecVectorB2 (uINT16 nrch, uINT16 ch, uINT16
   zpos, uINT16 val, uINT16 nele); 
Function

   The functions PutConstSpatVectorB2, PutConstSpecVectorB2 write
   nele constant values (val) into a position in the RAM image buffer
   starting at the spectral channel ch (0þch

   PutConstSpatVectorB2 writes the values in spatial direction into the
   RAM image buffer, PutConstSpecVectorB2 writes the values in
   spectral direction. 

   If no image is avaliable, the function will return an error code
   (NOPIC). 

   The data written is of type uINT16. 

see also
   PutSpatVectorB2, PutSpecVectorB2, GetSpatVectorB2, 
   GetSpecVectorB2 

!!R

!!!ReadImage Library 

Syntax
   INT32 ReadImage (uINT8 f) 
Function

   The function ReadImage stops the IIM integration, inverts the IIM
   channel selection and reads out up to eight images from the IIM. The
   pixel locations used are taken from the main line register as entered
   by the latest call to lambda11, lambda13 or lambda18. The image
   format for the transmission of the image data is given by f (see
   function spectrohelio1 for details about telemetry and raw format
   combinations). After read out of images, the IIM channel is cleared
   if the IIM autoclear hardware function is switched off. The IIM
   channel selection is inverted to be ready for the next integration. 

   The cyclic history memory update has to be switched off during use
   of ReadImage to avoid conflicts between direct IIM commanding
   (level 4 commands) and IIM commanding from the cyclic history
   memory update process. 

   Previous to using the ReadImage function several level 4 functions
   have to be called to set up the IIM: 

   - an IIM channel has to switched on (IIM_PowerCommandA/B) 
   - the IIM channel has to be selected to the DPU and cleared
   (IIM_ChannelSelect, IIM_Clear) 
   - the IIM channel has to be selected to the IIM and integration
   switched on (IIM_ChannelSelect, IIM_InputGate) 
see also
   IIM_HMrequest, IIM_PowerCommandA, IIM_ChannelSelect, 
   IIM_InputGate, IIM_Clear 
Example

          /* switch off cyclic IIM history memory update */
          res = IIM_HMrequest (0);
 
          /* switch on IIM channel A */
          res = IIM_PowerCommandA (1);
 
          /* select IIM channel A to DPU */
          res = IIM_ChannelSelect (0);
 
          /* clear IIM channel A */
          res = IIM_Clear();
 
          /* select IIM channel A to IIM */
          res = IIM_ChannelSelect (1);
 
          /* start integration */
          res = IIM_InputGate (1);
 
          /* ... other commands, move MC's ... */
 
          /* call function ReadImage with format 9 to read out the
             image(s) according to the settings in the main line register */
          res = ReadImage (9);
 
          /* start integration to record another picture */
          res = IIM_InputGate (1);
 
          /* ... other commands, move MC's ... */
 
          /* set Bytescale Min Max compression scheme */
          res = compression (1);
 
          /* call function ReadImage with format 8 to read out the      
             image(s) according to the settings in the main line register */
          res = ReadImage (8);
 
          /* if the detector high voltage is on, switch on cyclic IIM   
             history memory update */
         res = IIM_HMrequest (1);



!!!ref_spec Level 3 

Syntax
   INT32 ref_spec( uINT16 dt, uINT8 f, REAL32 lambda, REAL32
   delta, uINT16 nrinc); 
Function
   The function ref_spec acquires nrinc spectra starting at the
   wavelength lambda � and increasing by delta �. The integration time
   used is indicated by dt (cf. spectrohelio1), the image for-mat by f (cf.
   table 5 - 3, section 5). By specifying appropri-ate parameters, spectra
   covering the full spectral range of the SUMER instrument on both
   cathodes can be acquired. In every case, the line Lyman alpha has to
   be treated with attenuation, i.e. it has to be projected onto an
   attenuator on the detector. Whenever it is detected that Lyman alpha
   would be projected onto the detector, two images will be acquired
   instead of one. In these images, Lyman alpha is projected onto one of
   the attenuators. Thus, all wavelengths near Lyman alpha can be
   observed on one cathode at least. 


RestoreSettings Restricted Level 3 

Syntax
   INT32 RestoreSettings( void) 
Function
   cf. telecommand RestoreSettings, OPG-section 6/7.2 


!!!rot_comp Level 3 

Syntax
   INT32 rot_comp( REAL32 dt); 
Function

   The function rot_comp is used to set up the parameters of the solar
   rotation compensation. The rotation compensation is turned on by
   selecting dt>0.0 or dt=0.0, it is turned off by selecting dt<0. If dt is set
   to 0.0, the standard rotation compensation is selected where the
   compensation time value depends on the current pointing. 

   When the solar rotation compensation is turned on, the telescope
   pointing will be corrected by one full step of 0.76" in +y direction
   after dt seconds to compensate for the Sun's rotation, whenever one
   of the image acquisition functions (spectrohelio1, spectrohelio2,
   spectrohelio3, spectrohelio4, expl_event_search, full_disk, ref_spec)
   is called. 


!!!RSC Level 3 

Syntax
   INT32 RSC( uINT8 itc); 
Function

   The function RSC acquires a single rear slit camera image using the
   integration time indicated by itc at the current telescope pointing
   position. Possible values of itc are: 

   itc=0: integration time 77 ms 
   itc=1: integration time 103 ms 
   itc=2: integration time 155 ms 
   itc=3: integration time 206 ms 

   Note that the Function RSC cannot be started if the RAM disk
   contains uncompressed images. RSC takes care of switch on/off. 

see also
   RSC_scan 


!!!RSC_Off Level 4 

Syntax
   INT32 RSC_Off( void) 
Function
   cf. telecommand RSC_Off, OPG-section 6.8.5 


!!!RSC_On Level 4 

Syntax
   INT32 RSC_On( INT16 time) 
Function
   cf. telecommand RSC_On, OPG-section 6.8.5 


!!!RSC_PowChk Level 4 

Syntax
   INT32 RSC_PowChk( void) 
Function
   cf. telecommand RSC_PowChk, OPG-section 6.8.5 


!!!RSC_ReadImage Level 4 

Syntax
   INT32 RSC_ReadImage( void) 
Function
   cf. telecommand RSC_ReadImage, OPG-section 6.8.5 


!!!RSC_scan Level 3 

 ! dy has to be 0 because MC2 is not available !

Syntax
   INT32 RSC_scan( uINT8 itc, INT16 dy, uINT8 cnt); 
Function

   The function RSC_scan acquires groups of 50 rear slit camera images
   starting at the current telescope pointing position and stepping the
   telescope azimuth motor by the increment dy (in units of 0.38"). The
   number of groups to acquire is given by the parameter cnt. The
   integration time is indicated by the parameter itc (cf. RSC). 

   Note that the function RSC_scan cannot be started if the RAM disk
   contains uncompressed images. RSC_Scan takes care of switch
   on/off. 

see also
   RSC 

!!S

!!!SaveSettings Restricted Level 3 

Syntax
   INT32 SaveSettings( void) 
Function
   cf. telecommand SaveSettings, OPG-section 6.7.2 


!!!SendImage Library 

Syntax
   INT32 SendImage( uINT8 fmt); 
Function

   The function SendImage releases the contents of the RAM image
   buffer to the compression routines (if compression is to be
   performed) and on to the telemetry for transmission. The parameter
   fmt indicates which of the predefined data formats (cf. table 5-3,
   section 5) is to be used for transmission. 

   If some sort of user defined image compression has been performed
   on the image data, the transmission format will be different from the
   one used for image integration. 

   If the compression scheme was set to a negative value, an automatic
   compression will be performed before transmission. If no image is
   available for transmission, the function will return an error code
   (NOPIC). 

see also
   spectrohelio1, IIM_div, IIM_mode, WaitImage, GetPixelB2, 
   GetImageMax, PutPixelB1, PutPixelB2, PutPixelI2, PutPixelR4 
Example
   see IIM_mode 


!!!SetMCPHighVoltage Restricted Level 3 

Syntax
   INT32 SetMCPHighVoltage( INT16 voltage) 
Function
   cf. telecommand SetMCPHighVoltage, OPG-section 6.7.2 


!!!Set_SphelDirection Level 3 

Syntax
   INT32 Set_SphelDirection( INT16 dir); 
Function

   The function Set_SphelDirection sets the direction for the azimuth
   scan for the next call to spectrohelio3, spectrohelio4,
   expl_event_search or full_disk. This works also for spectrohelio3,
   spectrohelio4, expl_event_search or full_disk calls within POPs and
   UDPs if Set_SphelDirection is called immediately before starting the
   POP or UDP. (For coordinate directions, cf. point.)

   dir = +1: E->W; dir = -1: W->E 

see also
   spectrohelio3, spectrohelio4 


!!!Set_SphelPointCenter Level 3 

 ! y has to be 0 because MC2 is not available !

Syntax
   INT32 Set_SphelPointCenter( INT16 y, INT16 z); 
Function

   The function Set_SphelPointCenter sets the azimuth and elevation
   center for spectrohelio3, spectrohelio4 and expl_event_search
   without moving the telescope motors. The solar coordinates y and z
   are given in units of 0.0625" in SUMER's coordinate system (for
   coordinate directions, cf. point). 

   When the solar rotation compensation is on, each call to
   Set_SphelPointCenter will restart the timer of the solar rotation
   compensation routine. 

see also
   expl_event_search, point, slit, rot_comp, spectrohelio3, 
   spectrohelio4 


!!!ShutDown Restricted Level 3 

Syntax
   INT32 ShutDown( void) 
Function
   cf. telecommand ShutDown, OPG-section 6.7.2 


!!!sin Library 

Syntax
   REAL32 sin( REAL32 x); 
Function
   The function sin returns the sine of the angle given in radians. 
see also
   atan, atan2, cos, tan 


!!!slit Level 3 

Syntax
   INT32 slit( uINT8 k); 
Function

   The function slit actuates the slit position motor to bring the slit
   selected into one of several predefined positions. The number of
   steps from the reference position needed by the motor controller is
   taken from the global parameter table. 

   n slit size detector section 

    1. 4.0" * 300" centered 
    2. 1.0" * 300" centered 
    3. 1.0" * 120" top (South on Sun) 
    4. 1.0" * 120" centered 
    5. 1.0" * 120" bottom (North on Sun) 
    6. 0.3" * 120" top 
    7. 0.3" * 120" centered 
    8. 0.3" * 120" bottom 
    9. 1.0" hole centered 

   As the slit positions top and bottom interact with the pointing, it is
   important to select the slit before pointing the telescope. 

see also
   point 


!!!spectrohelio1 Level 3 

 ! dy has to be 0 because MC2 is not available !

Syntax
   INT32 spectrohelio1( uINT16 dt, uINT8 f, INT16 dy, INT16 n); 
Function

   The function spectrohelio1 acquires up to eight spectroheliograms
   simul- taneously with integration times indicated by dt (values>0 in
   units of 250 ms, 0 sets the integration time to 60 ms). The
   wavelengths to be used are valid from the latest call to one of the
   modules lambda11, lambda13, and lambda18, i.e. the pixel locations
   are taken from the main line register. The image format for the
   transmission of the image data is given by f (cf. table 5-3). 

   The parameter n gives the number of steps of dy each to be per
   formed. The number of images acquired is therefore n+1!!! If the
   parameter n is positive, the telescope is stepped in the +y direction
   (east to west); if n is negative, stepping is in the -y direction (west to
   east); if n is zero, no stepping is performed, i.e. a single image is
   acquired. 

   If the parameter dy is positive, it indicates the step size to be
   performed. If dy is negative, a special operation mode ("Schmier
   schritt") is activated where the telescope's pointing is stepped
   abs(dy) times per integration time by one elementary raster step
   (half step). 

   The field of view of the spectroheliograms results from the length of
   the slit and the scanning motion of the main telescope's mirror of n
   steps with an incremental dislocation of dy (in units of 0.38") each.
   Given the solar coordinates (y,z) the telescope is currently pointing
   to and the length m of the slit selected, the field scanned is
   represented by the rectangle (yñabs(n*dy)/2, zñm/2). If the special
   operation mode ("Schmierschritt") is selected, the field of view is
   somewhat wider (i.e. by int(abs(dy)/2)). After the scanning has
   ended, the pointing is returned to the initial position. 

   If format and binning selection lead to read-out areas exceeding the
   detector, only the parts on the detector will be read out while the
   missing parts will be filled up with zeroes. The size of the image to be
   read-out of the IIM (raw format) is determined by the telemetry
   format, the compression scheme, and the binning factors. If the
   telemetry format selected is one of B2 type, no compression will be
   performed. The following table (see next page) shows the possible
   combinations of compression schemes and telemetry formats giving
   the raw formats used for read out from IIM. If binning is selected, the
   raw image read-out sizes need to be multiplied by the respective
   binning factors. The table includes columns giving the maximum
   possible binning factor for spectral and spatial dimensions. Taking
   into account that the maximum format of the raw data can only be
   360 x 1024 16 bit words, the following scheme demonstrates how
   telemetry format selection, binning operators, and compression
   operators convert raw data into telemetry frames. Note, that the first
   step of the process, the telemetry format selection, is already
   depending on binning and compression operators to follow!!! 

   telemetry format binning compresssion raw data þ selected raw data
   þ binned data þ telemetry 

Note:
   In the emergency mode of the software (only one CU operational),
   the largest image including binning that can be read-out will be
   360*512. 
see also
   sphel_mode, spectrohelio2, spectrohelio3, spectrohelio4, 
   compression, binning 

   Table 8-1 Compatibility between binning factors, compression
   schemes, and telemetry formats 



   _______________________________________________________________________________________________________
   | |type| telemetry     |  Tx   ||compression | format before |max.binning|  format before binning     |
   | |    | format        |  [s]  ||            |  compression  | spec spat |   (=selected raw data)     |
   |_|____|_______________|_______||____________|_______________|___________|____________________________|
   |X|  2 | 1024 x 360 B1 | 302.0 ||  1,2,3,4,5 | 1024 x 360 B2 |    1    1 |       1024 x        360 B2 |
   |X|  3 | 1024 x 360 B2 | 600.0 ||            |               |    1    1 |       1024 x        360 B2 |
   |X|  4 | 1024 x 120 B1 | 103.0 ||  1,2,3,4,5 | 1024 x 120 B2 |    1    3 |       1024 x  {..3*}120 B2 |
   |X|  5 | 1024 x 120 B2 | 202.5 ||            |               |    1    3 |       1024 x  {..3*}120 B2 |
   |X|  8 |   50 x 360 B1 |  14.8 ||  1,2,3,4,5 |   50 x 360 B2 |   20    1 |  {..20*}50 x        360 B2 |
   |X|  9 |   50 x 360 B2 |  29.5 ||            |               |   20    2 |  {..20*}50 x        360 B2 |
   |X| 10 |   50 x 120 B1 |   5.2 ||  1,2,3,4,5 |   50 x 360 B2 |   20    3 |  {..20*}50 x  {..3*}120 B2 |
   |X| 11 |   50 x 120 B2 |  10.0 ||            |               |   20    3 |  {..20*}50 x  {..3*}120 B2 |
   |X| 12 |   25 x 360 B1 |   7.5 ||  1,2,3,4,5 |   25 x 360 B2 |   40    1 |  {..40*}25 x        360 B2 |
   |X| 12 |   25 x 360 B1 |   7.5 ||          6 |   50 x 360 B2 |   20    1 |  {..20*}50 x        360 B2 |
   |X| 13 |   25 x 360 B2 |  14.8 ||            |               |   40    1 |  {..40*}25 x        360 B2 |
   |X| 14 |   25 x 120 B1 |   2.8 ||  1,2,3,4,5 |   25 x 120 B2 |   40    1 |  {..40*}25 x  {..3*}120 B2 |
   |X| 14 |   25 x 120 B1 |   2.8 ||          6 |   50 x 120 B2 |   20    1 |  {..20*}50 x  {..3*}120 B2 |
   |X| 15 |   25 x 120 B2 |   5.2 ||            |   25 x 120 B2 |   40    1 |  {..40*}25 x  {..3*}120 B2 |
   |X| 18 |    1 x 360 I2 |   0.6 || 7,10,13,16 |   50 x 360 B2 |   20    1 |  {..20*}50 x        360 B2 |
   | | 19 |    1 x 360 R4 |   1.4 ||            |               |           |                            |
   |X| 20 |    1 x 120 I2 |   0.4 || 7,10,13,16 |   50 x 120 B2 |   20    3 |  {..20*}50 x  {..3*}120 B2 |
   | | 21 |    1 x 120 R4 |   0.6 ||            |               |           |                            |
   | | 24 |  300 x 360 I2 | 175.7 ||            |               |           |                            |
   | | 25 |  300 x 360 R4 | 350.5 ||            |               |           |                            |
   | | 26 |  300 x 120 I2 |  59.4 ||            |               |           |                            |
   | | 27 |  300 x 120 R4 | 117.5 ||            |               |           |                            |
   |X| 30 |   25 x  24 B1 |   0.8 ||  1,2,3,4,5 |   25 x  24 B2 |   40   15 |  {..40*}25 x  {..15*}24 B2 |
   |X| 31 |   50 x  24 B1 |   1.3 ||  1,2,3,4,5 |   50 x  24 B2 |   20   15 |  {..20*}50 x  {..15*}24 B2 |
   | | 34 |    1 x 512 B1 |   0.7 ||            |               |           |                            |
   | | 35 |   50 x 512 B1 |  21.0 ||            |               |           |                            |
   | | 36 |  512 x  20 B4 |  35.0 ||            |               |           |                            |
   |X| 37 |  256 x 360 B2 | 150.0 ||            |               |    4    1 |  {..4*}256 x        360 B2 |
   |X| 38 |  512 x 360 B1 | 151.0 ||  1,2,3,4,5 |  512 x 360 B2 |    2    1 |  {..2*}512 x        360 B2 |
   |X| 39 |  512 x 360 B2 | 300.0 ||            |               |    2    1 |  {..2*}512 x        360 B2 |
   |X| 40 | 1024 x  12 B1 |  13.4 ||  1,2,3,4,5 | 1024 x  12 B2 |    1   30 |       1024 x  {..30*}12 B2 |
   |X| 41 |    2 x 360 I2 |   1.5 ||    8,11,14 |   50 x 360 B2 |   20    1 |  {..20*}50 x        360 B2 |
   |X| 42 |    2 x 120 I2 |   0.7 ||    8,11,14 |   50 x 120 B2 |   20    3 |  {..20*}50 x  {..3*}120 B2 |
   |X| 43 |    4 x 360 I2 |   2.6 ||    9,12,15 |   50 x 360 B2 |   20    1 |  {..20*}50 x        360 B2 |
   |X| 44 |    4 x 120 I2 |   1.1 ||    9,12,15 |   50 x 360 B2 |   20    3 |  {..20*}50 x  {..3*}120 B2 |
   |X| 45 |    5 x 360 B1 |   1.7 ||         17 | 3*50 x 360 B2 |    1    1 |       3*50 x        360 B2 |
   |_|____|_______________|_______||____________|_______________|___________|____________________________|

   Annotations 

   Image formats 32 and 33 have been deleted. Image format 36 is only
   used by the DPU to dump the history memory. Tx is the estimated
   telemetry transmission time in seconds at 10.5 kBaud, overhead by
   HK records neglected. {..n*} in the last column means: up to n times.
   X in the first column means: suitable telemetry format type for
   spectrohelio function. 


!!!spectrohelio2 Level 3 

 ! dy has to be 0 because MC2 is not available !

Syntax
   INT32 spectrohelio2( uINT16 dt, uINT8 f, INT16 dy, INT16 n); 
Function

   The function spectrohelio2 works similar to the module
   spectrohelio1. It uses two sets of wavelengths to acquire
   spectroheliograms in two different spectral regions alternatively. The
   wavelengths used are those found in the main line register as stored
   in the latest call to lambda11, lambda13, or lambda18 as well as those
   found in the alternate line register as stored in the latest call to
   lambda21, lambda23, or lambda28. 

Note:
   spectrohelio2 does not perform the special operation mode
   ("Schmier schritt") where dy is negative. 
see also
   sphel_mode, spectrohelio1, spectrohelio3, spectrohelio4 


!!!spectrohelio3 Level 3 

 ! dy has to be 0 because MC2 is not available !

Syntax
   INT32 spectrohelio3( uINT16 dt, uINT8 f, INT16 dy, INT16 n); 
Function

   The function spectrohelio3 works similar to the module
   spectrohelio1 with the following differences: 

   - the center of the scanned field is the pointing position set with the
   latest call to Set_SphelPointCenter 

   - the telescope scan direction is set either with Set_SphelDirection
   or from spectrohelio3: 

   the telescope is stepped in the +y direction (east to west) if the
   current pointing position is closer to the eastern end position of the
   telescope scan; 

   stepping is in the -y direction (west to east) if the current pointing
   position is closer to the western end position of the telescope scan 

   - the telescope is pointed to the elevation position set by
   Set_SphelPointCenter and the azimuth start position due to the rules
   explained above 

   - after the scanning has ended, the telescope motors remain in the
   position of the last image acquired. 

   Subsequent calls to spectrohelio3 using the same parameters result in
   reversing the scan direction for each call. The parameter n gives the
   number of steps of dy each to be performed. The number of images
   acquired is therefore n+1! Only values >=0 are possible for this
   parameter as the direction can be set with Set_SphelDirection. If dy
   is zero, no stepping is performed, i.e. n+1 images are acquired. 

Note:
   The positions of MC2 and MC3 have to be initialized using
   MCInitPos even if dy is zero, i.e. no stepping is required. The setting
   of the scan direction (cf. Set_SphelDirection) is cleared at the end of
   spectrohelio3. 
see also
   Set_SphelDirection, Set_SphelPointCenter, sphel_mode, 
   spectrohelio1 


!!!spectrohelio4 Level 3 

 ! dy has to be 0 because MC2 is not available !

Syntax
   INT32 spectrohelio4( uINT16 dt, uINT8 f, INT16 dy, INT16 n); 
Function

   The function spectrohelio4 works similar to the module
   spectrohelio3. It uses two sets of wavelengths to acquire
   spectroheliograms in two different spectral regions alternatively. The
   wavelengths used are those found in the main line register as stored
   in the latest call to lambda11, lambda13, or lambda18 as well as those
   found in the alternate line register as stored in the latest call to
   lambda21, lambda23, or lambda28. 

Note:
   spectrohelio4 does not perform the special operation mode
   ("Schmierschritt") where dy is negative. 
see also
   sphel_mode, spectrohelio1, spectrohelio3 


!!!sphel_mode Level 3 

Syntax
   INT32 sphel_mode( uINT8 mode); 
Function

   The function sphel_mode controls whether spectrohelio1,
   spectrohelio2 spectrohelio3 and spectrohelio4 continue executing or
   terminate whenever IIFs or repoint TCs are detected during their
   executions. The parameter mode indicates which events terminate
   these functions: 

   mode = 0: continue execution, no termination (default) 
   mode = 1: terminate if IIF received 
   mode = 2: terminate if repointing TC received 
   mode = 3: terminate if IIF or repointing TC received 
see also
   spectrohelio1, spectrohelio2, spectrohelio3, spectrohelio4, cont, 
   contY, contZ 


!!!sqrt Library 

Syntax
   REAL32 sqrt( REAL32 x); 
Function
   The function sqrt returns the square root of the argument x. If the
   argument is negative, -1.0 is returned. 


!!!StandBy Restricted Level 3 

Syntax
   INT32 StandBy( void) 
Function
   cf. telecommand StandBy, OPG-section 6.7.2 


!!!StandBy_PSU Restricted Level 3 

Syntax
   INT32 StandBy_PSU( void) 
Function
   cf. telecommand StandBy_PSU, OPG-section 6.7.3 


!!!SwitchOFF_PSU Restricted Level 3 

Syntax
   INT32 SwitchOFF_PSU( void) 
Function
   cf. telecommand SwitchOFF_PSU, OPG-section 6.7.3 


!!!SwitchON_PSU Restricted Level 3 

Syntax
   INT32 SwitchON_PSU( void) 
Function
   cf. telecommand SwitchON_PSU, OPG-section 6.7.3 

!!!SystemX
SystemR, SystemS, SystemU Library 

Syntax
   REAL32 SystemR( uINT8 nr); 
   INT32 SystemS( uINT8 nr); 
   uINT32 SystemU( uINT8 nr); 
Function

   The functions SystemR, SystemS, and SystemU return the value of
   the global system parameter specified. The functions return that
   value in different data types: 

   SystemR: REAL32 
   SystemS: INT32 
   SystemU: uINT32 

   Some of the 255 global system parameters available are predefined.
   These consist of: 

   - 7 MC global positions 
   - 7 MC left soft limits 
   - 7 MC right soft limits 
   - 10 MC4 slit positions 
   - 2 pointing coordinates y, z 
   - detector B pixel offset 
   - MC2TelAzim pointing center and slope factor 
   - MC3TelElev pointing center and slope factor 
   - main and alternate line registers (18 values each) 
   - coordinate system rotation angle and offsets 
   - detector MCP current in æA limit for HKLimChk detector A 
   - deflector current limit in mA for HKLimChk 
   - MC2-6 reference position 
   - MC2-6 LVDT value of MC reference position 
   - MC2-6 slope in (LVDT value/MC halfsteps) 
   - lambda/MCInitPos polynom p1-p5 parameters 
   - 8 parameters for lambda 
   - 7 MC bitpattern 
   - MC6 step size 
   - direction of rotation compensation 
   - pole axis angle for rotation compensation 
   - detector B MCP current limit for HKLimChk 
   - detector A MCP HV command limit 
   - detector B MCP HV command limit 
   - MC6 focus position calc. offset a 
   - MC6 focus position calc. slope b 
   - detector B pixel size 
   - 3 more parameters for lambda 
   - correction for heater level 
   - correction for heater gradient 

   The following list gives the numbers, data types, default values, and
   short descriptions of the predefined global system parameters: 

   nr type def.value short description 

    1. INT32 65535 global position MC1Door 
    2. INT32 65535 global position MC2TelAzim 
    3. INT32 65535 global position MC3TelElev 
    4. INT32 65535 global position MC4SlitSel 
    5. INT32 65535 global position MC5SlitFocus 
    6. INT32 65535 global position MC6Grating 
    7. INT32 65535 global position MC8ScanMir 

    8. INT32 0 left limit MC1Door 
    9. INT32 0 left limit MC2TelAzim 
    10. INT32 0 left limit MC3TelElev 
    11. INT32 -2100 left limit MC4SlitSel 
    12. INT32 0 left limit MC5SlitFocus 
    13. INT32 200 left limit MC6Grating 
    14. INT32 250 left limit MC8ScanMir 

    15. INT32 18000 right limit MC1Door 
    16. INT32 10000 right limit MC2TelAzim 
    17. INT32 10000 right limit MC3TelElev 
    18. INT32 2000 right limit MC4SlitSel 
    19. INT32 3200 right limit MC5SlitFocus 
    20. INT32 20440 right limit MC6Grating 
    21. INT32 12400 right limit MC8ScanMir 

    22. INT32 0 MC4 slit 0 position 
    23. INT32 -2090 MC4 slit 1 position 
    24. INT32 -954 MC4 slit 2 position 
    25. INT32 -218 MC4 slit 3 position 
    26. INT32 0 MC4 slit 4 position 
    27. INT32 218 MC4 slit 5 position 
    28. INT32 556 MC4 slit 6 position 
    29. INT32 774 MC4 slit 7 position 
    30. INT32 992 MC4 slit 8 position 
    31. INT32 1734 MC4 slit 9 position 

    32. INT32 0 pointing coordinate y 
    33. INT32 0 pointing coordinate z 

    34. INT32 2653 detector B pixel offset 

    35. INT32 5000 MC2TelAzim pointing center 
    36. REAL32 2.6316 MC2TelAzim pointing slope 1 / 0.38 
    37. INT32 5000 MC3TelElev pointing center 
    38. REAL32 2.6316 MC3TelElev pointing slope 1 / 0.38 =
      2.6316f 

    39. REAL32 600.0 main line reg lambda1 600.0f 
    40. REAL32 0.0 main line reg lambda2 0.0f 
    41. REAL32 0.0 main line reg lambda3 0.0f 
    42. REAL32 0.0 main line reg lambda4 0.0f 
    43. REAL32 0.0 main line reg lambda5 0.0f 
    44. REAL32 0.0 main line reg lambda6 0.0f 
    45. REAL32 0.0 main line reg lambda7 0.0f 
    46. REAL32 0.0 main line reg lambda8 0.0f 

    47. INT32 511 main line reg pixel pos lambda1 
    48. INT32 0 main line reg pixel pos lambda2 
    49. INT32 0 main line reg pixel pos lambda3 
    50. INT32 0 main line reg pixel pos lambda4 
    51. INT32 0 main line reg pixel pos lambda5 
    52. INT32 0 main line reg pixel pos lambda6 
    53. INT32 0 main line reg pixel pos lambda7 
    54. INT32 0 main line reg pixel pos lambda8 

    55. INT32 0 main line reg MC8ScanMir pos 
    56. INT32 0 main line reg MC6Grating pos 

    57. REAL32 0.0 alt. line reg lambda1 0.0f 
    58. REAL32 0.0 alt. line reg lambda2 0.0f 
    59. REAL32 0.0 alt. line reg lambda3 0.0f 
    60. REAL32 0.0 alt. line reg lambda4 0.0f 
    61. REAL32 0.0 alt. line reg lambda5 0.0f 
    62. REAL32 0.0 alt. line reg lambda6 0.0f 
    63. REAL32 0.0 alt. line reg lambda7 0.0f 
    64. REAL32 0.0 alt. line reg lambda8 0.0f 

    65. INT32 511 alt. line reg pixel pos lambda1 
    66. INT32 0 alt. line reg pixel pos lambda2 
    67. INT32 0 alt. line reg pixel pos lambda3 
    68. INT32 0 alt. line reg pixel pos lambda4 
    69. INT32 0 alt. line reg pixel pos lambda5 
    70. INT32 0 alt. line reg pixel pos lambda6 
    71. INT32 0 alt. line reg pixel pos lambda7 
    72. INT32 0 alt. line reg pixel pos lambda8 

    73. INT32 0 alt. line reg MC8ScanMir pos 
    74. INT32 0 alt. line reg MC6Grating pos 

    75. INT32 0 deltaY: offset of coordinates 

      YO-ZO in units of 0.0625" 
    76. INT32 0 deltaZ: offset of coordinates 

      YO-ZO in units of 0.0625" 
    77. REAL32 pi alpha: coordinates rotation angle 

      from -ZO axis to +ZE axis in rad 
    78. INT32 60 MCP current limit for HK monitor detector A 

    79. INT32 30 deflector current limit in mA for 

      HK monitor 
    80. INT32 5000 MC2 step reference position 
    81. INT32 5000 MC3 step reference position 
    82. INT32 -40 MC4 step reference position 
    83. INT32 1600 MC5 step reference position 
    84. INT32 10400 MC6 step reference position 

    85. INT32 2052 MC2 LVDT value reference position 
    86. INT32 2049 MC3 LVDT value reference position 
    87. INT32 1909 MC4 LVDT value reference position 
    88. INT32 2060 MC5 LVDT value reference position 
    89. INT32 2047 MC6 LVDT value reference position 

    90. REAL32 0.379920 MC2 slope (LVDT value/MC halfsteps) 
    91. REAL32 0.379304 MC3 slope (LVDT value/MC halfsteps) 
    92. REAL32 0.47720353 MC4 slope (LVDT value/MC halfsteps) 
    93. REAL32 0.95736196 MC5 slope (LVDT value/MC halfsteps) 
    94. REAL32 0.15877441 MC6 slope (LVDT value/MC halfsteps) 

    95. REAL32 92902.661 lambda p1[0] polynom parameter 
    96. REAL32 -0.95548680 lambda p1[1] polynom parameter 
    97. REAL32 0.0022464862 lambda p1[2] polynom parameter 
    98. REAL32 3.7847956e-07 lambda p1[3] polynom parameter 
    99. REAL32 -9.1409721e-11 lambda p1[4] polynom parameter 

   100. REAL32 92452.448 lambda p2[0] polynom parameter 
   101. REAL32 -0.78656044 lambda p2[1] polynom parameter 
   102. REAL32 0.0026775704 lambda p2[2] polynom parameter 
   103. REAL32 -1.5980437e-08 lambda p2[3] polynom parameter 
   104. REAL32 3.4045525e-12 lambda p2[4] polynom parameter 

   105. REAL32 41.228878 lambda p3[0] polynom parameter 
   106. REAL32 0.084043516 lambda p3[1] polynom parameter 
   107. REAL32 -3.7850975e-05 lambda p3[2] polynom parameter 
   108. REAL32 6.6944424e-09 lambda p3[3] polynom parameter 
   109. REAL32 -4.3954003e-13 lambda p3[4] polynom parameter 

   110. REAL32 0.67326388 lambda p4[0] polynom parameter 
   111. REAL32 0.030671205 lambda p4[1] polynom parameter 
   112. REAL32 3.7683317e-07 lambda p4[2] polynom parameter 
   113. REAL32 -7.5780048e-11 lambda p4[3] polynom parameter 
   114. REAL32 5.1073297e-15 lambda p4[4] polynom parameter 

   115. REAL32 -35240674.0 lambda p5[0] polynom parameter 
   116. REAL32 386.10788 lambda p5[1] polynom parameter 
   117. REAL32 51.0 lambda p5[2] polynom parameter 

   118. REAL32 1.71661377 lambda qmstep 
   119. REAL32 3600.0 lambda nk 
   120. REAL32 50.905 lambda qmoff 
   121. INT32 6580 lambda FSToff 
   122. INT32 2008 lambda stepborder 
   123. REAL32 3200.78 lambda r 
   124. REAL32 0.0266e7 detector A pixel size 
   125. REAL32 1634.6292 lambda f0 

   126. INT32 0 bitpattern for MC1 
   127. INT32 0 bitpattern for MC2 
   128. INT32 0 bitpattern for MC3 
   129. INT32 0 bitpattern for MC4 
   130. INT32 0 bitpattern for MC5 
   131. INT32 0 bitpattern for MC6 
   132. INT32 0 bitpattern for MC8 

   133. REAL32 0.0125 MC6 step size 
   134. INT32 1 direction of rotation compensation 
   135. REAL32 0.0 pole axis angle epsilon 
   136. INT32 120 detector B MCP current limit for HKLimChk 
   137. INT32 -4835 detector A MCP HV command limit 
   138. INT32 -4700 detector B MCP HV command limit 
   139. REAL32 0.0 MC6 focus position calc. offset a 
   140. REAL32 0.0 MC6 focus position calc. slope b 
   141. REAL32 0.0265e7 detector B pixel size 

   142. REAL32 0.32 lambda p6[0] polynom parameter 
   143. REAL32 0.0 lambda p6[1] polynom parameter 
   144. REAL32 0.0 lambda p6[2] polynom parameter 
   145. REAL32 3.0 correction for heater level [0] 
   146. REAL32 3.0 correction for heater level [1] 
   147. REAL32 3.0 correction for heater level [2] 
   148. REAL32 3.0 correction for heater gradient [0] 
   149. REAL32 3.0 correction for heater gradient [1] 
   150. REAL32 3.0 correction for heater gradient [2] 
see also
   ParamR, ParamS, ParamU, PutSystemR, PutSystemS, PutSystemU 


!!!SYS_CCBStatus Level 4 

   Syntax
      INT32 SYS_CCBStatus( INT16 CU) 
   Function
      cf. telecommand SYS_CCBStatus, OPG-section 6.8.7 


!!!SYS_ClrError Level 4 

   Syntax
      INT32 SYS_ClrError( INT16 CU) 
   Function
      cf. telecommand SYS_ClrError, OPG-section 6.8.7 


!!!SYS_Config Level 4 

   Syntax
      INT32 SYS_Config( uINT16 b00_15, uINT16 b16_31,
      uINT16 b32_47, uINT16 b48_63, uINT16 b64_71) 
   Function
      cf. telecommand SYS_Config, OPG-section 6.8.7 


!!!SYS_CU_Monitor Level 4 

   Syntax
      INT32 SYS_CU_Monitor( INT16 CU, INT16 mode) 
   Function
      cf. telecommand SYS_CU_Monitor, OPG-section 6.8.7 


!!!SYS_CU_Stop Level 4 

   Syntax
      INT32 SYS_CU_Stop( INT16 CU) 
   Function
      cf. telecommand SYS_CU_Stop, OPG-section 6.8.7 


!!!SYS_Dump Level 4 

   Syntax
      INT32 SYS_Dump( INT16 CU, uINT16 HiAddr, uINT16
      LoAddr) 
   Function
      cf. telecommand SYS_Dump, OPG-section 6.8.7 


!!!SYS_GetBankSelect Level 4 

   Syntax
      INT32 SYS_GetBankSelect( INT16 CU) 
   Function
      cf. telecommand SYS_GetBankSelect, OPG-section 6.8.7 


!!!SYS_GetBankStatus Level 4 

   Syntax
      INT32 SYS_GetBankStatus( INT16 CU) 
   Function
      cf. telecommand SYS_GetBankStatus, OPG-section 6.8.7 


!!!SYS_GetError Level 4 

   Syntax
      INT32 SYS_GetError( INT16 CU) 
   Function
      cf. telecommand SYS_GetError, OPG-section 6.8.7 


!!!SYS_GetHKrecord Level 4 

   Syntax
      INT32 SYS_GetHKrecord( INT16 HKnum, INT16 MCdev) 
   Function
      cf. telecommand SYS_GetHKrecord, OPG-section 6.8.7 


!!!SYS_IO_Select Level 4 

   Syntax
      INT32 SYS_IO_Select( INT16 interface) 
   Function
      cf. telecommand SYS_IO_Select, OPG-section 6.8.7 


!!!SYS_Operator Level 4 

   Syntax
      INT32 SYS_Operator( INT16 Sci, INT16 Loc, INT16 Tar,
      INT16 FOR_Num, INT16 FOR_Date) 
   Function
      cf. telecommand SYS_Operator, OPG-section 6.8.7 


!!!SYS_Peek Level 4 

   Syntax
      INT32 SYS_Peek( INT16 CU, uINT16 HiAddr, uINT16
      LoAddr) 
   Function
      cf. telecommand SYS_Peek, OPG-section 6.8.7 


!!!SYS_Poke Level 4 

   Syntax
      INT32 SYS_Poke( INT16 CU, uINT16 HiAddr, uINT16
      LoAddr, uINT8 byte) 
   Function
      cf. telecommand SYS_Poke, OPG-section 6.8.7 


!!!SYS_RamDisk Level 4 

   Syntax
      INT32 SYS_RamDisk( INT16 mode, INT16 index, INT16
      mark) 
   Function
      cf. telecommand SYS_RamDisk, OPG-section 6.8.7 


!!!SYS_ReadStatus Level 4 

   Syntax
      INT32 SYS_ReadStatus( void) 
   Function
      cf. telecommand SYS_ReadStatus, OPG-section 6.8.7 

!!T

!!!tan Library 

   Syntax
      REAL32 tan( REAL32 x); 
   Function
      The function tan returns the tangent of the angle given in
      radians. 
   see also
      atan, atan2, cos, sin 

!!!TST_CRCPatternTest Level 4 

   Syntax
      INT32 TST_CRCPatternTest( INT16 CU, INT16 BgnAddr,
      INT16 EndAddr) 
   Function
      cf. telecommand TST_CRCPatternTest, OPG-section 6.8.8 


!!!TST_MoviTest Level 4 

   Syntax
      INT32 TST_MoviTest( INT16 CU, INT16 BgnAddr, INT16
      EndAddr) 
   Function
      cf. telecommand TST_MoviTest, OPG-section 6.8.8 


!!!TST_WalkTest Level 4 

   Syntax
      INT32 TST_WalkTest( INT16 CU, INT16 BgnAddr, INT16
      EndAddr) 
   Function
      cf. telecommand TST_WalkTest, OPG-section 6.8.8 


!!W

!!!Wait Library 

   Syntax
      INT32 Wait( uINT16 dt); 
   Function
      The function Wait waits for the time indicated by dt (values >
      0 give the time in units of 250 ms, 0 sets the wait time to 60
      ms). The function can be aborted by cancel_exec_cmd. 
   see also
      ReadImage 


!!!WaitImage Library 

   Syntax
      INT32 WaitImage( void); 
   Function
      The function WaitImage waits for the completion of the IIM
      read-out into the RAM image buffer, i.e. until the image
      integrated using the latest call to spectrohelio1 has been
      transferred into the RAM image buffer and is ready for
      inspection and manipulation. Note: WaitImage is to be
      executed only if spectrohelio1's return value has indicated
      success, i.e. that an image has been taken successfully and will
      be available for transfer soon. Calling WaitImage while no
      image is pending will cause the Function to abort with an
      error (NOPIC) after some time. 
   see also
      spectrohelio1, IIM_div, WaitImage, SendImage 
   Example
      see IIM_mode and the following fragment: 

          :
          /* set user-defined and automatic compression */
          res = compression( -1);
          :
          /* store first image in RAM */
          res = IIM_mode( 0);
          res = spectrohelio1( 40, 2, 0, 0);
          if (res != 0)
             goto exit;
          ifend;
          res = WaitImage( );
          
          /* get image's maximum pixel value */
          val = GetImageMax( );
          
          /* add images up to a specified threshold */
          cnt = 0;
          limit = 12345;
          while (val < limit)
           res = IIM_mode( +1);
           res = spectrohelio1( 40, 2, 0, 0);
           if (res != 0)
              goto exit;
           ifend;
           res = WaitImage( );
           val = GetImageMax( );
          
           /* make sure that the loop will terminate */
           cnt = cnt + 1;
           if (cnt > 20)
              goto exit;
           ifend;
          whileend;
          
          exit:
          :
          /* release RAM to telemetry */
          /* as a negative compression scheme (-1) has been specified,
          an automatic image compression will be performed before
          transmission */
          res = SendImage( 2);
          :


