def get_full_delta_pal(PTRMS, PTRM_Checks, NRM, y_err, y_mean, b, start, end, y_segment):
    """
    input: PTRMS, PTRM_Checks, NRM, y_err, y_mean, b, start, end, y_segment
    runs full sequence necessary to get delta_pal
    """
    #print "-------"
    #print "calling get_full_delta_pal in lib"
#    return 0
    PTRMS_cart, checks, TRM_1 = get_delta_pal_vectors(PTRMS, PTRM_Checks, NRM)
#    print "PTRMS_Cart", PTRMS_cart
    diffs, C = get_diffs(PTRMS_cart, checks, PTRMS, PTRM_Checks)
#    print "C", C
    TRM_star, x_star = get_TRM_star(C, PTRMS_cart, start, end)
#    print "x_star", x_star
#    print type(x_star)
    b_star = get_b_star(x_star, y_err, y_mean, y_segment)
    delta_pal = get_delta_pal(b, b_star)
    return delta_pal
input: PTRMS, PTRM_Checks, NRM, y_err, y_mean, b, start, end, y_segment
    runs full sequence necessary to get delta_pal