This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [1]: from astropy import wcs | |
In [2]: from astropy.io import fits | |
In [3]: hdulist = fits.open('../../../CFHTLS_T06/DEEP/CFHTLS_D-85_u_022559-042940_T0006.fits') | |
In [4]: w = wcs.WCS(hdulist[0].header) | |
In [5]: w.printwcs() | |
WCS Keywords |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [1]: from astropy import wcs | |
In [2]: from astropy.io import fits | |
In [3]: hdulist = fits.open('XMMLSS_00-nd-int.fits') | |
In [4]: w = wcs.WCS(hdulist[0].header) | |
In [5]: w.to_header() | |
Out[5]: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from setuptools import setup, find_packages, Extension | |
version = "0.3.3" | |
setup( | |
name="pyexiv2", | |
version=version, | |
url='http://tilloy.net/dev/pyexiv2/', | |
author='Olivier Tilloy', | |
author_email='[email protected]', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import codecs | |
from fabric.api import local | |
import os | |
DEST_PATH = 'kimsufi:saimon.org' | |
# ROOT_PATH = os.path.abspath(os.path.dirname(__file__)) | |
def clean(): | |
local('rm -r _build') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io | |
from PIL import Image | |
from PIL import TiffImagePlugin | |
im = Image.open('tmp/test/in/1900-1910/00/joey.jpg') | |
exif = im._getexif() | |
data = im.info["exif"] | |
file = io.BytesIO(data[6:]) | |
head = file.read(8) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from astropy.io import fits | |
from astropy.wcs import WCS | |
hdu = fits.open('muse/CoreLib-1.1.12/data/obj/image.fits.gz') | |
header = hdu[0].header | |
print header | |
wcs = WCS(header) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File "/home/simon/lib/virtualenvs/db/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__ | |
return self.wsgi_app(environ, start_response) | |
File "/home/simon/lib/virtualenvs/db/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app | |
response = self.make_response(self.handle_exception(e)) | |
File "/home/simon/lib/virtualenvs/db/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception | |
reraise(exc_type, exc_value, tb) | |
File "/home/simon/lib/virtualenvs/db/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app | |
response = self.full_dispatch_request() | |
File "/home/simon/lib/virtualenvs/db/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyregion | |
from astropy.table import Table | |
from pyregion.parser_helper import Shape | |
def table_to_region(table, outfile, racol='ra', deccol='dec', color='green'): | |
if isinstance(table, (str, unicode)): | |
table = Table.read(table) | |
if isinstance(color, (str, unicode)): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer