Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# | |
# coding=utf8 | |
# Copyright 2013, 2014 Bence Béky | |
# | |
# This file is part of Spotrod. | |
# | |
# Spotrod is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. |
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
# -*- coding: utf-8 -*- | |
from astropy import coordinates as coords | |
from astropy import units as u | |
import astropy.time | |
J2001 = astropy.time.Time('J2001',scale='utc') | |
#<---------------------------"High-level" class--------------------------------> |
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
frame0 frame1 equinox0 equinox1 obstime0 obstime1 dt1 dt2 dt3 OK coord equinox obstime | |
----------- ----------- -------- -------- -------- -------- -------- -------- -------- ---- ----- ------- ------- | |
icrs icrs ... ... ... ... 1.988 4.884 2.843 OK True ... ... | |
icrs icrs ... ... ... J1980.0 1.270 4.175 2.423 OK True ... ... | |
icrs icrs ... J1975.0 ... ... 1.687 7.620 2.961 OK True ... ... | |
icrs icrs ... J1975.0 ... J1980.0 1.708 4.537 2.692 OK True ... ... | |
icrs icrs ... ... J1980.0 ... 1.157 4.182 2.320 OK True ... True | |
icrs icrs ... ... J1980.0 J1980.0 1.152 4.114 2.308 OK True ... True | |
icrs icrs ... J1975.0 J1980.0 ... 1.155 4.131 2.316 OK True ... Tru |
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
# -*- coding: utf-8 -*- | |
# Licensed under a 3-clause BSD style license - see LICENSE.rst | |
""" | |
Tests for the SkyCoord class. Note that there are also SkyCoord tests in | |
test_api_ape5.py | |
""" | |
from __future__ import (absolute_import, division, print_function, | |
unicode_literals) |
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 __future__ import division | |
import numpy as np | |
import Ska.Numpy | |
times = np.arange(0, 86400 * 365, 10) # 10 second sampling for a year | |
vals = np.random.uniform(size=len(times)) | |
on_mask = vals < 0.5 # 50% duty cycle | |
on_vals = vals[on_mask] |
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 numpy | |
import matplotlib | |
import scipy # things like coordinates matching, modeling, convolution use this | |
import astropy | |
from distutils import version | |
# Astropy version 0.3.2 or later, and 0.4.0 for coordinates | |
astropy_version = version.LooseVersion(astropy.__version__) | |
if astropy_version < version.LooseVersion('0.3.2'): | |
print('Error: astropy version 0.3.2 or later is required, you have {0}' |
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
""" | |
Vectorized version of quarter_bin() function. | |
""" | |
import numpy as np | |
def quarter_bin(dates): | |
# print(Time(datetime(2014,1,31)).jyear) | |
# Jan31 = np.modf(Time(datetime(2014,1,31)).jyear)[0] |