Skip to content

Instantly share code, notes, and snippets.

@celoyd
Created July 11, 2016 05:25
Show Gist options
  • Save celoyd/41394b771c6696ab048f4365c9155f5a to your computer and use it in GitHub Desktop.
Save celoyd/41394b771c6696ab048f4365c9155f5a to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
from astropy.io import fits
from sys import argv
from reproject import reproject_interp
fixed = fits.open(argv[1])[0]
loose = fits.open(argv[2])[0]
array, footprint = reproject_interp(loose, fixed.header, order='bilinear')
fits.writeto(argv[3], array, fixed.header, clobber=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment