diff --git a/solarmach/__init__.py b/solarmach/__init__.py index b51fed7..3e378a3 100644 --- a/solarmach/__init__.py +++ b/solarmach/__init__.py @@ -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)