

def SetObservatory(self, observatory):
    '\n        Set the observatory. Can either give a dictionary with the latitude and altitude,\n          or give the name of the observatory. Some names are hard-coded in here.\n        '
    if (type(observatory) == str):
        if (observatory.lower() == 'ctio'):
            self.observatory['latitude'] = (- 30.6)
            self.observatory['altitude'] = 2.2
        if (observatory.lower() == 'la silla'):
            self.observatory['latitude'] = (- 29.3)
            self.observatory['altitude'] = 2.4
        if (observatory.lower() == 'paranal'):
            self.observatory['latitude'] = (- 24.6)
            self.observatory['altitude'] = 2.6
        if (observatory.lower() == 'mauna kea'):
            self.observatory['latitude'] = 19.8
            self.observatory['altitude'] = 4.2
        if (observatory.lower() == 'mcdonald'):
            self.observatory['latitude'] = 30.7
            self.observatory['altitude'] = 2.1
    elif (type(observatory) == dict):
        if (('latitude' in observatory.keys()) and ('altitude' in observatory.keys())):
            self.observatory = observatory
        else:
            print('Error! Wrong keys in observatory dictionary! Keys must be')
            print("'latitude' and 'altitude'. Yours are: ", observatory.keys())
            raise KeyError
    else:
        raise ValueError('Error! Unrecognized input to TelluricFitter.SetObservatory()')

dataset/ETHPy150Open kgullikson88/Telluric-Fitter/src/TelluricFitter.py TelluricFitter.SetObservatory/original