bergamaschi 6b34cb8e71 AngularConversion splitted in a static file and in one file dependent on slsDetectorBase
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@240 951219d9-93cf-4727-9268-0efd64621fa3
2012-09-05 10:12:49 +00:00

16 lines
508 B
C

#ifndef DEFAULT_ANGLE_FUNCTION_H
#define DEFAULT_ANGLE_FUNCTION_H
/*
contains the conversion channel-angle for a module channel
conv_r=pitch/radius
*/
#define PI 3.14159265358979323846
#include <math.h>
double defaultAngleFunction(double ichan, double encoder, double totalOffset, double conv_r, double center, double offset, double tilt, int direction) {\
(void) tilt; \
return 180./PI*(center*conv_r+direction*atan((double)(ichan-center)*conv_r))+encoder+totalOffset+offset; };
#endif