def CalcComplex(detector): # Environment depthComplex = utils.LerpArray(detector.constants['depthComplexityX'], \ detector.constants['depthComplexityY'], \ detector.parameters['depth']) vacuumComplex = detector.parameters['pumps'] / 10 if detector.parameters['temperature'] > constants.nitrogenTemp: coolingComplex = 1 - (detector.parameters['temperature'] - constants.nitrogenTemp)/\ (detector.constants['initAmbientTemp'] + detector.constants['tempIncPerKm'] * detector.parameters['depth'] /\ 1000 - constants.nitrogenTemp) else: coolingComplex = 5 # Vibration stagesComplex = detector.parameters['sus_stages'] / 2 massComplex = detector.parameters['mirror_mass'] / 50 # Optics powerComplex = detector.parameters['power'] / 10 materialComplex = detector.parameters['material'].losses roughnessComplex = 1 + (50 - detector.parameters['roughness']) / 500 return (depthComplex + vacuumComplex + coolingComplex + stagesComplex + massComplex + powerComplex + materialComplex + roughnessComplex)
def GetQ(detector): return 1.0 / utils.LerpArray(sapphireLoss_x, sapphireLoss_y, detector.parameters['temperature'])
def GetQ(detector): return 1.0 / utils.LerpArray(crystalLoss_x, crystalLoss_y, detector.parameters['temperature'])