Skip to content

Commit

Permalink
adopt tests for new SolarMACH() option default_vsw
Browse files Browse the repository at this point in the history
  • Loading branch information
jgieseler committed Jul 31, 2023
1 parent 4f8d3a5 commit d4afcd0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions solarmach/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
body_dict.update(dict.fromkeys(['Rosetta', -226], [-226, 'Rosetta', 'blueviolet']))
body_dict.update(dict.fromkeys(['SOHO', 'soho', 'SoHO', -21], [-21, 'SOHO', 'darkgreen']))
body_dict.update(dict.fromkeys(['Solar Orbiter', 'SolO', 'solo', 'SOLO', 'solarorbiter', 'SolarOrbiter', -144], [-144, 'Solar Orbiter', 'dodgerblue']))
body_dict.update(dict.fromkeys(['STEREO B', 'STEREO-B', 'STB', 'stb', -235], [-235, 'STEREO B', 'b']))
body_dict.update(dict.fromkeys(['STEREO B', 'STEREO-B', 'STB', 'stb', -235], [-235, 'STEREO B', 'blue']))
body_dict.update(dict.fromkeys(['STEREO A', 'STEREO-A', 'STA', 'sta', -234], [-234, 'STEREO A', 'red']))
body_dict.update(dict.fromkeys(['Ulysses', -55], [-55, 'Ulysses', 'dimgray']))
body_dict.update(dict.fromkeys(['Venus', 299], [299, 'Venus', 'darkorchid']))
Expand Down Expand Up @@ -178,7 +178,7 @@ class SolarMACH():
Latitude of referene position at the Sun
"""

def __init__(self, date, body_list, vsw_list=[], default_vsw=400.0, reference_long=None, reference_lat=None, coord_sys='Carrington', **kwargs):
def __init__(self, date, body_list, vsw_list=[], reference_long=None, reference_lat=None, coord_sys='Carrington', default_vsw=400.0, **kwargs):
if 'diff_rot' in kwargs.keys():
self.diff_rot = kwargs['diff_rot']
else:
Expand Down
4 changes: 2 additions & 2 deletions solarmach/tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def test_solarmach_initialize():
reference_long = 273
reference_lat = 9

sm = SolarMACH(date, body_list, vsw_list, reference_long, reference_lat)
sm = SolarMACH(date=date, body_list=body_list, vsw_list=vsw_list, reference_long=reference_long, reference_lat=reference_lat)

assert sm.date == date
assert sm.reference_lat == reference_lat
Expand Down Expand Up @@ -43,7 +43,7 @@ def test_solarmach_plot():
reference_vsw = 400
filename = 'test.png'

sm = SolarMACH(date, body_list, vsw_list, reference_long, reference_lat)
sm = SolarMACH(date=date, body_list=body_list, vsw_list=vsw_list, reference_long=reference_long, reference_lat=reference_lat)
sm.plot(plot_spirals=True, plot_sun_body_line=True,
reference_vsw=reference_vsw, transparent=False,
show_earth_centered_coord=False, numbered_markers=True,
Expand Down

0 comments on commit d4afcd0

Please sign in to comment.