Main Page   Namespace List   Compound List   File List   Compound Members   File Members  

copy-ocsTools.cc File Reference

#include "ocsTools.hh"
#include "ocsConst.hh"
#include <math.h>
#include "nrutil.h"
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>

Go to the source code of this file.

Defines

#define IM1   2147483563
#define IM2   2147483399
#define AM   (1.0/IM1)
#define IMM1   (IM1-1)
#define IA1   40014
#define IA2   40692
#define IQ1   53668
#define IQ2   52774
#define IR1   12211
#define IR2   3791
#define NTAB   32
#define NDIV   (1+IMM1/NTAB)
#define EPS   1.2e-7
#define RNMX   (1.0-EPS)
#define IA   16807
#define IM   2147483647
#define AM   (1.0/IM)
#define IQ   127773
#define IR   2836
#define NTAB   32
#define NDIV   (1+(IM-1)/NTAB)
#define EPS   1.2e-7
#define RNMX   (1.0-EPS)
#define NRANSI
#define ITMAX   200
#define NRANSI
#define TOL   2.0e-4
#define NRANSI
#define NRANSI
#define GOLD   1.618034
#define GLIMIT   100.0
#define TINY   1.0e-20
#define SHFT(a,b,c,d)    (a)=(b);(b)=(c);(c)=(d);
#define NRANSI
#define ITMAX   100
#define CGOLD   0.3819660
#define ZEPS   1.0e-10
#define SHFT(a,b,c,d)    (a)=(b);(b)=(c);(c)=(d);
#define NRANSI
#define ITMAX   200
#define EPS   1.0e-10
#define FREEALLD   free_dvector(xi,1,n);free_dvector(h,1,n);free_dvector(g,1,n);
#define NRANSI
#define TOL   2.0e-4
#define NRANSI
#define NRANSI
#define GOLD   1.618034
#define GLIMIT   100.0
#define TINY   1.0e-20
#define SHFT(a,b,c,d)    (a)=(b);(b)=(c);(c)=(d);
#define NRANSI
#define ITMAX   100
#define CGOLD   0.3819660
#define ZEPS   1.0e-10
#define SHFT(a,b,c,d)    (a)=(b);(b)=(c);(c)=(d);
#define NRANSI
#define ITMAX   200
#define EPS   1.0e-10
#define FREEALL   free_nrvector(xi,1,n);free_nrvector(h,1,n);free_nrvector(g,1,n);
#define NR_END   1
#define FREE_ARG   char*
#define NRANSI
#define SWAP(a,b)    {temp=(a);(a)=(b);(b)=temp;}
#define NRANSI
#define SWAP(a,b)    {temp=(a);(a)=(b);(b)=temp;}
#define ITMAX   100
#define EPS   3.0e-7
#define FPMIN   1.0e-30
#define ITMAX   100
#define EPS   3.0e-7

Functions

