
if (sliceCode == CODE_INIT)
   {
    NDAPOD     = 1002;
    NDQUADFLAG = 1007;
    FD_REAL    = 1;

    (void) setParm( fdata, NDSIZE,     integer( specnum - 2 ), CUR_YDIM );
    (void) setParm( fdata, NDAPOD,     integer( specnum - 2 ), CUR_YDIM );
    (void) setParm( fdata, NDQUADFLAG, FD_REAL,                CUR_YDIM ); 
   };

if (sliceCode < 1)
   {
    exit( 0 ); 
   };
	
if (sliceCode % ySize)
   {
    exit( 0 );
   };

float rMatrix[2*size*specnum];

float cc[size], sc[size], cs[size], ss[size];
float ppR[size], ppI[size];
float pnR[size], pnI[size];

ppOff = (2*size)*(specnum/2 - 2);
pnOff = (2*size)*(specnum/2 - 2);

for( iy = 0; iy < (specnum/2 - 1); iy++ )
   {
    (void) dReadB( inUnit, cc,  wordLen*size );
    (void) dReadB( inUnit, sc,  wordLen*size );
    (void) dReadB( inUnit, cs,  wordLen*size );
    (void) dReadB( inUnit, ss,  wordLen*size );

    (void) vvCopy( ppR, cc, size );
    (void) vvSub( ppR, ss, size );

    (void) vvCopy( ppI, sc, size );
    (void) vvAdd( ppI, cs, size );

    (void) vvCopy( pnR, cc, size );
    (void) vvAdd( pnR, ss, size );

    (void) vvCopy( pnI, cs, size );
    (void) vvSub( pnI, sc, size );
    (void) vNeg( pnI, size ); 

    (void) vNeg( pnR, size );
    (void) vNeg( ppR, size );

    if (pnOff >= 0)
       {
        (void) vvCopyOff( rMatrix, pnI, size, pnOff, 0 );
        (void) vvCopyOff( rMatrix, pnR, size, pnOff+size, 0 );
        pnOff -= 2*size;
       };

    (void) vvCopyOff( rMatrix, ppI, size, ppOff, 0 );
    (void) vvCopyOff( rMatrix, ppR, size, ppOff+size, 0 );
    ppOff += 2*size;
   }

(void) dWrite( outUnit, rMatrix, wordLen*2*size*(specnum - 2) );

