/*Detector parameters: size of image (width=height=det_size), type, */ /* phosphor param file name */ int det_size; char det_type[2]; char phos_name[12]; /*Structure for obliquity correction.*/ struct oblparams { float xbeam; /*X co-ord of beam spot*/ float ybeam; /*Y co-ord of beam spot*/ float wdpix; /*Width of a pixel*/ float hgtpix; /*Height of a pixel*/ float SPDist; /*Source to Phosphor angle*/ float SinAlph; /*Sine of tilt angle*/ float coeff; /*Quadratic coefficient*/ int satn_level; /*Saturation value*/ }; /*Prototypes for Functions*/ void editin(char *,char *,int); /*Input editor*/ void GetObl(char *type,struct oblparams *); /*Obliquity parameter calculation*/ void swizit(char *,int,int); /*Data swizzler*/ void shift(unsigned short *,int); /*Bit shift right*/ void bsub(unsigned short *,unsigned short *,int,int); /*Subtract background*/ int distcorr(unsigned short *,float *,float *,float *,int,int); /*Distortion Correct*/ int obliq(float *,struct oblparams,int); /*Obliquity correct*/ void intenscorr(float *,float *,int,struct oblparams *); /*Intensity correct*/ void shrink(float *,unsigned short *,int,int); /*Shrink back to 2-byte format*/ /*Routines for matrix solution*/ void lubksb(double a[], int, int *, double b[]); void ludcmp(double a[], int, int *, double *, int *); /*Minimum Function*/ #define min(a,b) (((a) < (b)) ? (a) : (b))