Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Astropy Time #2691

Merged
merged 218 commits into from Dec 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
218 commits
Select commit Hold shift + click to select a range
96488ce
subclass astropy Time to add strftime and strptime
vn-ki May 1, 2018
5080aad
Return astropy time for strings and utime
vn-ki May 1, 2018
0729839
parse_time: astropy Time and tuple
vn-ki May 2, 2018
9d0863e
parse_time changes
vn-ki May 2, 2018
55b6ec9
parse_time changes: np.array, np.datetime64
vn-ki May 2, 2018
64d5ae6
Support out format and scale in parse_time
vn-ki May 2, 2018
27eb887
Fix time.day_of_year
vn-ki May 4, 2018
bfb3a95
Make requested changes
vn-ki May 6, 2018
81af04c
Introduce format keyword for parse_time
vn-ki May 9, 2018
40f3433
Pass kwargs to Time
vn-ki May 9, 2018
7440ea1
Clean up parse_time
vn-ki May 9, 2018
d1903cf
Write some tests for the new parse_time
vn-ki May 10, 2018
53539bb
Make parse_time support all kinds of tuples
vn-ki May 10, 2018
c9098a0
Fix date and datetime tests
vn-ki May 11, 2018
6ca4b65
Some more tests
vn-ki May 11, 2018
b25d1bb
Tests tests and tests
vn-ki May 11, 2018
5d03ed3
Test for leap second
vn-ki May 11, 2018
695ad06
Fix doc strings of parse_time
vn-ki May 12, 2018
d213079
More doc strings and remove unnecessery imports
vn-ki May 12, 2018
5fc72b0
Add a parse_time example
vn-ki May 12, 2018
572b018
Remove an old comment
vn-ki May 13, 2018
e364a8f
Make the example more sensible
vn-ki May 13, 2018
01ad55b
Add test job for things that have been ported to astropy Time
Cadair May 14, 2018
46c84b4
Format example better
vn-ki May 14, 2018
9f1de89
get that right
Cadair May 14, 2018
c1b8872
Minor example tweaks
vn-ki May 14, 2018
36942f6
Merge branch 'astropy-time' of https://github.com/vn-ki/sunpy into as…
vn-ki May 14, 2018
ecc024c
More example tweaks
vn-ki May 14, 2018
94d3ce9
Fix the whole of TimeRange(?)
vn-ki May 14, 2018
ff0182f
Fix julian
vn-ki May 14, 2018
ab1653f
Make sure we don't accidently pass unwanted keyword arguments to Time
vn-ki May 14, 2018
a313616
Some tweaks to test_time
vn-ki May 14, 2018
f4d7400
Make a relative import absolute
vn-ki May 16, 2018
b698c00
Update parse_time example
vn-ki May 16, 2018
cb760ed
Remove _time_string_parse_format
vn-ki May 16, 2018
4ad6f44
Take only keyword arguments for parse_time
vn-ki May 16, 2018
503dccd
Make a few changes
vn-ki May 17, 2018
1d4b5b2
Fix a doctest failure
vn-ki May 17, 2018
4e93519
docstring changes
vn-ki May 17, 2018
5885639
TimeRange is datetime free!!
vn-ki May 17, 2018
aedc778
Fix a mistake in split
vn-ki May 19, 2018
ae8d102
Add datetime timedelta support for timerange
vn-ki May 19, 2018
a33c228
Merge pull request #2611 from vn-ki/astropy-time
Cadair May 22, 2018
54394fb
Some stylistic fixes
vn-ki May 22, 2018
b9efe0f
Add tests and fix TimeDatetimeDelta.value
vn-ki May 23, 2018
b1795bf
Merge pull request #2638 from vn-ki/timerange-astropy-time
Cadair May 23, 2018
86b7aa0
datetime to Time: coordinates
vn-ki May 25, 2018
5c10f18
Fix one place in mapbase so that tests in coordinates pass
vn-ki May 25, 2018
a2e1085
Fix doctests
vn-ki May 25, 2018
ab21161
Merge remote-tracking branch 'upstream/master' into time
Cadair May 29, 2018
f591964
Merge remote-tracking branch 'upstream/master' into time
Cadair May 30, 2018
a4bab44
Fix attrs
vn-ki May 19, 2018
282bf4e
Continue fixing stuff in net
vn-ki May 19, 2018
6a119a0
Fix stuff inside net.dataretriever
vn-ki May 19, 2018
b40f89a
Fix util/scraper while I'm at it
vn-ki May 19, 2018
1d2e06e
Fixed instr/rhessi (?)
vn-ki May 19, 2018
148f5b1
Let's see how much this commit fixes
vn-ki May 19, 2018
6ebd952
Some more datetime to Time in scraper
vn-ki May 20, 2018
595f3ac
Some more test fixes
vn-ki May 20, 2018
4592221
Various datetime to astropy Time
vn-ki May 22, 2018
9e5f6e1
Fix a syntax error
vn-ki May 22, 2018
5b7d458
Fix tests
vn-ki May 22, 2018
8f48af5
Fix strategies
vn-ki May 25, 2018
616a2ac
Fix noaa.SRSClient
vn-ki May 25, 2018
96172e7
Add an import in net/vso/attrs
vn-ki May 25, 2018
589b18c
Make requested changes
vn-ki May 26, 2018
d6f221f
doctests
vn-ki May 30, 2018
ae5227f
Remove jsoc.Time because vsoTime does the same thing now
vn-ki May 31, 2018
5a723e4
Add leap second tests for vso
vn-ki May 31, 2018
695bc2f
Chenges to jsoc to use Time
vn-ki May 31, 2018
d9dc9b5
Transition physics to astropy Time
vn-ki Jun 1, 2018
8216744
doctests
vn-ki Jun 1, 2018
d5e3e21
Clean up convert input in framattributes
vn-ki Jun 1, 2018
5fabc78
Merge branch 'master' of github.com:sunpy/sunpy into time
nabobalis Jun 1, 2018
0e10a0a
updated circle.yml to fix merge issue
nabobalis Jun 1, 2018
9b18c3d
remove physics from astropy-time test on circle
vn-ki Jun 3, 2018
45558b3
Merge pull request #2648 from vn-ki/patch
Cadair Jun 3, 2018
830766c
Merge remote-tracking branch 'upstream/time' into net-astropy-time
vn-ki Jun 5, 2018
37aad52
Remove a use of datetime and fix tests
vn-ki Jun 5, 2018
4249a77
Make Times test leap seconds too
vn-ki Jun 5, 2018
fc400de
Merge branch 'time' into coordinates-time
vn-ki Jun 6, 2018
b4f42b0
Merge branch 'time' into physics-aptime
vn-ki Jun 6, 2018
9e9c1ed
Merge pull request #2641 from vn-ki/coordinates-time
Cadair Jun 6, 2018
f6e665d
Merge branch 'time' into physics-aptime
Cadair Jun 6, 2018
e0ed6ae
Merge pull request #2647 from vn-ki/physics-aptime
Cadair Jun 6, 2018
0ec5862
Trivial requested changes
vn-ki Jun 8, 2018
94fad86
Timeseries fixes.
vn-ki Jun 8, 2018
51e34f9
Fix a bug in metadata
vn-ki Jun 8, 2018
4c72677
Fix a bug in goes
vn-ki Jun 9, 2018
9846a01
Fix empty dataframe not handling in timeseries
vn-ki Jun 13, 2018
9e8fa8a
Fix up all tests (?)
vn-ki Jun 13, 2018
88c74c9
Merge branch 'time' into net-astropy-time
vn-ki Jun 13, 2018
626a70c
Let's fix the tests!!
vn-ki Jun 13, 2018
f2ff273
Merge pull request #2639 from vn-ki/net-astropy-time
Cadair Jun 13, 2018
3f104c3
Merge branch 'time' into timeserires
vn-ki Jun 13, 2018
9279fc2
Patch up instr/fermi
vn-ki Jun 13, 2018
dc2f055
Disable net in circle for now
vn-ki Jun 15, 2018
420e2c7
doctest fix
vn-ki Jun 19, 2018
5fbcdd2
Tests: datetime to astropy Time
vn-ki Jun 19, 2018
67367cc
Merge branch 'master' of github.com:sunpy/sunpy into HEAD
nabobalis Jun 20, 2018
707f1ae
added temp fix for sample data download to circle
nabobalis Jun 20, 2018
18ddc89
Merge pull request #2662 from nabobalis/time
nabobalis Jun 20, 2018
1fba4d2
Fix database stuff (astropy Time)
vn-ki May 17, 2018
1f58b55
Run online tests too
vn-ki May 18, 2018
c2dffc8
Fix the errors
vn-ki May 18, 2018
4cfe033
Disable net tests for now
vn-ki Jun 14, 2018
2223194
No Time in database
vn-ki Jun 15, 2018
9a13fe1
Fido datetime hack
vn-ki Jun 15, 2018
60aa1fb
Fix doctest failure on circle
vn-ki Jun 15, 2018
04cf32e
Remove useless function
vn-ki Jun 19, 2018
63c3301
update docs
vn-ki Jun 20, 2018
11bc83f
Fix up util scraper tests
vn-ki Jun 20, 2018
4438607
Some small changes
vn-ki Jun 20, 2018
4682687
Seperate circleci online tests
vn-ki Jun 20, 2018
f38857f
Merge pull request #2652 from vn-ki/database
Cadair Jun 20, 2018
9685d47
Merge remote-tracking branch 'upstream/time' into astropytime-util
vn-ki Jun 20, 2018
0b35ccc
util tests on circle
vn-ki Jun 20, 2018
970613b
Merge remote-tracking branch 'upstream/time' into timeserires
vn-ki Jun 20, 2018
652d6bb
Name return type correctly
vn-ki Jun 20, 2018
1c04a30
Most tests pass mysteriously!
vn-ki Jun 22, 2018
2b7cf63
Fix some .format s
vn-ki Jun 22, 2018
5be212f
fix a stupid doctest fail
vn-ki Jun 22, 2018
846deb0
datetime removals
vn-ki Jun 23, 2018
c307622
Merge pull request #2650 from vn-ki/timeserires
Cadair Jun 23, 2018
e2aa8cb
Merge branch 'time' into astropy-time-map
Cadair Jun 23, 2018
758dd0f
update sunpy.time function
vn-ki Jun 23, 2018
e9469a5
Merge branch 'astropy-time-map' of https://github.com/vn-ki/sunpy int…
vn-ki Jun 23, 2018
9dd6db6
roi tests on circle
vn-ki Jun 23, 2018
9785c44
Merge branch 'time' into datetime-removal
vn-ki Jun 23, 2018
a581ffd
Merge branch 'time' into astropytime-util
nabobalis Jun 25, 2018
55a0966
Update docs
vn-ki Jun 25, 2018
b3e6e10
Merge branch 'datetime-removal' of https://github.com/vn-ki/sunpy int…
vn-ki Jun 25, 2018
605adf0
Update circle config
vn-ki Jun 25, 2018
8a60318
DataFrame should not contain Time
vn-ki Jun 25, 2018
fdf58a4
Merge pull request #2664 from vn-ki/astropytime-util
Cadair Jun 27, 2018
677df3a
Merge pull request #2669 from vn-ki/astropy-time-map
Cadair Jun 27, 2018
48fe934
Merge remote-tracking branch 'upstream/master' into time
Cadair Jun 27, 2018
0d0f819
Merge branch 'removalmk2' into time
Cadair Jun 27, 2018
506f4f2
update circle config
vn-ki Jun 27, 2018
8b27338
Primary changes to instr
vn-ki Jun 20, 2018
2e0024f
Merge branch 'time' into datetime-removal
vn-ki Jun 27, 2018
c597001
minute goes and iris fix
vn-ki Jun 27, 2018
daea2eb
instr/goes obstime to Time
vn-ki Jun 27, 2018
35fb1fe
Merge pull request #2670 from vn-ki/datetime-removal
Cadair Jun 27, 2018
92aab3d
Merge branch 'time' into timeserires
Cadair Jun 27, 2018
46a80a0
Some pep8 cleaning in time.py
Cadair Jun 27, 2018
08b43b6
yapf test_goes
vn-ki Jun 27, 2018
0303867
Merge pull request #2675 from Cadair/time
Cadair Jun 27, 2018
0651b19
Merge pull request #2674 from vn-ki/timeserires
Cadair Jun 27, 2018
39e0f8f
instr/lyra Time changes
vn-ki Jun 27, 2018
dbcf533
Update circle config
vn-ki Jun 27, 2018
c327e53
instr/rhessi Time :)
vn-ki Jun 27, 2018
135c874
Conserve precision in goes and lyra timeseries
vn-ki Jun 27, 2018
68cbe49
Merge branch 'time' into astropy-time-instr
vn-ki Jun 27, 2018
eed7850
Requested changes
vn-ki Jun 28, 2018
cb0396a
More docstrings
vn-ki Jun 29, 2018
02b0665
More datetime to Time
vn-ki Jun 29, 2018
2d03a58
Make sure _prep_columns can handle both np.array and Time
vn-ki Jun 29, 2018
96f93b4
instr/lyra things doctest + lytaf Time fix
vn-ki Jun 29, 2018
68f62ab
tests and doctests fixed!!
vn-ki Jun 29, 2018
b816b9b
sun sun sun
vn-ki Jun 29, 2018
a354713
clean up
vn-ki Jun 29, 2018
0b9d0bc
Fix an should-not-happen goes bug and revert TimeDelta to_value on fermi
vn-ki Jun 29, 2018
ff3e2df
It's probably better to use datetime anyway
vn-ki Jun 30, 2018
81e984a
Fix _parse_hdus in rhessi
vn-ki Jun 30, 2018
2551dd3
norh dataframe should not contain Time
vn-ki Jun 30, 2018
bfc2e3d
Get those last two commits correctly
vn-ki Jun 30, 2018
d1523b0
All timeseries except eve are max precision
vn-ki Jul 4, 2018
add84a2
Merge pull request #2676 from vn-ki/astropy-time-instr
Cadair Jul 4, 2018
51db781
Merge branch 'master' of github.com:sunpy/sunpy into time
Cadair Jul 4, 2018
5143953
Merge remote-tracking branch 'upstream/master' into time
Cadair Jul 4, 2018
a38c0a9
datetime to astropy Time: examples
vn-ki Jul 1, 2018
797edbe
jsoc.attrs.Time from __all__
vn-ki Jul 4, 2018
61f38c1
Maybe fix a figure test
vn-ki Jul 4, 2018
5b258e6
Test for met_to_utc
vn-ki Jul 4, 2018
14ac139
More datetime to Time in docs
vn-ki Jul 6, 2018
9af3223
Time.plot_date in examples
vn-ki Jul 11, 2018
1a11e4d
update figure hash
vn-ki Jul 13, 2018
1b5fd15
Merge pull request #2679 from vn-ki/docs
nabobalis Jul 14, 2018
4e4ad00
Less datetime
vn-ki Jul 9, 2018
0804e5c
yapf noaa
vn-ki Jul 9, 2018
a3e8b96
more datetime removals
vn-ki Jul 18, 2018
aec23ef
Merge branch 'master' of github.com:sunpy/sunpy into time
Cadair Jul 19, 2018
04e7eb3
Abolish jsoc Time from sunpy land
vn-ki Jul 19, 2018
33cc2a0
add changelogs
vn-ki Jul 19, 2018
cbf123b
revert circle config
vn-ki Jul 19, 2018
f1ce634
one more changelog
vn-ki Jul 19, 2018
c8b8685
Merge pull request #2694 from vn-ki/changelogs-and-stuff
Cadair Jul 19, 2018
8f5c984
just correct a small error
vn-ki Jul 18, 2018
ed64333
Merge pull request #2692 from vn-ki/datetime-removal-mk2
Cadair Jul 25, 2018
55793e0
Merge branch 'master' of github.com:sunpy/sunpy into time
Cadair Jul 30, 2018
4f266e4
more docs
vn-ki Jul 30, 2018
0405d64
Merge pull request #2705 from vn-ki/docs
nabobalis Aug 11, 2018
4efc2ab
Merge branch 'master' of github.com:sunpy/sunpy into time
Cadair Aug 14, 2018
33d97e2
Merge branch 'master' of github.com:sunpy/sunpy into time
Cadair Sep 10, 2018
132f2dc
post merge test fixes
Cadair Sep 10, 2018
479c6af
Add the astropy dev tests
Cadair Sep 10, 2018
e87d599
comments from @vn-ki
Cadair Sep 10, 2018
7e7539a
Merge remote-tracking branch 'upstream/master' into fixes
vn-ki Oct 11, 2018
3a88f02
request changes: round 1
vn-ki Oct 11, 2018
bb90d40
request changes: round 2
vn-ki Oct 11, 2018
2b8b9b6
Merge pull request #2789 from vn-ki/fixes
Cadair Oct 11, 2018
0e9f691
depracate `julian_day`
vn-ki Oct 11, 2018
dd540fd
Merge pull request #2790 from vn-ki/fixes
Cadair Oct 11, 2018
01675c0
Merged in master.
nabobalis Nov 16, 2018
d8d24dd
doc tests
nabobalis Nov 16, 2018
ba3d457
all bar lyra tests
nabobalis Nov 16, 2018
44a9e49
vectorize some lines
nabobalis Nov 16, 2018
e4f4b35
doc updates
nabobalis Nov 20, 2018
5fed7bc
fix bugs in add_common_docstring
Cadair Nov 21, 2018
710c84b
do some serious auto formatting magic with parse_time
Cadair Nov 21, 2018
0445ba1
tidy up
Cadair Nov 21, 2018
ed30931
Merge pull request #2852 from Cadair/parse_time
nabobalis Nov 22, 2018
af08e2f
Merge branch 'master' into time
Cadair Dec 5, 2018
9760a8e
Remove astropy Time compatibility layer
Cadair Dec 12, 2018
97c1aea
update figure hashes to astropy 3.1
Cadair Dec 12, 2018
282b772
test try for 32bit
nabobalis Dec 12, 2018
e706cab
tidy up ci again
nabobalis Dec 14, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .circleci/config.yml
Expand Up @@ -43,6 +43,9 @@ jobs:
docker:
- image: quay.io/pypa/manylinux1_i686
steps:
- restore_cache:
keys: sample-data-v1

