This file contains hidden or 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 os | |
import netrc | |
from github import Github | |
from batchpr import Updater | |
DESCRIPTION = """ | |
This is an automated update of the astropy-helpers submodule to {0}. This |
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 hidden or 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 numpy as np | |
import matplotlib.pyplot as plt | |
image = np.arange(100).reshape((10, 10)) | |
subplot = 0 | |
fig = plt.figure(figsize=(16, 8)) | |
for extent in [None, [-5, 5, -5, 5]]: |
This file contains hidden or 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 latest recommended constants | |
from astropy import constants as const | |
# Import constants for a specific Astropy version | |
from astropy.constants import ASTROPYCONST20 as const | |
# Import constants from a specific set | |
from astropy.constants import CODATA2010 as const | |
# In all cases, constants can then be used as e.g. |
This file contains hidden or 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
\datatype=fitshdr | |
| cntr| ctype1| ctype2|naxis1|naxis2| crval1| crval2| crpix1| crpix2| cdelt1| cdelt2| crota2| scale| ra1| dec1| ra2| dec2| ra3| dec3| ra4| dec4| URL| file| | |
| int| char| char| int| int| double| double| double| double| double| double| double| double| double| double| double| double| double| double| double| double| char| char| | |
2392679 RA---SIN DEC--SIN 512 1024 10.411536 41.114164 256.50 512.50 -0.00027778 0.00027778 0.01415 0.90373 10.5057657 40.9719206 10.3173994 40.9718856 10.3168972 41.2563303 10.5060814 41.2563655 http://irsa.ipac.caltech.edu/ibe/data/t |
This file contains hidden or 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
#!/bin/bash -x | |
set -e | |
source activate asv | |
cd astropy-benchmarks | |
git clean -fxd | |
git checkout master | |
git pull origin master | |
taskset -c 0 asv run NEW |
This file contains hidden or 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.wcs.utils import skycoord_to_pixel | |
def linear_offset_celestial_coords(wcs, center): | |
""" | |
Returns a locally linear offset coordinate system. | |
Given a 2-d celestial WCS object and a central coordinate, return a WCS | |
that describes an 'offset' coordinate system, assuming that the | |
coordinates are locally linear (that is, the grid lines of this offset | |
coordinate system are always aligned with the pixel coordinates, and |
This file contains hidden or 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
#!/usr/bin/env python | |
import sys | |
from qtpy.QtCore import QUrl, QTimer | |
from qtpy.QtWebEngineWidgets import QWebEngineView | |
from qtpy.QtWidgets import QApplication, QMainWindow | |
HTML = """ | |
<html> | |
<head> |
This file contains hidden or 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
# TODO: deal properly with zoom | |
import threading | |
import matplotlib.pyplot as plt | |
import cartopy.io.img_tiles as cimgt | |
from PIL import Image | |
This file contains hidden or 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 PyQt5 import QtGui, QtWidgets | |
from matplotlib.figure import Figure | |
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas | |
class MplCanvas(FigureCanvas): | |
def __init__(self, fig): | |
FigureCanvas.__init__(self, fig) | |
self.renderer = None |