In this article, we provide examples of using the python module PyFITS for working with FITS data. We first go through a brief
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 sampy import * | |
| import time | |
| import urllib | |
| myhub = SAMPHubProxy() | |
| myhub.connect() | |
| client = SAMPClient(myhub) |
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 | |
| def distance(ra1, dec1, ra2, dec2): | |
| return np.degrees(np.arccos(np.sin(np.radians(dec1)) | |
| * np.sin(np.radians(dec2)) | |
| + np.cos(np.radians(dec1)) | |
| * np.cos(np.radians(dec2)) | |
| * np.cos(np.radians(ra1) - np.radians(ra2)))) | |
| def distance_approx(ra1, dec1, ra2, dec2): |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
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 | |
| # Copyright: This document has been placed in the public domain. | |
| """ | |
| Taylor diagram (Taylor, 2001) implementation. | |
| Note: If you have found these software useful for your research, I would | |
| appreciate an acknowledgment. | |
| """ |
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
| # ~/.ipython/profile_default/startup/10-mystartup.py | |
| import numpy as np | |
| ip = get_ipython() | |
| def import_astropy(self, arg): | |
| ip.ex('import astropy') | |
| ip.ex('print(astropy.__version__)') | |
| ip.ex('from astropy.io import ascii') |