def sky_to_absolute_general(theta, thetaSky, chiSky):
    theta = np.deg2rad(theta)
    thetaSky = np.deg2rad(thetaSky)
    chiSky = np.deg2rad(chiSky)
    cosThetaB = ((np.cos(theta) * np.cos(thetaSky)) - ((np.sin(theta) * np.sin(thetaSky)) * np.cos(chiSky)))
    sinThetaB = np.sqrt((1.0 - (cosThetaB ** 2)))
    thetaB = np.arccos(cosThetaB)
    cosChiB = ((((np.cos(theta) * np.sin(thetaSky)) * np.cos(chiSky)) + (np.cos(thetaSky) * np.sin(theta))) / sinThetaB)
    sinChiB = ((np.sin(thetaSky) * np.sin(chiSky)) / sinThetaB)
    chiB_preliminary = np.arccos(cosChiB)
    if (np.sign(sinChiB) > 0.0):
        chiB = chiB_preliminary
    else:
        chiB = (- chiB_preliminary)
    return [np.rad2deg(thetaB), np.rad2deg(chiB)]
def sky_to_absolute_general(theta, thetaSky, chiSky):
    theta = np.deg2rad(theta)
    thetaSky = np.deg2rad(thetaSky)
    chiSky = np.deg2rad(chiSky)
    cosThetaB = ((np.cos(theta) * np.cos(thetaSky)) - ((np.sin(theta) * np.sin(thetaSky)) * np.cos(chiSky)))
    sinThetaB = np.sqrt((1.0 - (cosThetaB ** 2)))
    thetaB = np.arccos(cosThetaB)
    cosChiB = ((((np.cos(theta) * np.sin(thetaSky)) * np.cos(chiSky)) + (np.cos(thetaSky) * np.sin(theta))) / sinThetaB)
    sinChiB = ((np.sin(thetaSky) * np.sin(chiSky)) / sinThetaB)
    chiB_preliminary = np.arccos(cosChiB)
    if (np.sign(sinChiB) > 0.0):
        chiB = chiB_preliminary
    else:
        chiB = (- chiB_preliminary)
    return [np.rad2deg(thetaB), np.rad2deg(chiB)]