From 80903d9d2fc9c4ee2309eb88c9352c1320af69f4 Mon Sep 17 00:00:00 2001 From: christopher Date: Mon, 5 Nov 2018 11:39:11 -0500 Subject: [PATCH 1/3] add fit2d calibration function --- 999-load.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/999-load.py b/999-load.py index 7c58236..d9bfe6d 100644 --- a/999-load.py +++ b/999-load.py @@ -1 +1,13 @@ from xpdan.startup.analysis import start_analysis +from pyFAI.geometry import Geometry +from xpdtools.calib import _save_calib_param +from xpdan.pipelines.pipeline_utils import _timestampstr +import time + +def calib_from_fit2d(directDist, centerX, centerY, + tilt=0.0, tiltPlanRotation=0.0, + pixelX=200, pixelY=200, splineFile=None): + g = Geometry(directDist, centerX, centerY, tilt, tiltPlanRotation, + pixelX, pixelY, splineFile)) + _save_calib_param(g, _timestampstr(time.time()), + os.path.join(glbl_dict['config_base'], glbl_dict['calib_config_name'])) From ab7ab03e460d09f64245953068483da3a96ceb5c Mon Sep 17 00:00:00 2001 From: christopher Date: Mon, 5 Nov 2018 14:19:25 -0500 Subject: [PATCH 2/3] use setFit2D --- 999-load.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/999-load.py b/999-load.py index d9bfe6d..4597913 100644 --- a/999-load.py +++ b/999-load.py @@ -7,7 +7,8 @@ def calib_from_fit2d(directDist, centerX, centerY, tilt=0.0, tiltPlanRotation=0.0, pixelX=200, pixelY=200, splineFile=None): - g = Geometry(directDist, centerX, centerY, tilt, tiltPlanRotation, + g = Geometry() + g = g.setFit2D(directDist, centerX, centerY, tilt, tiltPlanRotation, pixelX, pixelY, splineFile)) _save_calib_param(g, _timestampstr(time.time()), os.path.join(glbl_dict['config_base'], glbl_dict['calib_config_name'])) From c5c02fe4a88548d315077eec8623041f7b916e61 Mon Sep 17 00:00:00 2001 From: christopher Date: Mon, 5 Nov 2018 14:58:44 -0500 Subject: [PATCH 3/3] extra ) --- 999-load.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/999-load.py b/999-load.py index 4597913..23a5271 100644 --- a/999-load.py +++ b/999-load.py @@ -9,6 +9,6 @@ def calib_from_fit2d(directDist, centerX, centerY, pixelX=200, pixelY=200, splineFile=None): g = Geometry() g = g.setFit2D(directDist, centerX, centerY, tilt, tiltPlanRotation, - pixelX, pixelY, splineFile)) + pixelX, pixelY, splineFile) _save_calib_param(g, _timestampstr(time.time()), os.path.join(glbl_dict['config_base'], glbl_dict['calib_config_name']))