Section Contents
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.
8.1.1 Library Functions (available to all users)
type function
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 section 6/9.1.
type function
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 section 6.
type function
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 section 6.
type 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.
REAL32 alpha; alpha = atan( 1.0);
REAL32 alpha; alpha = atan2( 2.0, -1.0);
INT32 res; res = binning( 4, 2); /* 4-fold spectral, 2-fold spatial : /* --- data acquisition ---*/ : res = binning( 1, 1); /* turn off binning */
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.
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
for possible input image formats: arbitrary spectral dimension * arbitraty spatial dimension * 16 bits (resulting output formats: spectral dimension * spatial dimension * 8 bits)
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.
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.
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.
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.
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)
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)
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.
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).
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).
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.
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.
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).
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).
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.
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).
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.
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.
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.
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.
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.
binning, spectrohelio1, spectrohelio2, SendImage, WaitImage
/* 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);
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:
The values of alpha, deltaY, and deltaZ are global system parameters (cf. SystemR,SystemS, SystemU).
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).
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.
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.
: /* 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); :
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.
: /* 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;
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:
The values of alpha, deltaY, and deltaZ are global system parameters (cf. SystemR,SystemS, SystemU ). By default, alpha=0.
List of Solar event codes:
- means not applicable to SUMER tbd. means potential candidate
The function FlatField calculates a correction data array which can be applied to correct images for small scale nonuniformities in the response of the detector. The purpose if this function is to acquire an image which allows us to extract these fixed pattern of the detector. The function FlatField assumes that the data have been acquired in the IIM channel selected to the IIM. The integration is stopped and the picture is read out. The 16 bit raw image data [J] are filtered using an n*n (4 ...16) even median filter resulting in a second data array [L]. Dividing all elements of [J] by the corresponding elements of [L] creates the resulting flat field correction image [R], which contains only the small scale features of the image captured by the median filter. To reduce storage requirements, the data array is scaled to bytes by multiplying by f1 and adding f0, and stored as an array of 8 bit values [E]:
Whenever the flat-field correction is enabled (cf. FF_mode=1), every image [I] acquired will be flat-field corrected giving the image [K]
Before calling FlatField, the SUMER instrument has to be prepared for the flat-field acquisition by executing telecommands to
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.
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.
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;
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.
The function IIM_mode sets the image integration memory's read-out mode. Valid modes are:
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.
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);
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.
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:
The functions PutSystemR, PutSystemS, and PutSystemU set the global system parameter nr to the value val. For possible values of nr, please cf. SystemR.
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.
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;
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.
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:
/* 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);
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.
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:
Note that the Function RSC cannot be started if the RAM disk contains uncompressed images. RSC takes care of switch on/off.
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.
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).
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
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.
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
As the slit positions top and bottom interact with the pointing, it is important to select the slit before pointing the telescope.
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
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 | 280.9 || 1,2,3,4,5 | 1024 x 360 B2 | 1 1 | 1024 x 360 B2 | |X| 3 | 1024 x 360 B2 | 561.8 || | | 1 1 | 1024 x 360 B2 | |X| 4 | 1024 x 120 B1 | 93.7 || 1,2,3,4,5 | 1024 x 120 B2 | 1 3 | 1024 x {..3*}120 B2 | |X| 5 | 1024 x 120 B2 | 187.3 || | | 1 3 | 1024 x {..3*}120 B2 | |X| 8 | 50 x 360 B1 | 13.8 || 1,2,3,4,5 | 50 x 360 B2 | 20 1 | {..20*}50 x 360 B2 | |X| 9 | 50 x 360 B2 | 27.5 || | | 20 2 | {..20*}50 x 360 B2 | |X| 10 | 50 x 120 B1 | 4.6 || 1,2,3,4,5 | 50 x 360 B2 | 20 3 | {..20*}50 x {..3*}120 B2 | |X| 11 | 50 x 120 B2 | 9.2 || | | 20 3 | {..20*}50 x {..3*}120 B2 | |X| 12 | 25 x 360 B1 | 6.9 || 1,2,3,4,5 | 25 x 360 B2 | 40 1 | {..40*}25 x 360 B2 | |X| 12 | 25 x 360 B1 | 6.9 || 6 | 50 x 360 B2 | 20 1 | {..20*}50 x 360 B2 | |X| 13 | 25 x 360 B2 | 13.8 || | | 40 1 | {..40*}25 x 360 B2 | |X| 14 | 25 x 120 B1 | 2.3 || 1,2,3,4,5 | 25 x 120 B2 | 40 1 | {..40*}25 x {..3*}120 B2 | |X| 14 | 25 x 120 B1 | 2.3 || 6 | 50 x 120 B2 | 20 1 | {..20*}50 x {..3*}120 B2 | |X| 15 | 25 x 120 B2 | 4.6 || | 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.1 || | | | | |X| 20 | 1 x 120 I2 | 0.2 || 7,10,13,16 | 50 x 120 B2 | 20 3 | {..20*}50 x {..3*}120 B2 | | | 21 | 1 x 120 R4 | 0.4 || | | | | | | 24 | 300 x 360 I2 | 164.6 || | | | | | | 25 | 300 x 360 R4 | 329.2 || | | | | | | 26 | 300 x 120 I2 | 54.9 || | | | | | | 27 | 300 x 120 R4 | 109.8 || | | | | |X| 30 | 25 x 24 B1 | 0.5 || 1,2,3,4,5 | 25 x 24 B2 | 40 15 | {..40*}25 x {..15*}24 B2 | |X| 31 | 50 x 24 B1 | 1.0 || 1,2,3,4,5 | 50 x 24 B2 | 20 15 | {..20*}50 x {..15*}24 B2 | | | 34 | 1 x 512 B1 | 0.4 || | | | | | | 35 | 50 x 512 B1 | 19.6 || | | | | | | 36 | 512 x 20 B4 | 31.3 || | | | | |X| 37 | 256 x 360 B2 | 140.5 || | | 4 1 | {..4*}256 x 360 B2 | |X| 38 | 512 x 360 B1 | 140.5 || 1,2,3,4,5 | 512 x 360 B2 | 2 1 | {..2*}512 x 360 B2 | |X| 39 | 512 x 360 B2 | 280.9 || | | 2 1 | {..2*}512 x 360 B2 | |X| 40 | 1024 x 12 B1 | 9.4 || 1,2,3,4,5 | 1024 x 12 B2 | 1 30 | 1024 x {..30*}12 B2 | |X| 41 | 2 x 360 I2 | 1.1 || 8,11,14 | 50 x 360 B2 | 20 1 | {..20*}50 x 360 B2 | |X| 42 | 2 x 120 I2 | 0.4 || 8,11,14 | 50 x 120 B2 | 20 3 | {..20*}50 x {..3*}120 B2 | |X| 43 | 4 x 360 I2 | 2.2 || 9,12,15 | 50 x 360 B2 | 20 1 | {..20*}50 x 360 B2 | |X| 44 | 4 x 120 I2 | 0.8 || 9,12,15 | 50 x 360 B2 | 20 3 | {..20*}50 x {..3*}120 B2 | |X| 45 | 5 x 360 B1 | 1.4 || 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.
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.
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.
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.
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:
The functions SystemR, SystemS, and SystemU return the value of the global system parameter specified. The functions return that value in different data types:
Some of the 255 global system parameters available are predefined. These consist of:
The following list gives the numbers, data types, default values, and short descriptions of the predefined global system parameters:
YO-ZO in units of 0.0625"
YO-ZO in units of 0.0625"
from -ZO axis to +ZE axis in rad
HK monitor
: /* 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); :