Applet has opened a second browser window to display tutorial - close the window to return to the applet menus. If tutorial was entered from the HTML list - use GO-BACK to reurn to the list. ------------------------------------------------------------ Processing Algorithm for Viewing The viewable code contains the classes used to calculate white noise described in the on-line tutorial. It lacks the main shell applet from which it is called. You can request the fully runnable version of the java file by e-mail (jgiannini@psu.edu). ------------------------------------------------------ //=================================== // Interface for global constants //=================================== interface GlobalConstants { // Max size of arrays static final int TOTAL_POINTS = 512; static final int NO_SEGMENTS = 8; static final int NO_TRANSFORM_POINTS = TOTAL_POINTS/NO_SEGMENTS; static final int NO_PSD_POINTS = 1+(NO_TRANSFORM_POINTS/2); static final int FINAL_PSD_POINTS = 1+(TOTAL_POINTS/2); static final int AVE_PTS = 32; } // end Interface GlobalConstnats ----------------------- //=================================== // Classes to Implement GFO Algorithm //=================================== class GFOAlgo implements GlobalConstants { // local array to hold transform input private double[] input_real = new double[NO_TRANSFORM_POINTS]; private double[] input_imag = new double[NO_TRANSFORM_POINTS]; private double[] output_real = new double[NO_TRANSFORM_POINTS]; private double[] output_imag = new double[NO_TRANSFORM_POINTS]; private double[] PSD = new double[NO_PSD_POINTS]; private double[] ave_PSD = new double[NO_PSD_POINTS]; private double[] final_PSD = new double[FINAL_PSD_POINTS]; private double[] transform_freq = new double[FINAL_PSD_POINTS]; private double altimeter_PSD = 0.0; private double altimeter_noise = 0.0; private TransformUtilities transform_utilities; private Applet main_applet; GFOAlgo(Applet in_applet) { main_applet = in_applet; transform_utilities = new TransformUtilities(); for(int i=0;ii) { tempr = transform_real[j]; transform_real[j] = transform_real[i]; transform_real[i] = tempr; tempi = transform_imag[j]; transform_imag[j] = transform_imag[i]; transform_imag[i] = tempi; } // end if m = N/2; while(m>=1 && j>(m-1)) { j = j-m; m = m/2; } j = j+m; } // end for bit reversal // now the Danielson-Lanczos section of the routine int m_max= 1; int i_step = 0; double theta = 0.0; double w_temp = 0.0; double wpr = 0.0, wpi = 0.0; double wr = 1.0, wi = 0.0; int temp_i = 0, temp_j=0; while(N > m_max) { i_step = 2*m_max; theta= Math.PI/m_max; w_temp= Math.sin(0.5*theta); wpr = -2.0 * w_temp * w_temp; wpi = Math.sin(theta); wr= 1.0; wi= 0.0; for(m=0; m0)&&(i<(NO_PSD_POINTS-1)) ) { int j = NO_TRANSFORM_POINTS - i; in_PSD[i] = scale_factor * ( (in_output_real[i]*in_output_real[i] + in_output_imag[i]*in_output_imag[i]) + (in_output_real[j]*in_output_real[j] + in_output_imag[j]*in_output_imag[j]) ); } // end if 0peak_error) peak_error = measured_PSD[i]-Geosat_PSD[i]; } high_freq_error = peak_error; // apply correction for(int i=1; i<257; i++) in_final_PSD[i] = high_freq_error + Geosat_PSD[i]; } // end method Fit_Geosat_PSD() public void freqs(double[] in_transform_freq) { double sample_rate = 1.0; // per sec double del_freq = 1.0/(TOTAL_POINTS*sample_rate); for(int i=0; i