double GetRadiusCircle (double *PointA, double *PointB, double *PointC)
double GetDistance2Points (double *PointA, double *PointB, int FirstCoord)
int Periodicity (int ii, int Periodicity)
void TransRzRyV3to_Xhat ( double *Vector, double *thetaZthetaY)
void TransRyV3to_YZ ( double *Vector, double *thetaY)
void TransRzRxV3to_Xhat ( double *Vector, double *thetaZthetaX)
void TransRzRxV3to_Xhat ( double *Vector, double *thetaZ, double *thetaX)
void Multiply ( double Left[][3], double Right[][3])
void Multiply (double Left[][3],double Right[3])
void CrossProduct (double *Left, double *Right, int FirstCoord)
void RotatesAboutZ (double angle, double *Vector)
void RotatesAboutX (double angle, double *Vector)
void RotatesAboutY (double angle, double *Vector)
double ScalarProduct (double *VectorA, double *VectorB)
double GetVectorLength (double *Vector, int Dimension)
void RotatesAboutX (double angle, cplx *JonesVector)
void RotatesAboutY (double angle, cplx *JonesVector)
void RotatesAboutZ (double angle, cplx *JonesVector)
double dB2Linear (double dBvalue)
double dBm2Linear (double dBmPower)
double Linear2dB (double LinearValue)
double Linear2dBm (double LinearPower)
double Linear2dB_Limited (double LinearValue, double MaxValue_dB)
double GetDegreeOfPolarization (double *StokesVector)
double GetPhase (const cplx Phasor)
void Stokes2Jones (const double *Stokes, cplx *Jones)
void Stokes2JonesKeepPower (const double *Stokes, cplx *Jones)
void Jones2Stokes (const cplx *Jones, double *Stokes)
void Jones2StokesKeepPower (const cplx *Jones, double *Stokes)
double Frequency2Wavelength (double Frequency)
double Wavelength2Frequency (double Wavelength)
void gaussian_pdf (int N, double stan_dev, double *vec)
cplx bessel5 (double omega, double omega_0, double FWHM)
void electrical_filter (cplx *my_power_time, cfftw *fft, double fwhm_norm)
void optical_filter (cplx *my_field_time, cplx *my_field_freq, cfftw *fft, double fwhm_norm)
int lock_or_unlock_mosix (int what)
int cpujob_mosix (void)
int slow_mosix (void)
double peak_power (cplx *in, int N)
double pulse_energy (cplx *in, int N, double width)
float ranG (long *idum)
float ran1 (long *idum)
float Gaussian_pdf (long *idum)
void powell (float p[], float xi[][4], int n, float ftol, int *iter, float *fret, float (*func)(float []))
void linmin (float p[], float xi[], int n, float *fret, float (*func)(float []))
float f1dim (float x)
void mnbrak (float *ax, float *bx, float *cx, float *fa, float *fb, float *fc, float (*func)(float))
float brent (float ax, float bx, float cx, float (*f)(float), float tol, float *xmin)
void frprmnd (double p[], int n, double ftol, int *iter, double *fret, double (*func)(double []), void (*dfunc)(double [], double []))
void linmind (double p[], double xi[], int n, double *fret, double (*func)(double []))
double f1dim (double x)
void mnbrakd (double *ax, double *bx, double *cx, double *fa, double *fb, double *fc, double (*func)(double))
double brentd (double ax, double bx, double cx, double (*f)(double), double tol, double *xmin)
void frprmn (float p[], int n, float ftol, int *iter, float *fret, float (*func)(float []), void (*dfunc)(float [], float []))
void nrerror (char error_text[])
float* nrvector (long nl, long nh)
int* ivector (long nl, long nh)
unsigned char* cvector (long nl, long nh)
unsigned long* lvector (long nl, long nh)
double* dvector (long nl, long nh)
float** matrix (long nrl, long nrh, long ncl, long nch)
double** dmatrix (long nrl, long nrh, long ncl, long nch)
cplx** cmatrix (long nrl, long nrh, long ncl, long nch)
int** imatrix (long nrl, long nrh, long ncl, long nch)
float** submatrix (float **a, long oldrl, long oldrh, long oldcl, long oldch, long newrl, long newcl)
float** convert_matrix (float *a, long nrl, long nrh, long ncl, long nch)
float*** f3tensor (long nrl, long nrh, long ncl, long nch, long ndl, long ndh)
void free_dvector (double *v, long nl, long nh)
void free_nrvector (float *v, long nl, long nh)
void free_ivector (int *v, long nl, long nh)
void free_cvector (unsigned char *v, long nl, long nh)
void free_lvector (unsigned long *v, long nl, long nh)
void free_matrix (float **m, long nrl, long nrh, long ncl, long nch)
void free_dmatrix (double **m, long nrl, long nrh, long ncl, long nch)
void free_cmatrix (cplx **m, long nrl, long nrh, long ncl, long nch)
void free_imatrix (int **m, long nrl, long nrh, long ncl, long nch)
void free_submatrix (float **b, long nrl, long nrh, long ncl, long nch)
void free_convert_matrix (float **b, long nrl, long nrh, long ncl, long nch)
void free_f3tensor (float ***t, long nrl, long nrh, long ncl, long nch, long ndl, long ndh)
void gaussj (double **a, int n, double **b, int m)
void gaussj_complex (cplx **a, int n, cplx **b, int m)
float erffc (float x)
float gammp (float a, float x)
void gcf (float *gammcf, float a, float x, float *gln)
void gser (float *gamser, float a, float x, float *gln)
float gammln (float xx)
float gammq (float a, float x)

Variables

int ncom
float* pcom
float * xicom
float (* nrfunc )(float [])
double* pcomd
double * xicomd
double (* nrfuncd )(double [])


Define Documentation

#define AM   (1.0/IM)
 

#define AM   (1.0/IM1)
 

#define CGOLD   0.3819660
 

#define CGOLD   0.3819660
 

#define EPS   3.0e-7
 

#define EPS   3.0e-7
 

#define EPS   1.0e-10
 

#define EPS   1.0e-10
 

#define EPS   1.2e-7
 

#define EPS   1.2e-7
 

#define FPMIN   1.0e-30
 

#define FREEALL   free_nrvector(xi,1,n);free_nrvector(h,1,n);free_nrvector(g,1,n);
 

#define FREEALLD   free_dvector(xi,1,n);free_dvector(h,1,n);free_dvector(g,1,n);
 

