Skip to content

Commit

Permalink
standardize "undefined" vsw_list for further usage
Browse files Browse the repository at this point in the history
  • Loading branch information
jgieseler committed Nov 3, 2023
1 parent 100b6b0 commit 89c4315
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions solarmach/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@ def __init__(self, date, body_list, vsw_list=[], reference_long=None, reference_
elif coord_sys=='Stonyhurst':
self.pos_E = pos_E

# standardize "undefined" vsw_list for further usage:
if type(vsw_list)==type(None) or vsw_list==False:
vsw_list=[]

# make deep copy of vsw_list bc. otherwise it doesn't get reset in a new init:
vsw_list2 = copy.deepcopy(vsw_list)

Expand Down

0 comments on commit 89c4315

Please sign in to comment.