def register(files, lcen, outfile, clobber=False):
    """Regrid a list of files to a 2x2deg tile, with 2" pixels

    Parameters
    ----------
    files: List of files to combine
    lcen: Desired longitude of map center
    outfile: Path to output file
    clobber: If True, overwrite existing files

    Regardless of clobber, If the output file exists and is more up to
    date than the input files, nothing happens
    """
    if os.path.exists(outfile) and not clobber:
        logging.info("File exists and clobber=False. Skipping. %s" % outfile)
        return

    if up_to_date(files, outfile):
        logging.info("%s is up to date" % outfile)
        return

    if len(files) == 0:
        logging.info("Input file list empty. Skipping longitude %i" % lcen)
        return

    params = dict(CELESTIAL_TYPE='Galactic',
                  PROJECTION_TYPE='CAR',
                  CENTER_TYPE='MANUAL',
                  CENTER = '%f,0.0' % lcen,
                  PIXEL_SCALE = '2.0',
                  PIXELSCALE_TYPE = 'MANUAL',
                  IMAGE_SIZE = "7200,3600",
                  SUBTRACT_BACK='N',
                  IMAGEOUT_NAME=outfile,
                  WRITE_FILEINFO='Y',
                  WRITE_XML='N',
                  )
    params = ' '.join('-%s %s' % (k, v) for k, v in params.items())
    cmd = 'swarp %s %s' % (' '.join(files), params)
    print cmd
    check_call(cmd.split())
dataset/ETHPy150Open ChrisBeaumont/brut/bubbly/data/register.py/register/original