~ubuntu-branches/debian/jessie/eso-midas/jessie

« back to all changes in this revision

Viewing changes to prim/display/libsrc/dcl.c

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*===========================================================================
 
2
  Copyright (C) 1995-2009 European Southern Observatory (ESO)
 
3
 
 
4
  This program is free software; you can redistribute it and/or 
 
5
  modify it under the terms of the GNU General Public License as 
 
6
  published by the Free Software Foundation; either version 2 of 
 
7
  the License, or (at your option) any later version.
 
8
 
 
9
  This program is distributed in the hope that it will be useful,
 
10
  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
  GNU General Public License for more details.
 
13
 
 
14
  You should have received a copy of the GNU General Public 
 
15
  License along with this program; if not, write to the Free 
 
16
  Software Foundation, Inc., 675 Massachusetts Ave, Cambridge, 
 
17
  MA 02139, USA.
 
18
 
 
19
  Correspondence concerning ESO-MIDAS should be addressed as follows:
 
20
        Internet e-mail: midas@eso.org
 
21
        Postal address: European Southern Observatory
 
22
                        Data Management Division 
 
23
                        Karl-Schwarzschild-Strasse 2
 
24
                        D 85748 Garching bei Muenchen 
 
25
                        GERMANY
 
26
===========================================================================*/
 
27
 
 
28
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
29
.COPYRIGHT:  Copyright (c) 1994 European Southern Observatory,
 
30
                                         all rights reserved
 
31
.IDENTIFIER  DCLOAD
 
32
.LANGUAGE    C
 
33
.AUTHOR      K. Banse                   IPG-ESO Garching
 
34
.KEYWORDS    ImageDisplay
 
35
.PURPOSE     load an image into image display
 
36
.ALGORITHM   
 
37
             
 
38
.INPUT/OUTPUT
 
39
  call as    DCLOAD(imno,name,dattyp,icent,cuts,scale,chan_flag)
 
40
 
 
41
  input:
 
42
         int   imno      : image no. of input image
 
43
         char  *name     : name of the image
 
44
         int   dattyp    : data type (as D_xx_FORMAT)
 
45
         int   icen[4]   : fixpoint: screen pixels + frame pixels
 
46
         float cuts[2]   : low + high cut in z-dir.
 
47
         int   scale[3]  : scaling factors for image in x,y
 
48
                           [0,1]  if > 1: make image smaller
 
49
                                  if < 1: make image larger
 
50
                           [2]    flag for using max (= 3), using min (= 2),
 
51
                                       for averaging (= 1) or not (= 0)
 
52
 
 
53
         int   chan_flag : = 0, load into QIMCH
 
54
                           = 1, load into QIMCH and following channels
 
55
                                only applicable to 3dim image loading
 
56
 
 
57
 
 
58
.RETURNS     nothing
 
59
.COMMENT     uses MIDAS keywords: MID$DISP, MID$SPEC & SIZIN
 
60
.ENVIRONment MIDAS
 
61
             #include <midas_def.h>   Prototypes for MIDAS interfaces
 
62
             #include <idinumd.h>     Global variables for DISPLAY interfaces
 
63
 
 
64
.VERSIONS    1.00       940413  from LODIMA.FOR    RvH
 
65
 
 
66
 090706         last modif
 
67
------------------------------------------------------------*/
 
68
 
 
69
/* Define _POSIX_SOURCE to indicate that this is a POSIX program */
 
70
 
 
71
#define  _POSIX_SOURCE 1
 
72
 
 
73
#include <midas_def.h>
 
74
#include <idinumd.h>
 
75
#include <proto_II.h>
 
76
 
 
77
#include <stdio.h>
 
78
#include <string.h>
 
79
 
 
80
 
 
81
#ifndef TRUE
 
82
#define TRUE            1
 
83
#define FALSE           0
 
84
#endif
 
85
 
 
86
#define DEFMEMSIZE      512
 
87
 
 
88
#define MYMIN(a,b)      ((a) > (b) ? (b) : (a))
 
89
#define MYMAX(a,b)      ((b) > (a) ? (b) : (a))
 
90
 
 
91
/*
 
92
 
 
93
*/
 
94
 
 
95
void DCLOAD(imno,name,dattyp,icent,cuts,scale,chan_flag)
 
