int GetLambdaSpectrum(int Raw)
{
	char buff[50] ;

			// Obtain the current order limits
			GetDlgItemText(hDlgFourier, IDC_E_HORD, buff, 50) ;
			st.BTopOrd = atof(buff) ;
			GetDlgItemText(hDlgFourier, IDC_E_LORD, buff, 50) ;
			st.BBotOrd = atof(buff) ;
		    st.BOrdStep = (st.BTopOrd - st.BBotOrd) / 500.0 ;
			StartWait() ;

			// We use 4 times the number of available images
			samples = 4 * A.iNumImgperpfx[CurrentPfxID] ;

			// Sample the lambda data at regular intervals
			Sampler(pFourier, pSamp, samples, Raw) ;

			// Obtain the spectrum of the sampled lambda data
			Spectrum(
				pSamp,
				samples,
				&(st.BOrdStep),
				st.BTopOrd,		// over the specified order range
				st.BBotOrd,
				Raw				// Raw (==1) or Running Mean (==0)		 
				) ;

			EndWait() ;
			return 1 ;
}

int GetLambdaSynthesis(int RawOrMean, int IfForced)
{
	char buff[20] ;

			// Obtain the order limits
			GetDlgItemText(hDlgFourier, IDC_E_HORD, buff, 20) ;
			st.BTopOrd = atof(buff) ;
			GetDlgItemText(hDlgFourier, IDC_E_LORD, buff, 20) ;
			st.BBotOrd = atof(buff) ;
			st.BOrdStep = (st.BTopOrd - st.BBotOrd) / 500.0 ;

			StartWait() ;

			Synthesis(
				pSamp,
				4 * samples,
				st.BTopOrd,
				st.BBotOrd,
				0.0,		  // No resonant order
				0.0,		  // No selectivity
				0.0,          // No gain
				0,		      // No tuning
				1,			  // On a bud series
				RawOrMean,	  // Raw or running mean lambda data
				IfForced,     // Whether forced
				0,			  // Not alignments
				0,			  // Not integral
				0			  // Not derivative
				) ;

			EndWait() ;

			return 1 ;
}