- checkout
- run: *skip-check
- run:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -210,3 +210,5 @@ docs/api/
docs/whatsnew/latest_changelog.txt
# This is incase you run the figure tests
figure_test_images*

tags
nabobalis marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -42,7 +42,7 @@ matrix:
apt:
packages:
- httpie
stage: "Cron jobs"
stage: "Comprehensive jobs"

- name: "NumPy dev (py37-numpydev)"
addons:
Expand Down
2 changes: 1 addition & 1 deletion astropy_helpers
Submodule astropy_helpers updated 58 files
+8 −5 .coveragerc
+57 −14 .travis.yml
+39 −0 CHANGES.rst
+324 −37 README.rst
+8 −3 appveyor.yml
+5 −2 astropy_helpers/commands/build_ext.py
+141 −119 astropy_helpers/commands/build_sphinx.py
+0 −11 astropy_helpers/extern/__init__.py
+0 −1 astropy_helpers/extern/automodapi/__init__.py
+0 −135 astropy_helpers/extern/automodapi/autodoc_enhancements.py
+0 −423 astropy_helpers/extern/automodapi/automodapi.py
+0 −664 astropy_helpers/extern/automodapi/automodsumm.py
+0 −92 astropy_helpers/extern/automodapi/smart_resolver.py
+0 −10 astropy_helpers/extern/automodapi/templates/autosummary_core/base.rst
+0 −65 astropy_helpers/extern/automodapi/templates/autosummary_core/class.rst
+0 −41 astropy_helpers/extern/automodapi/templates/autosummary_core/module.rst
+0 −214 astropy_helpers/extern/automodapi/utils.py
+0 −5 astropy_helpers/extern/numpydoc/__init__.py
+0 −603 astropy_helpers/extern/numpydoc/docscrape.py
+0 −309 astropy_helpers/extern/numpydoc/docscrape_sphinx.py
+0 −271 astropy_helpers/extern/numpydoc/numpydoc.py
+0 −16 astropy_helpers/extern/numpydoc/templates/numpydoc_docstring.rst
+0 −4 astropy_helpers/extern/setup_package.py
+225 −29 astropy_helpers/openmp_helpers.py
+0 −8 astropy_helpers/sphinx/__init__.py
+2 −332 astropy_helpers/sphinx/conf.py
+0 −2 astropy_helpers/sphinx/ext/__init__.py
+0 −82 astropy_helpers/sphinx/ext/changelog_links.py
+0 −56 astropy_helpers/sphinx/ext/doctest.py
+0 −168 astropy_helpers/sphinx/ext/edit_on_github.py
+0 −0 astropy_helpers/sphinx/ext/tests/__init__.py
+0 −22 astropy_helpers/sphinx/ext/tocdepthfix.py
+ astropy_helpers/sphinx/local/python3_local_links.inv
+0 −38 astropy_helpers/sphinx/local/python3_local_links.txt
+0 −10 astropy_helpers/sphinx/setup_package.py
+0 −3 astropy_helpers/sphinx/themes/bootstrap-astropy/globaltoc.html
+0 −96 astropy_helpers/sphinx/themes/bootstrap-astropy/layout.html
+0 −3 astropy_helpers/sphinx/themes/bootstrap-astropy/localtoc.html
+0 −7 astropy_helpers/sphinx/themes/bootstrap-astropy/searchbox.html
+0 −75 astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_linkout.svg
+ astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_linkout_20.png
+ astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_logo.ico
+0 −87 astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_logo.svg
+ astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_logo_32.png
+0 −601 astropy_helpers/sphinx/themes/bootstrap-astropy/static/bootstrap-astropy.css
+0 −63 astropy_helpers/sphinx/themes/bootstrap-astropy/static/copybutton.js
+0 −160 astropy_helpers/sphinx/themes/bootstrap-astropy/static/sidebar.js
+0 −10 astropy_helpers/sphinx/themes/bootstrap-astropy/theme.conf
+0 −13 astropy_helpers/test_helpers.py
+16 −8 astropy_helpers/tests/__init__.py
+4 −6 astropy_helpers/tests/test_ah_bootstrap.py
+39 −3 astropy_helpers/tests/test_openmp_helpers.py
+19 −22 astropy_helpers/tests/test_setup_helpers.py
+42 −68 astropy_helpers/utils.py
+3 −1 astropy_helpers/version_helpers.py
+0 −50 licenses/LICENSE_COPYBUTTON.rst
+0 −94 licenses/LICENSE_NUMPYDOC.rst
+1 −1 setup.py
10 changes: 5 additions & 5 deletions azure-pipelines.yml
Expand Up @@ -14,11 +14,11 @@ jobs:
os: macos
tox: py37-offline

- template: azure-templates.yml
parameters:
name: Windows_36_offline
os: windows
tox: py36-offline
#- template: azure-templates.yml
# parameters:
# name: Windows_36_offline
# os: windows
# tox: py36-offline

- template: azure-templates.yml
parameters:
Expand Down
1 change: 1 addition & 0 deletions changelog/2611.breaking.rst
@@ -0,0 +1 @@
Make ``sunpy.time.parse_time`` return ``astropy.time.Time`` instead of ``datetime.datetime``.
1 change: 1 addition & 0 deletions changelog/2638.breaking.rst
@@ -0,0 +1 @@
The properties and methods of ``sunpy.time.TimeRange`` returns ``astropy.time.Time`` and ``astropy.time.TimeDelta`` instead of ``datetime.datetime`` and ``datetime.timedelta`` respectively.
1 change: 1 addition & 0 deletions changelog/2676.breaking.rst
@@ -0,0 +1 @@
`obstime` keyword param of ``sunpy.instr.goes._goes_lx`` takes a non-scalar ``astropy.time.Time`` object instead of ``np.array``. The precision of times contained in sunpy `timeseries` has been increased to 9 from 6.
1 change: 1 addition & 0 deletions changelog/2679.bugfix.rst
@@ -0,0 +1 @@
``sunpy.instr.fermi.met_to_utc`` now returns the correct utc time which takes into account the leap seconds that have passed.
1 change: 1 addition & 0 deletions changelog/2694.breaking.rst
@@ -0,0 +1 @@
Removed ``sunpy.net.jsoc.attrs.Time`` because it served the same purpose as ``sunpy.net.attrs.Time`` after the switch to ``astropy.time.Time``.
8 changes: 4 additions & 4 deletions docs/code_ref/coordinates.rst
Expand Up @@ -127,10 +127,10 @@ coordinates is::

>>> c = SkyCoord(0*u.arcsec, 0*u.arcsec, frame=frames.Helioprojective, obstime="2017-07-26")
>>> c
<SkyCoord (Helioprojective: obstime=2017-07-26 00:00:00, rsun=695508.0 km, observer=<HeliographicStonyhurst Coordinate for 'earth'>): (Tx, Ty) in arcsec
<SkyCoord (Helioprojective: obstime=2017-07-26T00:00:00.000, rsun=695508.0 km, observer=<HeliographicStonyhurst Coordinate for 'earth'>): (Tx, Ty) in arcsec
(0., 0.)>
>>> c.transform_to(frames.HeliographicCarrington)
<SkyCoord (HeliographicCarrington: obstime=2017-07-26 00:00:00): (lon, lat, radius) in (deg, deg, km)
<SkyCoord (HeliographicCarrington: obstime=2017-07-26T00:00:00.000): (lon, lat, radius) in (deg, deg, km)
(283.99298362, 5.31701821, 695508.00000058)>

It is also possible to transform to any coordinate system implemented in Astropy. This can be used to find the position of the solar limb in AltAz equatorial coordinates::
Expand Down Expand Up @@ -257,14 +257,14 @@ If you want to obtain a un-realized coordinate frame corresponding to a
>>> from sunpy.data.sample import AIA_171_IMAGE # doctest: +REMOTE_DATA
>>> amap = sunpy.map.Map(AIA_171_IMAGE) # doctest: +REMOTE_DATA
>>> amap.observer_coordinate # doctest: +REMOTE_DATA
<SkyCoord (HeliographicStonyhurst: obstime=2011-06-07 06:33:02.770000): (lon, lat, radius) in (deg, deg, m)
<SkyCoord (HeliographicStonyhurst: obstime=2011-06-07T06:33:02.770): (lon, lat, radius) in (deg, deg, m)
(0., 0.048591, 1.51846026e+11)>

which is equivalent to::

>>> from astropy.wcs.utils import wcs_to_celestial_frame # doctest: +REMOTE_DATA
>>> wcs_to_celestial_frame(amap.wcs) # doctest: +REMOTE_DATA
<Helioprojective Frame (obstime=2011-06-07 06:33:02.770000, rsun=696000000.0 m, observer=<HeliographicStonyhurst Coordinate (obstime=2011-06-07 06:33:02.770000): (lon, lat, radius) in (deg, deg, m)
<Helioprojective Frame (obstime=2011-06-07T06:33:02.770, rsun=696000000.0 m, observer=<HeliographicStonyhurst Coordinate (obstime=2011-06-07T06:33:02.770): (lon, lat, radius) in (deg, deg, m)
(0., 0.048591, 1.51846026e+11)>)>


Expand Down
4 changes: 2 additions & 2 deletions docs/code_ref/time.rst
@@ -1,8 +1,8 @@
SunPy time
==========

The time submodule contains helpers for converting strings to Python
`datetime.datetime` objects and handling common operations on these objects. As
The time submodule contains helpers for converting strings to
`astropy.time.Time` objects and handling common operations on these objects. As
well as this a `~sunpy.time.TimeRange` object is provided for representing a
period of time and performing operations on that range.

Expand Down
2 changes: 1 addition & 1 deletion docs/dev_guide/documentation.rst
Expand Up @@ -225,7 +225,7 @@ Example (:class:`sunpy.map.Map`) ::
----------
header : dict
A dictionary representation of the image header
date : datetime
date : `astropy.time.Time`
Image observation time
det : str
Detector name
Expand Down
4 changes: 4 additions & 0 deletions docs/guide/acquiring_data/database.rst
@@ -1,3 +1,7 @@
.. The tests in the module are very fragile to change in ordering of VSO
results. In their current form they are very hard to maintain.
.. doctest-skip-all

.. _database_guide:

--------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/acquiring_data/hek.rst
Expand Up @@ -304,7 +304,7 @@ HEK results and create the corresponding VSO query attributes.

>>> vso_query = hek2vso.translate_results_to_query(result[10:11]) # doctest: +REMOTE_DATA
>>> vso_query[0] # doctest: +REMOTE_DATA
[<Time(datetime.datetime(2011, 8, 9, 7, 22, 44), datetime.datetime(2011, 8, 9, 7, 28, 56), None)>, <Source('SDO')>, <Instrument('AIA')>, <Wavelength(193.0, 193.0, 'Angstrom')>]
[<Time(<Time object: scale='utc' format='isot' value=2011-08-09T07:22:44.000>, <Time object: scale='utc' format='isot' value=2011-08-09T07:28:56.000>, None)>, <Source('SDO')>, <Instrument('AIA')>, <Wavelength(193.0, 193.0, 'Angstrom')>]

This function allows users finer-grained control of VSO queries
generated from HEK results.
Expand Down
28 changes: 14 additions & 14 deletions docs/guide/acquiring_data/jsoc.rst
Expand Up @@ -64,7 +64,7 @@ between January 1st from 00:00 to 01:00, 2014.
We can add email address to the search query with the :mod:`jsoc.Notify` attribute.
Please note you can search without this but right now, you can not add the email address after the search.

>>> res = Fido.search(a.jsoc.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00'), a.jsoc.Series('hmi.v_45s'),
>>> res = Fido.search(a.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00'), a.jsoc.Series('hmi.v_45s'),
... a.jsoc.Notify('sunpy@sunpy.org')) # doctest: +REMOTE_DATA

This returns an `~sunpy.net.fido_factory.UnifiedResponse` object containing
Expand Down Expand Up @@ -108,7 +108,7 @@ variable set to the Fido search, in this case, res::


Now, let's break down the arguments of ``Fido.search`` to understand
better what we've done. The first argument ``a.jsoc.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00')``
better what we've done. The first argument ``a.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00')``
sets the start and end times for the query (any date/time
format understood by SunPy's :ref:`parse_time function <parse-time>`
can be used to specify dates and time). The Time attribute takes UTC time,
Expand All @@ -119,7 +119,7 @@ pass an Astropy Time object, like::

