if (sliceCode < 1)
   {
    i = argTest( "-reg" );
    exit( 0 );
   };

if (sliceCode == 1)
   {
    float fR[size], fI[size];
    float bR[size], bI[size];
    
    ix1    = 0.1*size;
    ix2    = 0.9*size; 

    if (argTest( "-reg" ))
       {
        ix1 = spec2pnt( fdata, CUR_XDIM, psX1 );
        ix2 = spec2pnt( fdata, CUR_XDIM, psX2 );
       };

    ix1 = integer( ix1 ) - 1;
    ix2 = integer( ix2 ) - 1;

    if (ix1 > ix2)
       {
        itemp = ix1;
        ix1   = ix2;
        ix2   = itemp;
       };

    if (ix1 < 0)        {ix1 = 0;};
    if (ix2 > size - 1) {ix2 = size - 1;};

    bestVal = -1e+16;
    bestP0  = 0.0;
    pFirst  = -180;
    pLast   =  180;

    nLeft  = 1 + ix2 - ix1;
    length = nLeft;

    (void) vvCopyOff( bR, rdata, nLeft, 0, ix1 );
    (void) vvCopyOff( bI, idata, nLeft, 0, ix1 );

    for( p0 = pFirst; p0 <= pLast; p0 += 1.0 )
       {
        (void) vvCopy( fR, bR, length );
        (void) vvCopy( fI, bI, length );
        (void) phase( fR, fI, length, p0, xP1 );
    
        thisVal = vSum( fR, length );
    
        if (thisVal > bestVal)
           {
            bestVal = thisVal;
            bestP0  = p0;
           };
       }

    (void) printf( "\nP0: %.2f\n", bestP0 );
   };

(void) phase( rdata, idata, size, bestP0, xP1 );