#define FREE_ARG   char*
 

#define GLIMIT   100.0
 

#define GLIMIT   100.0
 

#define GOLD   1.618034
 

#define GOLD   1.618034
 

#define IA   16807
 

#define IA1   40014
 

#define IA2   40692
 

#define IM   2147483647
 

#define IM1   2147483563
 

#define IM2   2147483399
 

#define IMM1   (IM1-1)
 

#define IQ   127773
 

#define IQ1   53668
 

#define IQ2   52774
 

#define IR   2836
 

#define IR1   12211
 

#define IR2   3791
 

#define ITMAX   100
 

#define ITMAX   100
 

#define ITMAX   200
 

#define ITMAX   100
 

#define ITMAX   200
 

#define ITMAX   100
 

#define ITMAX   200
 

#define NDIV   (1+(IM-1)/NTAB)
 

#define NDIV   (1+IMM1/NTAB)
 

#define NRANSI
 

#define NRANSI
 

#define NRANSI
 

#define NRANSI
 

#define NRANSI
 

#define NRANSI
 

#define NRANSI
 

#define NRANSI
 

#define NRANSI
 

#define NRANSI
 

#define NRANSI
 

#define NRANSI
 

#define NRANSI
 

#define NR_END   1
 

#define NTAB   32
 

#define NTAB   32
 

#define RNMX   (1.0-EPS)
 

#define RNMX   (1.0-EPS)
 

#define SHFT( a, b, c, d )   (a)=(b);(b)=(c);(c)=(d);
 

#define SHFT( a, b, c, d )   (a)=(b);(b)=(c);(c)=(d);
 

#define SHFT( a, b, c, d )   (a)=(b);(b)=(c);(c)=(d);
 

#define SHFT( a, b, c, d )   (a)=(b);(b)=(c);(c)=(d);
 

#define SWAP( a, b )   {temp=(a);(a)=(b);(b)=temp;}
 

#define SWAP( a, b )   {temp=(a);(a)=(b);(b)=temp;}
 

#define TINY   1.0e-20
 

#define TINY   1.0e-20
 

#define TOL   2.0e-4
 

#define TOL   2.0e-4
 

#define ZEPS   1.0e-10
 

#define ZEPS   1.0e-10
 


Function Documentation

void CrossProduct ( double * Left,
double * Right,
int FirstCoord )
 

double Frequency2Wavelength ( double Frequency )
 

float Gaussian_pdf ( long * idum )
 

double GetDegreeOfPolarization ( double * StokesVector )
 

double GetDistance2Points ( double * PointA,
double * PointB,
int FirstCoord )
 

double GetPhase ( const cplx Phasor )
 

double GetRadiusCircle ( double * PointA,
double * PointB,
double * PointC )
 

double GetVectorLength ( double * Vector,
int Dimension )
 

void Jones2Stokes ( const cplx * Jones,
double * Stokes )
 

void Jones2StokesKeepPower ( const cplx * Jones,
double * Stokes )
 

double Linear2dB ( double LinearValue )
 

double Linear2dB_Limited ( double LinearValue,
double MaxValue_dB )
 

double Linear2dBm ( double LinearPower )
 

void Multiply ( double Left[][3],
double Right[3] )
 

void Multiply ( double Left[][3],
double Right[][3] )
 

int Periodicity ( int ii,
int Periodicity )
 

void RotatesAboutX ( double angle,
cplx * JonesVector )
 

void RotatesAboutX ( double angle,
double * Vector )
 

void RotatesAboutY ( double angle,
cplx * JonesVector )
 

void RotatesAboutY ( double angle,
double * Vector )
 

void RotatesAboutZ ( double angle,
cplx * JonesVector )
 

void RotatesAboutZ ( double angle,
double * Vector )
 

double ScalarProduct ( double * VectorA,
double * VectorB )
 

void Stokes2Jones ( const double * Stokes,
cplx * Jones )
 

void Stokes2JonesKeepPower ( const double * Stokes,
cplx * Jones )
 

void TransRyV3to_YZ ( double * Vector,
double * thetaY )
 

void TransRzRxV3to_Xhat ( double * Vector,
double * thetaZ,
double * thetaX )
 

void TransRzRxV3to_Xhat ( double * Vector,
double * thetaZthetaX )
 

void TransRzRyV3to_Xhat ( double * Vector,
double * thetaZthetaY )
 

double Wavelength2Frequency ( double Wavelength )
 

cplx bessel5 ( double omega,
double omega_0,
double FWHM )
 

float brent ( float ax,
float bx,
float cx,
float(* f)(float),
float tol,
float * xmin )
 

