def showZButtonDescription(buttonCode): """Get a short description about a button code. showZButtonDescription(buttonCode)->description Parameters ---------- buttonCode : (string) a 3-letter button code Returns ------- description : a shot description about the button code function/analysis type. """ if isZButtonCode(str(buttonCode)): _print_mod( _prettifyText(str(buttonCode), " is a ZEMAX button code", color0='magenta', color1='black')) _print_mod( _prettifyText("Description: ", _Buttons.button_code[str(buttonCode)], color0='blue', color1='black')) else: print("{} is NOT a valid ZEMAX button code.".format(str(buttonCode)))
def showZButtonDescription(buttonCode): """Get a short description about a button code. showZButtonDescription(buttonCode)->description Parameters ---------- buttonCode : (string) a 3-letter button code Returns ------- description : a shot description about the button code function/analysis type. """ if isZButtonCode(str(buttonCode)): _print_mod(_prettifyText(str(buttonCode), " is a ZEMAX button code", color0="magenta", color1="black")) _print_mod(_prettifyText("Description: ", _Buttons.button_code[str(buttonCode)], color0="blue", color1="black")) else: print("{} is NOT a valid ZEMAX button code.".format(str(buttonCode)))
def showZOperandDescription(operand): """Get a short description about an operand. showZOperandDescription(operand)->description args: operand : a valid ZEMAX operand ret: description : a short description of the operand and the type of operand. """ if isZOperand(str(operand),1): _print_mod(_prettifyText(str(operand), " is a Optimization operand", color0='magenta',color1='black')) _print_mod(_prettifyText("Description: ", _Operands.opt_operands[str(operand)], color0='blue',color1='black')) elif isZOperand(str(operand),2): _print_mod(_prettifyText(str(operand), " is a Tolerancing operand", color0='magenta',color1='black')) _print_mod(_prettifyText("Description: ", _Operands.tol_operands[str(operand)], color0='blue',color1='black')) elif isZOperand(str(operand),3): _print_mod(_prettifyText(str(operand), " is a Multi-configuration operand", color0='magenta',color1='black')) _print_mod(_prettifyText("Description: ", _Operands.mco_operands[str(operand)], color0='blue',color1='black')) else: print("{} is a NOT a valid ZEMAX operand.".format(str(operand)))
def showZOperandDescription(operand): """Get a short description about an operand. showZOperandDescription(operand)->description args: operand : a valid ZEMAX operand ret: description : a short description of the operand and the type of operand. """ if isZOperand(str(operand), 1): _print_mod( _prettifyText(str(operand), " is a Optimization operand", color0='magenta', color1='black')) _print_mod( _prettifyText("Description: ", _Operands.opt_operands[str(operand)], color0='blue', color1='black')) elif isZOperand(str(operand), 2): _print_mod( _prettifyText(str(operand), " is a Tolerancing operand", color0='magenta', color1='black')) _print_mod( _prettifyText("Description: ", _Operands.tol_operands[str(operand)], color0='blue', color1='black')) elif isZOperand(str(operand), 3): _print_mod( _prettifyText(str(operand), " is a Multi-configuration operand", color0='magenta', color1='black')) _print_mod( _prettifyText("Description: ", _Operands.mco_operands[str(operand)], color0='blue', color1='black')) else: print("{} is a NOT a valid ZEMAX operand.".format(str(operand)))