Then, the Time attribute can be passed as::

>>> a.jsoc.Time(astropy.time.Time('2014-01-01T00:00:00', scale='tai'), astropy.time.Time('2014-01-01T01:00:00', scale='tai')) # doctest: +SKIP
>>> a.Time(astropy.time.Time('2014-01-01T00:00:00', scale='tai'), astropy.time.Time('2014-01-01T01:00:00', scale='tai')) # doctest: +SKIP

The second argument::

Expand All @@ -132,7 +132,7 @@ The notion is that a JSOC query has a set of attribute objects, imported as ``a.
that are specified to construct the query.

``a.jsoc.Series()`` is compulsory to be provided in each of the jsoc queries. Apart from this,
at least one PrimeKey must be passed (generally ``a.jsoc.Time()``).
at least one PrimeKey must be passed (generally ``a.Time()``).

The third argument::

Expand All @@ -147,7 +147,7 @@ Other than Time, one other PrimeKey is supported with in-built attribute.
In case of AIA series, ``a.jsoc.Wavelength()`` can be passed as a PrimeKey::

>>> import astropy.units as u
>>> res = Fido.search(a.jsoc.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00'),
>>> res = Fido.search(a.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00'),
... a.jsoc.Notify('sunpy@sunpy.org'),
... a.jsoc.Series('aia.lev1_euv_12s'),
... a.jsoc.Wavelength(304*u.AA)) # doctest: +REMOTE_DATA
Expand All @@ -164,7 +164,7 @@ If 2 or more PrimeKeys need to be passed together::
Also, note that the pre-defined primekeys, Time and Wavelength can also be passed as above, but you need to
specify the exact keyword for it. For e.g. by::

>>> a.jsoc.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00'), a.jsoc.PrimeKey('WAVELNTH', '161') # doctest: +SKIP
>>> a.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00'), a.jsoc.PrimeKey('WAVELNTH', '161') # doctest: +SKIP

If the correct keyword is not specified, or the passed PrimeKey is not supported by the given series, a
meaningful error will be thrown, which will give you the PrimeKeys supported by that series. Hence, by looking
Expand All @@ -186,7 +186,7 @@ object. These default keywords are ``'DATE'``, ``'TELESCOP'``, ``'INSTRUME'``, `
If you want to get a manual set of keywords in the response object, you can pass the set of keywords using
`~sunpy.net.jsoc.attrs.Keys` attribute.

>>> res = Fido.search(a.jsoc.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00'),
>>> res = Fido.search(a.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00'),
... a.jsoc.Series('hmi.v_45s'), a.jsoc.Notify('sunpy@sunpy.org'),
... a.jsoc.Keys(['TELESCOP', 'INSTRUME', 'T_OBS'])) # doctest: +REMOTE_DATA

Expand Down Expand Up @@ -226,7 +226,7 @@ A list of supported segments of a series, say ``hmi.sharp_720s`` can be obtained
Also, if you provide an incorrect segment name, it will throw a meaningful error, specifying which segment values are supported
by the given series::

>>> Fido.search(a.jsoc.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00'),
>>> Fido.search(a.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00'),
... a.jsoc.Series('hmi.sharp_720s'), a.jsoc.Notify('sunpy@sunpy.org'),
... a.jsoc.Segment('image')) # doctest: +REMOTE_DATA
Traceback (most recent call last):
Expand All @@ -236,7 +236,7 @@ by the given series::

To get files for more than 1 segment at the same time, chain ``a.jsoc.Segment()`` using ``AND`` operator::

>>> Fido.search(a.jsoc.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00'),
>>> Fido.search(a.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00'),
... a.jsoc.Series('hmi.sharp_720s'), a.jsoc.Notify('sunpy@sunpy.org'),
... a.jsoc.Segment('continuum') & a.jsoc.Segment('magnetogram')) # doctest: +REMOTE_DATA +ELLIPSIS
<sunpy.net.fido_factory.UnifiedResponse object at ...>
Expand Down Expand Up @@ -278,7 +278,7 @@ using `~sunpy.net.attrs.Sample`. In other words, if you need to query for ``hmi.
between January 1st from 00:00 to 01:00, 2014, every 10 minutes, you can do::

>>> import astropy.units as u
>>> Fido.search(a.jsoc.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00'), a.jsoc.Notify('sunpy@sunpy.org'),
>>> Fido.search(a.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00'), a.jsoc.Notify('sunpy@sunpy.org'),
... a.jsoc.Series('hmi.v_45s'), a.Sample(10*u.min)) # doctest: +REMOTE_DATA +ELLIPSIS
<sunpy.net.fido_factory.UnifiedResponse object at ...>
Results from 1 Provider:
Expand Down Expand Up @@ -307,7 +307,7 @@ Complex queries can be built using ``OR`` operators.

Let's look for 2 different series data at the same time::

>>> Fido.search(a.jsoc.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00'), a.jsoc.Notify('sunpy@sunpy.org'),
>>> Fido.search(a.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00'), a.jsoc.Notify('sunpy@sunpy.org'),
... a.jsoc.Series('hmi.v_45s') | a.jsoc.Series('aia.lev1_euv_12s')) # doctest: +REMOTE_DATA +ELLIPSIS
<sunpy.net.fido_factory.UnifiedResponse object at ...>
Results from 2 Providers:
Expand Down Expand Up @@ -371,8 +371,8 @@ This is the ``OR`` operator. Think of the above query as setting a set
of conditions which get passed to the JSOC. Let's say you want all the
``hmi.v_45s`` data from two separate days::

>>> Fido.search(a.jsoc.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00') |
... a.jsoc.Time('2014-01-02T00:00:00', '2014-01-02T01:00:00'),
>>> Fido.search(a.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00') |
... a.Time('2014-01-02T00:00:00', '2014-01-02T01:00:00'),
... a.jsoc.Series('hmi.v_45s'), a.jsoc.Notify('sunpy@sunpy.org')) # doctest: +REMOTE_DATA +ELLIPSIS
<sunpy.net.fido_factory.UnifiedResponse object at ...>
Results from 2 Providers:
Expand Down Expand Up @@ -476,7 +476,7 @@ We can add an email address to the search query with the :mod:`jsoc.Notify` attr
Please note you can search without this but right now, you can not add the email address after the search::

>>> from sunpy.net import attrs as a
>>> res = client.search(a.jsoc.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00'),
>>> res = client.search(a.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00'),
... a.jsoc.Series('hmi.v_45s'),
... a.jsoc.Notify('sunpy@sunpy.org')) # doctest: +REMOTE_DATA

Expand Down
8 changes: 4 additions & 4 deletions docs/guide/roi.rst
Expand Up @@ -19,9 +19,9 @@ This creates an roi called result for the specific time range. Querying the newl
>>> result
SunPy Region-of-interest (ROI) object
-------------------------------------
Source: LYRA LYTAF
Start time: 2011-02-15T04:34:09
End time: 2011-02-15T04:48:21
Event description: UV occult.
Source: LYRA LYTAF
Start time: 2011-02-15 04:34:09.000
End time: 2011-02-15 04:48:21.000
Event description: UV occult.

Check out the code reference for the time range object for more information.