def _parse_iraf_style_section(header_string):
    """
    Parse IRAF/NOAO-style data sections to Python indices.

    :param header_string:
        The IRAF/NOAO-style data section string (e.g., [1:2048,1:4608]).

    :type header_string:
        str
    """

    indices = []
    dimensions = header_string.strip("[] ").split(",")
    for dimension in dimensions:
        start_pixel, end_pixel = map(int, dimension.split(":"))

        # These pixels are inclusively marked.
        start_index, end_index = start_pixel - 1, end_pixel
        indices.append([start_index, end_index])

    # IRAF/NOAO give the image shape the wrong way around
    return indices[::-1]