From c8e1cb1a29ba822c97f3788dad6888886cafffa0 Mon Sep 17 00:00:00 2001 From: Marco Cammarata Date: Tue, 22 Nov 2016 05:30:48 -0800 Subject: [PATCH] changes (now default parameters are defined in alignment) --- alignment.py | 4 ++-- xanes_analyzeRun.py | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/alignment.py b/alignment.py index 8f713da..df53c77 100644 --- a/alignment.py +++ b/alignment.py @@ -29,7 +29,7 @@ g_fit_default_kw = dict( transy = 0, error_transy = 3, limit_transy = ( -50,50 ), - rotation = 0.01, + rotation = 0.00, error_rotation = 0.005, limit_rotation = (-0.06,0.06), scalex = 1, @@ -38,7 +38,7 @@ g_fit_default_kw = dict( scaley = 1, error_scaley = 0.05, limit_scaley = (0.8,1.2), - shear = 0.01, + shear = 0.00, error_shear = 0.001, limit_shear = (-0.2,0.2), igauss1cen = 512, diff --git a/xanes_analyzeRun.py b/xanes_analyzeRun.py index 77f8e4a..a70a521 100644 --- a/xanes_analyzeRun.py +++ b/xanes_analyzeRun.py @@ -100,6 +100,7 @@ class AnalyzeRun(object): def __init__(self,run,initAlign="auto",swapx=g_swapx,swapy=g_swapy): """ swapx → swap x axis of first spectrometer swapy → swap y axis of first spectrometer + initAlign: use None if you want default transformation parameters """ self.d = readDataset(run) if isinstance(run,str): @@ -119,7 +120,8 @@ class AnalyzeRun(object): if initAlign is None: print("Set to default transform") self.initAlign = self.setDefaultTransform() - #self.initAlign = initAlign + else: + self.initAlign = initAlign def getShot(self,shot=0,calib=None,bkgSub="line",roi=g_roi_height): # read data @@ -261,7 +263,8 @@ class AnalyzeRun(object): alignment.clearCache(); # nedded for multiprocessing can leave bad parameters in the cache def setDefaultTransform( self ): - t = dict( scalex=0.65,rotation=0.0,transx=90, iblur1=4.3,fix_iblur1=False ) + #dict( scalex=0.65,rotation=0.0,transx=90, iblur1=4.3,fix_iblur1=False ) + t = alignment.g_fit_default_kw self.initAlign = t return t