changes (now default parameters are defined in alignment)

This commit is contained in:
Marco Cammarata 2016-11-22 05:30:48 -08:00
parent 59a3fa57f4
commit c8e1cb1a29
2 changed files with 7 additions and 4 deletions

View File

@ -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,

View File

@ -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