def Convert_Dec_to_Znum(start_dec, end_dec):
    """ Convert declination range to UCAC4 file number range. """
    z_file_constatnt = 180.0/900

    if start_dec < end_dec:
        temp = start_dec
        start_dec = end_dec
        end_dec = start_dec

    if start_dec > +90.0:
        start_dec = +90.0

    if end_dec < -90.0:
        end_dec = -90.0

    start_z = int(-(start_dec-90)/z_file_constatnt) + 1
    end_z = int(-(end_dec-90)/z_file_constatnt)

    return start_z, end_z