def get_epics_motor_pos(motcode): #gets an epics motor pos with error handling try: current_pos = beamline_support.get_motor_pos(motcode) return current_pos except KeyError: print("No data available for EPICS channel %s\n" % (mcode)) return -9999.9
def get_epics_motor_pos(motcode): #gets an epics motor pos with error handling try: current_pos = beamline_support.get_motor_pos(motcode) return current_pos except KeyError: logger.error("No data available for EPICS channel %s\n" % (mcode)) return -9999.9
def get_epics_motor_pos(motcode): #gets an epics motor pos with error handling try: current_pos = beamline_support.get_motor_pos(motcode) return current_pos except CaChannelException, status: print ca.message(status) print "No data available for EPICS channel %s\n" % (mcode) return -9999.9
def get_mono_energy(): if (daq_utils.has_beamline == 0): return 12398.5 else: mono_mot_code = beamline_support.get_motor_code(beamline_support.motor_code_from_descriptor("monochromator")) return beamline_support.get_motor_pos(mono_mot_code)