optimized parameters
This commit is contained in:
@@ -64,6 +64,9 @@ verbose bits:
|
||||
#dx,dz,w,fy -> pb coord. be aware of inverted dx,dz signs
|
||||
from __future__ import print_function
|
||||
#from __future__ import absolute_import,division,generators,nested_scopes,print_function,unicode_literals,with_statement
|
||||
try: raw_input;input=raw_input
|
||||
except NameError: pass
|
||||
|
||||
import os, sys, json,re
|
||||
import numpy as np
|
||||
import matplotlib as mpl
|
||||
@@ -76,8 +79,6 @@ from utilities import *
|
||||
import telnetlib
|
||||
|
||||
sys.path.insert(0,os.path.expanduser('~/Documents/prj/SwissFEL/PBTools/'))
|
||||
#sys.path.insert(0,'/sf/bernina/config/swissmx/zamofing_t')
|
||||
#sys.path.insert(0,'/sf/bernina/config/swissmx/zamofing_t/pbtools/misc/')
|
||||
from pbtools.misc.pp_comm import PPComm
|
||||
from pbtools.misc.gather import Gather
|
||||
from MXMotion import MotionBase
|
||||
@@ -1207,14 +1208,23 @@ close
|
||||
if __name__=='__main__':
|
||||
def run_test(args):
|
||||
mode=args.mode
|
||||
#args.host=None
|
||||
|
||||
if args.host is None or mode in(3,4):
|
||||
if mode in(3,4):
|
||||
comm=gather=None
|
||||
else:
|
||||
comm = PPComm(host=args.host)
|
||||
gather = Gather(comm)
|
||||
gpascii = comm.gpascii
|
||||
import socket
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # create an INET, STREAMing socket
|
||||
s.settimeout(.1)
|
||||
try:
|
||||
port=22 #ssh port
|
||||
s.connect((args.host, port)) # try to connect to port
|
||||
s.close()
|
||||
except (socket.error, socket.gaierror) as e:
|
||||
comm=gather=None
|
||||
else:
|
||||
comm = PPComm(host=args.host)
|
||||
gather = Gather(comm)
|
||||
|
||||
|
||||
|
||||
# direct start
|
||||
#hs=HelicalScan(comm, gather, args.verbose,sync_mode=0,pt2pt_time=20)
|
||||
|
||||
Reference in New Issue
Block a user