double brentd ( double ax,
double bx,
double cx,
double(* f)(double),
double tol,
double * xmin )
 

cplx ** cmatrix ( long nrl,
long nrh,
long ncl,
long nch )
 

float ** convert_matrix ( float * a,
long nrl,
long nrh,
long ncl,
long nch )
 

int cpujob_mosix ( void )
 

unsigned char * cvector ( long nl,
long nh )
 

double dB2Linear ( double dBvalue )
 

double dBm2Linear ( double dBmPower )
 

double ** dmatrix ( long nrl,
long nrh,
long ncl,
long nch )
 

double * dvector ( long nl,
long nh )
 

void electrical_filter ( cplx * my_power_time,
cfftw * fft,
double fwhm_norm )
 

float erffc ( float x )
 

double f1dim ( double x )
 

float f1dim ( float x )
 

float *** f3tensor ( long nrl,
long nrh,
long ncl,
long nch,
long ndl,
long ndh )
 

void free_cmatrix ( cplx ** m,
long nrl,
long nrh,
long ncl,
long nch )
 

void free_convert_matrix ( float ** b,
long nrl,
long nrh,
long ncl,
long nch )
 

void free_cvector ( unsigned char * v,
long nl,
long nh )
 

void free_dmatrix ( double ** m,
long nrl,
long nrh,
long ncl,
long nch )
 

void free_dvector ( double * v,
long nl,
long nh )
 

void free_f3tensor ( float *** t,
long nrl,
long nrh,
long ncl,
long nch,
long ndl,
long ndh )
 

void free_imatrix ( int ** m,
long nrl,
long nrh,
long ncl,
long nch )
 

void free_ivector ( int * v,
long nl,
long nh )
 

void free_lvector ( unsigned long * v,
long nl,
long nh )
 

void free_matrix ( float ** m,
long nrl,
long nrh,
long ncl,
long nch )
 

void free_nrvector ( float * v,
long nl,
long nh )
 

void free_submatrix ( float ** b,
long nrl,
long nrh,
long ncl,
long nch )
 

void frprmn ( float p[],
int n,
float ftol,
int * iter,
float * fret,
float(* func)(float[]),
void(* dfunc)(float[],float[]) )
 

void frprmnd ( double p[],
int n,
double ftol,
int * iter,
double * fret,
double(* func)(double[]),
void(* dfunc)(double[],double[]) )
 

float gammln ( float xx )
 

float gammp ( float a,
float x )
 

float gammq ( float a,
float x )
 

void gaussian_pdf ( int N,
double stan_dev,
double * vec )
 

void gaussj ( double ** a,
int n,
double ** b,
int m )
 

void gaussj_complex ( cplx ** a,
int n,
cplx ** b,
int m )
 

void gcf ( float * gammcf,
float a,
float x,
float * gln )
 

void gser ( float * gamser,
float a,
float x,
float * gln )
 

int ** imatrix ( long nrl,
long nrh,
long ncl,
long nch )
 

int * ivector ( long nl,
long nh )
 

void linmin ( float p[],
float xi[],
int n,
float * fret,
float(* func)(float[]) )
 

void linmind ( double p[],
double xi[],
int n,
double * fret,
double(* func)(double[]) )
 

int lock_or_unlock_mosix ( int what )
 

unsigned long * lvector ( long nl,
long nh )
 

float ** matrix ( long nrl,
long nrh,
long ncl,
long nch )
 

void mnbrak ( float * ax,
float * bx,
float * cx,
float * fa,
float * fb,
float * fc,
float(* func)(float) )
 

void mnbrakd ( double * ax,
double * bx,
double * cx,
double * fa,
double * fb,
double * fc,
double(* func)(double) )
 

void nrerror ( char error_text[] )
 

float * nrvector ( long nl,
long nh )
 

void optical_filter ( cplx * my_field_time,
cplx * my_field_freq,
cfftw * fft,
double fwhm_norm )
 

double peak_power ( cplx * in,
int N )
 

void powell ( float p[],
float xi[][4],
int n,
float ftol,
int * iter,
float * fret,
float(* func)(float[]) )
 

double pulse_energy ( cplx * in,
int N,
double width )
 

float ran1 ( long * idum )
 

float ranG ( long * idum )
 

int slow_mosix ( void )
 

float ** submatrix ( float ** a,
long oldrl,
long oldrh,
long oldcl,
long oldch,
long newrl,
long newcl )
 


Variable Documentation

int ncom
 

float(* nrfunc)(float[])
 

double(* nrfuncd)(double[])
 

float * pcom
 

double * pcomd
 

float * xicom
 

double * xicomd
 


Generated at Mon Jun 9 20:08:10 2003 for OCS by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000