fixing coordinate transformation
This commit is contained in:
@@ -95,7 +95,7 @@ class AppCfg(QSettings):
|
||||
|
||||
dflt=[]
|
||||
if AppCfg.GBL_MISC not in keys:
|
||||
dflt.append((AppCfg.GBL_MISC,{'img_trace_len':4}))
|
||||
dflt.append((AppCfg.GBL_MISC,{'live_on_collect':False,'img_trace_len':8}))
|
||||
if AppCfg.GBL_DEV_PREFIX not in keys:
|
||||
dflt.append((AppCfg.GBL_DEV_PREFIX, ['SAR-EXPMX','SARES30-ESBMX']))
|
||||
if AppCfg.GEO_BEAM_SZ not in keys:
|
||||
@@ -111,14 +111,14 @@ class AppCfg(QSettings):
|
||||
if AppCfg.GEO_CAM_TRF not in keys:
|
||||
dflt.append((AppCfg.GEO_CAM_TRF, np.array(((-1, 0, 0), (0, -1, 0), (0, 0, 1))) ))
|
||||
if AppCfg.GEO_PIX2POS not in keys:
|
||||
# rough data for binning=1,1
|
||||
# rough data
|
||||
z=np.array((1.0, 200.0, 400.0, 600.0, 800.0, 1000.0))
|
||||
t1=np.array(([1, 0.0000], [0.0000, -1])).reshape(1, -1)
|
||||
t2=np.array((0.001214,0.000821,0.000495,0.000299,0.000182,0.000108)).reshape(-1, 1)
|
||||
#t2=np.array((0.001214,0.000821,0.000495,0.000299,0.000182,0.000108)).reshape(-1, 1) # for binning=1,1
|
||||
t2=np.array((0.002413,0.001632,0.000994,0.000594,0.000363,0.000205)).reshape(-1, 1) # for binning=2,2
|
||||
trf=(t1*t2).reshape((-1, 2, 2))
|
||||
lut_pix2pos=(z, trf)
|
||||
dflt.append((AppCfg.GEO_PIX2POS, lut_pix2pos))
|
||||
|
||||
if AppCfg.DT_HOST not in keys:
|
||||
dflt.append((AppCfg.DT_HOST, 'SAR-CPPM-EXPMX1'))
|
||||
if AppCfg.DT_MISC not in keys:
|
||||
@@ -176,6 +176,8 @@ class AppCfg(QSettings):
|
||||
dflt.append((AppCfg.DFT_POS_GONIO, {'pos_mount':(0.,0.,0.,0.),'pos_align':(0.,0.,0.,0.)}))#default positions
|
||||
if AppCfg.DFT_POS_BKLGT not in keys:
|
||||
dflt.append((AppCfg.DFT_POS_BKLGT, {'pos_in': -30000.0, 'pos_out': 1000.0, 'pos_diode': -30000.0}))#default positions
|
||||
if AppCfg.DFT_POS_PST not in keys:
|
||||
dflt.append((AppCfg.DFT_POS_PST, {'x_in_us': 0.0, 'y_in_us': 0.0, 'x_in_ds': 0.0, 'y_in_ds': 0.0, 'x_out_delta': 0.0, 'y_out_delta': 0.0, 'z_in': 0.0, 'z_out': 0.0}))#default positions
|
||||
|
||||
for k,v in dflt:
|
||||
_log.warning(f'{k} not defined. use default')
|
||||
@@ -327,7 +329,8 @@ verbose bits:
|
||||
{'name':'smaract motors', 'value':gbl_dev_prefix[1], 'type':'str'},
|
||||
]},
|
||||
{'name':AppCfg.GBL_MISC, 'title':'miscellaneous', 'type':'group', 'children':[
|
||||
{'name':'img_trace_len', 'value':gbl_misc['img_trace_len'], 'type':'int', 'tip':tip_sync_flag},
|
||||
{'name':'live_on_collect', 'value':gbl_misc['live_on_collect'], 'type':'bool','tip':'live view update during collection (may crash if on)'},
|
||||
{'name':'img_trace_len', 'value':gbl_misc['img_trace_len'], 'type':'int'},
|
||||
#{'name':'verbose', 'value':gbl_misc['verbose'], 'type':'int', 'tip':tip_verbose},
|
||||
]},
|
||||
# {'name':AppCfg.GEO_CAM_TRF, 'value':cfg.value(AppCfg.GEO_CAM_TRF), 'type':'str'},
|
||||
|
||||
Reference in New Issue
Block a user