Skip to content

Commit

Permalink
Merge pull request heliopython#823 from dstansby/cassini-v2
Browse files Browse the repository at this point in the history
Convert cassini mag to v2 of dataset
  • Loading branch information
dstansby authored Nov 13, 2019
2 parents fd5efca + 2617747 commit cc5c5eb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions heliopy/data/cassini.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def download(self, interval):
local_dir.mkdir(parents=True, exist_ok=True)
year = interval.start.strftime('%Y')
base_url = ('http://pds-ppi.igpp.ucla.edu/ditdos/download?'
'id=pds://PPI/CO-E_SW_J_S-MAG-4-SUMM-1MINAVG-V1.0/DATA')
'id=pds://PPI/CO-E_SW_J_S-MAG-4-SUMM-1MINAVG-V2.0/DATA')
url = '{}/{}'.format(base_url, year)
util._download_remote(url,
self.fname(interval),
Expand Down Expand Up @@ -169,7 +169,7 @@ def mag_hires(starttime, endtime, try_download=True):
Requested data
"""
remote_base_url = ('http://pds-ppi.igpp.ucla.edu/ditdos/download?id='
'pds://PPI/CO-E_SW_J_S-MAG-3-RDR-FULL-RES-V1.0/DATA')
'pds://PPI/CO-E_SW_J_S-MAG-3-RDR-FULL-RES-V2.0/DATA')
dirs = []
fnames = []
extension = '.TAB'
Expand Down
18 changes: 9 additions & 9 deletions heliopy/data/test/test_cassini.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
pytest.mark.data()
cassini = pytest.importorskip("heliopy.data.cassini")

# Server down
'''

@pytest.mark.skip("Cassini tests do not work on CI")
def test_mag_hires():
starttime = datetime(2008, 6, 1, 0, 0, 0)
endtime = datetime(2008, 6, 2, 1, 0, 0)
starttime = datetime(2002, 2, 1)
endtime = datetime(2002, 2, 1, 1)
df = cassini.mag_hires(starttime, endtime)
check_data_output(df)

# Check that a RTN co-ordinate download works too
starttime = datetime(2004, 5, 1)
endtime = datetime(2004, 5, 2)
starttime = datetime(2001, 1, 1)
endtime = datetime(2001, 1, 1, 23)
df = cassini.mag_hires(starttime, endtime)
check_data_output(df)

Expand All @@ -24,11 +24,11 @@ def test_mag_hires():
endtime = datetime(2040, 5, 2)
with pytest.raises(RuntimeError):
df = cassini.mag_hires(starttime, endtime)
'''


@pytest.mark.skip("Cassini tests do not work on CI")
def test_mag_1min():
starttime = datetime(2008, 6, 1, 0, 0, 0)
endtime = datetime(2008, 6, 2, 1, 0, 0)
starttime = datetime(2008, 6, 1)
endtime = datetime(2008, 6, 2, 23)
df = cassini.mag_1min(starttime, endtime, 'KSO')
check_data_output(df)

0 comments on commit cc5c5eb

Please sign in to comment.