96
char  *name;
 
97
int   imno, dattyp, *icent, *scale, chan_flag;
 
98
float *cuts;
 
99
 
 
100
{
 
101
register int nr, mr; 
 
102
 
 
103
int  naxis;
 
104
int  actvals, dsplfl, flag, idum, kcount;
 
105
int  knul, offs, size, splmod, unit, dazhld[11], khelp[15], mapsiz[2];
 
106
int  stat, qsize[2], npix[3], splcx[4][5], splcy[4][5];
 
107
 
 
108
int  idiserver;                 /* = 1, do it in the IDIserver directly;
 
109
                                   = 0, send data via IDI interfaces */
 
110
 
 
111
double ddum, step[3], start[3];
 
112
 
 
113
char  outfra[120], cbuff[24], ourname[120];
 
114
 
 
115
void out_error();
 
116
 
 
117
 
 
118
 
 
119
 
 
120
kcount = 0;
 
121
for (nr=0; nr<15; nr++) khelp[nr] = 0;
 
122
 
 
123
nr = CGN_INDEXC(name,']');         /* look for name[...] first */
 
124
if (nr > 0)
 
125
   {
 
126
   if (name[nr+1] == ',')
 
127
      idum = nr + 1;
 
128
   else
 
129
      idum = 0;
 
130
   }
 
131
else
 
132
   idum = CGN_INDEXC(name,',');         /* look for name,f_plane,l_plane */
 
133
 
 
134
(void) SCDRDI(imno,"NAXIS",1,1,&actvals,&naxis,&unit,&knul);
 
135
if (naxis > 3) naxis = 3;                       /* limit to 3-dims */
 
136
 
 
137
if (idum > 0)
 
138
   {
 
139
   (void) strncpy(ourname,name,idum);           /* copy only name */
 
140
   ourname[idum] = '\0';
 
141
 
 
142
   if (naxis < 3)
 
143
      SCTPUT("2-dim image, no plane_specs should be given...");
 
144
   else
 
145
      {
 
146
      (void) strcpy(outfra,&name[idum+1]);
 
147
      if ((outfra[0] == 'a') || (outfra[0] == 'A'))
 
148
         {
 
149
         khelp[11] = 1;
 
150
         khelp[12] = -1;
 
151
         nr = CGN_INDEXC(outfra,',');           /* image,all,delay_time */
 
152
         if (nr > 0)
 
153
            {
 
154
            nr ++;
 
155
            stat = CGN_CNVT(&outfra[nr],1,1,&khelp[13],cuts,&ddum);
 
156
            }
 
157
         }
 
158
      else
 
159
         {
 
160
         nr = CGN_INDEXS(outfra,"..");
 
161
         if (nr > 0)
 
162
            {
 
163
            outfra[nr++] = ',';
 
164
            outfra[nr] = ' ';
 
165
            }
 
166
         stat = CGN_CNVT(outfra,1,3,&khelp[11],cuts,&ddum);
 
167
         if (stat < 1)
 
168
            {
 
169
            (void) sprintf(outfra,
 
170
                           "invalid plane no.s (= %s) ...",&name[idum+1]);
 
171
            SCETER(5,outfra);
 
172
            }
 
173
         else if (stat == 1)
 
174
            khelp[12] = khelp[11];                      /* single plane */
 
175
         }
 
176
      }
 
177
   }
 
178
else
 
179
   {
 
180
   (void) strcpy(ourname,name);
 
181
   if (naxis > 2)
 
182
      {
 
183
      khelp[11] = 1;
 
184
      khelp[12] = 1;
 
185
      SCTPUT ("1. plane of image cube will be loaded...");
 
186
      }
 
187
   }
 
188
 
 
189
 
 
190
/* get descriptors of input frame */
 
191
 
 
192
for (nr=0; nr<3; nr++)
 
193
   {
 
194
   npix[nr] = 1;
 
195
   start[nr] = 0.0;
 
196
   step[nr] = 1.0;
 
197
   }
 
198
 
 
199
(void) SCDRDI(imno,"NPIX",1,naxis,&actvals,npix,&unit,&knul);
 
200
(void) SCDRDD(imno,"START",1,naxis,&actvals,start,&unit,&knul);
 
201
(void) SCDRDD(imno,"STEP",1,naxis,&actvals,step,&unit,&knul);
 
202
size = *npix * npix[1];
 
203
 
 
204
if (naxis > 2)
 
205
   {
 
206
   if ( (khelp[11] == -1) || (khelp[11] > npix[2]) )
 
207
      khelp[11] = npix[2];
 
208
   else if (khelp[11] < 1)
 
209
      khelp[11] = 1;
 
210
   if ( (khelp[12] == -1) || (khelp[12] > npix[2]) )
 
211
      khelp[12] = npix[2];
 
212
   else if (khelp[12] < 1)
 
213
      khelp[12] = 1;
 
214
 
 
215
   if (chan_flag == 0)
 
216
      khelp[10] = 1;
 
217
   else                         /* only allow as many planes as channels */
 
218
      {                         /* from QIMCH on exist */
 
219
      khelp[10] = 2;
 
220
 
 
221
      kcount = QLSTCH - QIMCH;  /* no of available channels */
 
222
      nr = kcount + (khelp[11] - 1);    /* last possible plane to load */
 
223
      if (khelp[12] > nr) khelp[12] = nr;
 
224
      }
 
225
   }
 
226
 
 
227
 
 
228
/*  test, if we should load into a frame */
 
229
 
 
230
(void) SCKGETC("MID$DISP",1,22,&actvals,cbuff);
 
231
if ((*cbuff != 'I') && (*cbuff != 'i'))
 
232
   {
 
233
   (void) strcpy(outfra,cbuff+2);
 
234
   if ((*cbuff != 'F') && (*cbuff != 'f'))
 
235
      {
 
236
      dsplfl = -1;
 
237
      (void) SCKGETC("MID$SESS",11,2,&actvals,cbuff);
 
238
      (void) strcpy(&cbuff[2],".ima");
 
239
      (void) strcat(outfra,cbuff);
 
240
      (void) SCKWRC("IN_B",1,outfra,1,30,&unit);        /* save name... */
 
241
      (void) SCKRDI("IDIDEV",49,2,&actvals,qsize,&unit,&knul);
 
242
      if (qsize[0] <= 0) qsize[0] = DEFMEMSIZE;
 
243
      if (qsize[1] <= 0) qsize[1] = DEFMEMSIZE;
 
244
      }
 
245
   else
 
246
      {
 
247
      if (scale[0] < -1)
 
248
         qsize[0] = npix[0] * (-scale[0]);
 
249
      else if (scale[0] > 1)
 
250
         qsize[0] = npix[0] / scale[0];
 
251
      else
 
252
         qsize[0] = npix[0];
 
253
      if (scale[1] < -1)
 
254
         qsize[1] = npix[1] * (-scale[1]);
 
255
      else if (scale[1] > 1)
 
256
         qsize[1] = npix[1] / scale[1];
 
257
      else
 
258
         qsize[1] = npix[1];
 
259
      dsplfl = 0;
 
260
      }
 
261
   }
 
262
else
 
263
   dsplfl = 1;
 
264
 
 
265
 
 
266
/* determine map buffer space, and start to fill array KHELP */
 
267
 
 
268
khelp[0] = dattyp;
 
269
(void) SCKRDI("SIZIN",1,2,&actvals,mapsiz,&unit,&knul);
 
270
if (*mapsiz < *npix)            /* for image with long lines... */
 
271
   {
 
272
   *mapsiz = *npix;
 
273
   khelp[1] = *npix;
 
274
   }
 
275
else
 
276
   khelp[1] = MYMIN( *mapsiz, size );
 
277
khelp[2] = mapsiz[1];
 
278
 
 
279
 
 
280
/* no. of lines needed to average (work on) */
 
281
 
 
282
if (scale[2] != 0)
 
283
   khelp[1] = MYMAX( khelp[1],*npix * scale[1]);
 
284
 
 
285
 
 
286
/* determine size of "display_frame" + load the image into it */
 
287
 
 
288
if (dsplfl < 1)
 
289
   {
 
290
   int    outno, kcen[2], mpix[2];
 
291
   double end[2];
 
292
   float  ocuts[4];
 
293
   char   cunit[120];
 
294
 
 
295
 
 
296
   kcen[0] = icent[0];          /* determine size of output frame */
 
297
   if (icent[2] == -1) 
 
298
      kcen[1] = qsize[0]/2;
 
299
   else
 
300
      kcen[1] = icent[2];
 
301
   SIZER_C(qsize[0],npix[0],scale[0],scale[2],kcen,
 
302
           dazhld,dazhld+1,dazhld+2,dazhld+3);
 
303
   kcen[0] = icent[1];
 
304
   if (icent[3] == -1) 
 
305
      kcen[1] = qsize[1]/2;
 
306
   else
 
307
      kcen[1] = icent[3];
 
308
   SIZER_C(qsize[1],npix[1],scale[1],scale[2],kcen,
 
309
           dazhld+5,dazhld+6,dazhld+7,dazhld+8);
 
310
 
 
311
   mpix[0] = dazhld[0];
 
312
   mpix[1] = dazhld[5];
 
313
   size = mpix[0] * mpix[1];
 
314
 
 
315
   (void) SCFCRE(outfra,D_I1_FORMAT,F_O_MODE,F_IMA_TYPE,size,&outno);
 
316
 
 
317
   idum = 2;                                    /* will be 2-dim frame */
 
318
   (void) SCDWRI(outno,"NAXIS",&idum,1,1,&unit);
 
319
   (void) SCDWRI(outno,"NPIX",mpix,1,idum,&unit);
 
320
   (void) SCDWRD(outno,"STEP",step,1,idum,&unit);
 
321
 
 
322
 
 
323
   /* get original identifier */
 
324
 
 
325
   memset((void *)cunit,32,(size_t)72);
 
326
   (void) strncpy(cunit,"hardcopy of frame ",18);
 
327
   (void) SCDWRC(outno,"IDENT",1,cunit,1,72,&unit);
 
328
   (void) strcpy(cunit,"screen pixels   ");
 
329
   (void) strcpy(cunit+16, "screen pixels   ");
 
330
   (void) strcpy(cunit+32, "screen intens.  ");
 
331
   (void) SCDWRC(outno,"CUNIT",1,cunit,1,48, &unit);
 
332
   (void) SCDWRC(outno,"ROOT_FRAME",1,ourname,1,60,&unit);
 
333
   (void) SCDWRR(outno,"ROOT_CUTS",cuts,1,2,&unit);
 
334
 
 
335
 
 
336
   /* Write a 2-dimensional image into a frame serving as Virtual Display */
 
337
 
 
338
   WIMGB_C(imno,khelp,npix,cuts,scale,outno,dazhld);
 
339
 
 
340
   ocuts[0] = ocuts[2] = 0.;
 
341
   ocuts[1] = ocuts[3] = 255.;                         /* try highest value */
 
342
   (void) SCDWRR(outno,"LHCUTS",ocuts,1,4,&unit);
 
343
 
 
344
 
 
345
   /* new start & end values for the X-axis */
 
346
 
 
347
   *start += (dazhld[3]-1) * (*step);                     /* start values */
 
348
   if ( *scale < 0 )
 
349
      offs = *mpix / (- (*scale)) - 1;
 
350
   else
 
351
      { 
 
352
      if ( scale[2] == 0 )                              /* no averaging */
 
353
         offs = (*mpix-1) * (*scale);
 
354
      else
 
355
         offs = ((*mpix) * (*scale)) - 1;
 
356
      }
 
357
   *end = (*start) + (offs * (*step));                  /* end value */
 
358
 
 
359
 
 
360
   /* new start + end values for the Y-axis */
 
361
 
 
362
   start[1] += (dazhld[8] - 1) * step[1];
 
363
   if ( scale[1] < 0 )
 
364
      offs = mpix[1]/ (- scale[1]) - 1;
 
365
   else
 
366
      {
 
367
      if ( scale[2] == 0 )                              /* no averaging */
 
368
         offs = (mpix[1] - 1) * scale[1];
 
369
      else
 
370
         offs = mpix[1] * scale[1] - 1;
 
371
      }
 
372
   end[1] = (start[1] + offs) * step[1];                     /* end value */
 
373
 
 
374
   (void) SCDWRD(outno,"START",start,1,2,&unit);
 
375
   (void) SCDWRD(outno,"END",end,1,2,&unit);
 
376
   }                                            /* The job is done!! */
 
377
else
 
378
 
 
379
 
 
380
/*
 
381
   We are really going to load into a display.
 
382
   Get split mode + addresses + memories per pixel as well as "active" channel
 
383
*/
 
384
 
 
385
   {
 
386
   int  kdum[2];
 
387
   char  *namepntr;
 
388
 
 
389
   (void) SCKRDI("DAZHOLD",1,11,&actvals,dazhld,&unit,&knul);
 
390
 
 
391
   if (icent[2] == -1) icent[2] = QMSZX/2;
 
392
   if (icent[3] == -1) icent[3] = QMSZY/2;
 
393
   
 
394
   if ( IDINUM < 11 ) 
 
395
      SPLCNT_C( splcx, splcy );               /* calculate split addresses */
 
396
   else
 
397
      {
 
398
      for (nr=0; nr<4; nr++)
 
399
         {
 
400
         for (mr=0; mr<5; mr++)
 
401
            {
 
402
            splcx[nr][mr] = 0;
 
403
            splcy[nr][mr] = 0;
 
404
            }
 
405
         }
 
406
      if (QIMCH == QOVCH) 
 
407
         SCETER(6,"DCLOAD: no image loading into overlay possible in X11");
 
408
      }
 
409
 
 
410
   khelp[9] = SOURCE;
 
411
 
 
412
   if (IDINUM == 11)
 
413
      {                                 /* check for compressed files */
 
414
      kdum[0] = 0;
 
415
      namepntr = ourname;
 
416
      idiserver = 1;
 
417
      idum = (int) strlen(ourname) - 1;
 
418
      if ((ourname[idum] == 'Z') && (ourname[idum-1] == '.'))
 
419
         {
 
420
         idum --;
 
421
         (void) strncpy(outfra,ourname,idum);
 
422
         outfra[idum] = '\0';
 
423
         namepntr = outfra;
 
424
         }
 
425
      else if ((ourname[idum] == 'z') && (ourname[idum-1] == 'g')
 
426
                                      && (ourname[idum-2] == '.'))
 
427
         {
 
428
         idum -=2;
 
429
         (void) strncpy(outfra,ourname,idum);
 
430
         outfra[idum] = '\0';
 
431
         namepntr = outfra;
 
432
         }
 
433
      else
 
434
         (void) SCFINF(ourname,5,kdum);
 
435
 
 
436
      if (kdum[0] > 0)                  /* we have an extracted frame... */
 
437
         {
 
438
         (void) SCFNAME(imno,outfra,100);       /* get name of son */
 
439
         kdum[0] = 0;
 
440
         (void) SCPSET(F_DEL_PARM,kdum);        /* don't delete son */
 
441
         (void) SCFCLO(imno);                   /* close father + son */
 
442
         namepntr = outfra;                     /* point to name of son */
 
443
         }
 
444
      }
 
445
   else
 
446
      idiserver = 0;
 
447
 
 
448
   if (idiserver == 1)
 
449
      {
 
450
      khelp[2] = MYMAX(mapsiz[0],mapsiz[1]);         /* we can allocate! */
 
451
      stat = IIXWIM_C(QDSPNO,QIMCH,namepntr,khelp,LOADDR,
 
452
                      npix,icent,cuts,scale);
 
453
      if (stat != 0)                            /* we had problems... */
 
454
         out_error(stat,ourname);
 
455
      (void) IIEGDB_C(QDSPNO,1,QIMCH,dzmemc,dzmemi,dzmemr);
 
456
      }
 
457
   else
 
458
      {
 
459
      WIMGA_C(QDSPNO,QIMCH,imno,khelp,LOADDR,npix,icent,cuts,scale);
 
460
      ZOOMX = ZOOMY = 1;                        /* update IDIMEM data */
 
461
      SCALX = scale[0];
 
462
      SCALY = scale[1];
 
463
      }
 
464
 
 
465
 
 
466
   flag = FALSE;
 
467
   splmod = dazhld[2];
 
468
   if (splmod == 0)      
 
469
      {
 
470
      if (QMSZX > QDSZX)                /* take care of larger channels */
 
471
         {
 
472
         SCROLX = QMSZX/2 - QDSZX/2;
 
473
         flag = TRUE;
 
474
         } 
 
475
      else
 
476
         SCROLX = 0;
 
477
 
 
478
      if (QMSZY > QDSZY)      
 
479
         {
 
480
         SCROLY = QMSZY/2 + QDSZY/2;
 
481
         flag = TRUE;
 
482
         }
 
483
      else
 
484
         SCROLY = QMSZY - 1;
 
485
      }
 
486
   else
 
487
      {
 
488
      flag = TRUE;
 
489
      *npix = SSPX + NSX/2;
 
490
      SCROLX = *npix - splcx[QIMCH][splmod];
 
491
      npix[1] = SSPY + NSY/2;
 
492
      SCROLY = QMSZY - 1 + npix[1] - splcy[QIMCH][splmod];
 
493
      }
 
494
      
 
495
   if ( flag ) (void) Cdazscr(QDSPNO,QIMCH,&SCROLX,&SCROLY);
 
496
 
 
497
 
 
498
   /* update refscale only for image channels...  */
 
499
 
 
500
   if (QIMCH != QOVCH) Cdazvis(QDSPNO,QIMCH,1,dazhld[7]);
 
501
 
 
502
 
 
503
   /* store xsta,ysta,xend,yend,locut,hicut,min,max 
 
504
      in global variable dzmemr */
 
505
 
 
506
   if (khelp[9] != 2)           /* only if not OVERWRITE */
 
507
      {
 
508
      dzmemr[0] = (float) (*start + (SFPX-1) * *step);
 
509
      dzmemr[1] = (float) (start[1] + (SFPY-1) * step[1]);
 
510
      if ( *scale < 0)     
 
511
         offs = NSX / (- *scale) - 1;
 
512
      else
 
513
         { 
 
514
         if ( scale[2] == 0 )                    /* no averaging */
 
515
            offs = (NSX-1) * (*scale);
 
516
         else
 
517
            offs = NSX * (*scale) - 1;
 
518
         }
 
519
      dzmemr[2] = (float) (*start + (SFPX + offs - 1) * *step);
 
520
 
 
521
      if ( scale[1] < 0 )     
 
522
         offs = NSY / (- scale[1]) - 1;
 
523
      else
 
524
         { 
 
525
         if ( scale[2] == 0 )                    /* no averaging */
 
526
            offs = (NSY - 1) * scale[1];
 
527
         else
 
528
            offs = NSY * scale[1] - 1;
 
529
         }
 
530
 
 
531
      dzmemr[3] = (float) (start[1] + (SFPY + offs - 1) * step[1]);
 
532
      dzmemr[4] = cuts[0];
 
533
      dzmemr[5] = cuts[1];
 
534
      dzmemr[6] = cuts[2];
 
535
      dzmemr[7] = cuts[3];
 
536
 
 
537
      if (khelp[10] == 2)               /* update channel info */
 
538
         {
 
539
         int  chanl;
 
540
 
 
541
         chanl = QIMCH;
 
542
         for (nr=0; nr<kcount; nr++)
 
543
            {
 
544
            ZPLANE = khelp[11];
 
545
            DCPICH(chanl);
 
546
            Alphamem(chanl);
 
547
            chanl ++;
 
548
            khelp[11] ++;
 
549
            }
 
550
         }
 
551
      else
 
552
         {
 
553
         DCPICH(QIMCH);
 
554
         Alphamem(QIMCH);
 
555
         }
 
556
      }
 
557
   }
 
558
}
 
559
 
 
560
/*
 
561
 
 
562
*/
 
563
 
 
564
void out_error(stat,name)
 
565
int  stat;
 
566
char  *name;
 
567
 
 
568
{
 
569
char   otto[88];
 
570
 
 
571
 
 
572
if (stat == 41)
 
573
   {
 
574
   sprintf(otto,"XWIMG: overflow in output buffer...");
 
575
   SCETER(41,otto);
 
576
   }
 
577
else if (stat == 12)
 
578
   {
 
579
   sprintf(otto,"XWIMG: averaging only supported for real data!");
 
580
   SCETER(12,otto);
 
581
   }
 
582
else
 
583
   {
 
584
   sprintf(otto,"XWIMG: frame %s could not be accessed...",name);
 
585
   SCETER(11,otto);
 
586
   }
 
587
}