def absolute_to_sky_general(theta, thetaB, chiB):
    theta = np.deg2rad(theta)
    thetaB = np.deg2rad(thetaB)
    chiB = np.deg2rad(chiB)
    cosThetaSky = ((np.cos(theta) * np.cos(thetaB)) + ((np.sin(theta) * np.sin(thetaB)) * np.cos(chiB)))
    sinThetaSky = np.sqrt((1.0 - (cosThetaSky ** 2)))
    thetaSky = np.arccos(cosThetaSky)
    cosChiSky = ((((np.cos(theta) * np.sin(thetaB)) * np.cos(chiB)) - (np.cos(thetaB) * np.sin(theta))) / sinThetaSky)
    sinChiSky = ((np.sin(thetaB) * np.sin(chiB)) / sinThetaSky)
    chiSky_preliminary = np.arccos(cosChiSky)
    if (np.sign(sinChiSky) > 0.0):
        chiSky = chiSky_preliminary
    else:
        chiSky = (- chiSky_preliminary)
    return [np.rad2deg(thetaSky), np.rad2deg(chiSky)]
def absolute_to_sky_general(theta, thetaB, chiB):
    theta = np.deg2rad(theta)
    thetaB = np.deg2rad(thetaB)
    chiB = np.deg2rad(chiB)
    cosThetaSky = ((np.cos(theta) * np.cos(thetaB)) + ((np.sin(theta) * np.sin(thetaB)) * np.cos(chiB)))
    sinThetaSky = np.sqrt((1.0 - (cosThetaSky ** 2)))
    thetaSky = np.arccos(cosThetaSky)
    cosChiSky = ((((np.cos(theta) * np.sin(thetaB)) * np.cos(chiB)) - (np.cos(thetaB) * np.sin(theta))) / sinThetaSky)
    sinChiSky = ((np.sin(thetaB) * np.sin(chiB)) / sinThetaSky)
    chiSky_preliminary = np.arccos(cosChiSky)
    if (np.sign(sinChiSky) > 0.0):
        chiSky = chiSky_preliminary
    else:
        chiSky = (- chiSky_preliminary)
    return [np.rad2deg(thetaSky), np.rad2deg(chiSky)]