mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-09 14:20:03 +02:00
Default angle function separated from usersFunctions
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@239 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
26b4b8a2a7
commit
ca75754b83
12
slsDetectorSoftware/usersFunctions/angleFunction.h
Normal file
12
slsDetectorSoftware/usersFunctions/angleFunction.h
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
/*
|
||||
contains the conversion channel-angle for a module channel
|
||||
conv_r=pitch/radius
|
||||
*/
|
||||
|
||||
|
||||
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;\
|
||||
};
|
@ -99,11 +99,6 @@ int caput(chid ch_id, double value) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@ -111,27 +106,6 @@ int caput(chid ch_id, double value) {
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
contains the conversion channel-angle for a module channel
|
||||
conv_r=pitch/radius
|
||||
*/
|
||||
|
||||
|
||||
double defaultAngleFunction(double ichan, double encoder, double totalOffset, double conv_r, double center, double offset, double tilt, int direction) {
|
||||
|
||||
|
||||
(void) tilt; /* to avoid warning: unused parameter */
|
||||
double ang;
|
||||
|
||||
ang=180./PI*(center*conv_r+direction*atan((double)(ichan-center)*conv_r))+encoder+totalOffset+offset;
|
||||
|
||||
|
||||
|
||||
return ang;
|
||||
|
||||
}
|
||||
|
||||
/* reads the encoder and returns the position */
|
||||
|
||||
double defaultGetPosition(void *d) {
|
||||
|
@ -14,6 +14,7 @@ Functions depending on the experimental setup should be defined here
|
||||
#include <epicsEvent.h>
|
||||
#endif
|
||||
#include "detectorData.h"
|
||||
#include "angleFunction.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user