SICS-720 Add autofocussing on Taipan using the following energy relations,
Avfocus = 115 + 2.13 * Ef Mvfocus = 102.2 + 1.78 * Ei Ahfocus = 45.68 - (-105.7) * (0.945) ^ Ef Mhfocus = 184.42 - (60.1) * (0.951) ^ Ei NOTE: Parameters are set via tasub mono/ana VB1/VB2/HB1/HB2/HB3
This commit is contained in:
24
tasublib.c
24
tasublib.c
@@ -40,13 +40,21 @@ double KtoEnergy(double k)
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------*/
|
||||
static double calcCurvature(double B1, double B2, double theta, int ori)
|
||||
static double calcCurvature(double B1, double B2, double B3, double theta, double energy, int ori, int focusfn)
|
||||
{
|
||||
assert(ori == VERT || ori == HOR);
|
||||
if (ori == VERT) {
|
||||
return B1 + B2 / Sind(ABS(theta));
|
||||
if (focusfn == ENERGY_FN) {
|
||||
if (ori == VERT) {
|
||||
return B1 + B2 * energy;
|
||||
} else {
|
||||
return B1 + B2 * pow(B3, energy);
|
||||
}
|
||||
} else {
|
||||
return B1 + B2 * Sind(ABS(theta));
|
||||
if (ori == VERT) {
|
||||
return B1 + B2 / Sind(ABS(theta));
|
||||
} else {
|
||||
return B1 + B2 * Sind(ABS(theta));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,15 +74,15 @@ int maCalcTwoTheta(maCrystal data, double k, double *two_theta)
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
double maCalcVerticalCurvature(maCrystal data, double two_theta)
|
||||
double maCalcVerticalCurvature(maCrystal data, double two_theta, double energy, int focusfn)
|
||||
{
|
||||
return calcCurvature(data.VB1, data.VB2, two_theta / 2., VERT);
|
||||
return calcCurvature(data.VB1, data.VB2, 1, two_theta / 2., energy, VERT, focusfn);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------*/
|
||||
double maCalcHorizontalCurvature(maCrystal data, double two_theta)
|
||||
double maCalcHorizontalCurvature(maCrystal data, double two_theta, double energy, int focusfn)
|
||||
{
|
||||
return calcCurvature(data.HB1, data.HB2, two_theta / 2., HOR);
|
||||
return calcCurvature(data.HB1, data.HB2, data.HB3, two_theta / 2., energy, HOR, focusfn);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user