def phy2pix(header, coords):
    """Transform physical coordinates into pixel coordinates.

    Arguments
    ---------
    header: dict or pyfits.Header
       A header with CRVAL, CDELT and CRPIX keywords.
    coords: list of arrays
       The coordinates stored in an iterable.
       
    Returns
    -------
    out_coords: list of ndarrays
      The coordinates in pixels.
    """
    h = header
    out_coords = list()
    for i, u in enumerate(coords):
        si = str(i + 1)
        out_coords.append((u - h['CRVAL' + si]) / h['CDELT' + si] + h['CRPIX' + si])
    return out_coords