Skip to content

Commit

Permalink
Fixed an issue where initializing pfss_table would result in an error…
Browse files Browse the repository at this point in the history
… if reference_lon and lat were given
  • Loading branch information
Christian-Palmroos committed Aug 10, 2023
1 parent 8b9a390 commit fd5fbf5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions solarmach/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,14 +320,10 @@ def __init__(self, date, body_list, vsw_list=[], reference_long=None, reference_
self.coord_table['Longitudinal separation between body and reference_long'] = longsep_list
self.coord_table[
"Longitudinal separation between body's mangetic footpoint and reference_long"] = footp_longsep_list
lon_sep_to_E = self.pos_E.lon.value - self.reference_long if self.pos_E.lon.value - self.reference_long < 180 else self.pos_E.lon.value - self.reference_long - 360
self.pfss_table.loc[len(self.pfss_table.index)] = ["Reference Point", self.reference_long, self.reference_lat, 1,
lon_sep_to_E, np.NaN, np.NaN]
self.pfss_table.loc[len(self.pfss_table.index)] = ["Reference Point", self.reference_long, self.reference_lat, 1, np.NaN]
if self.reference_lat is not None:
self.coord_table['Latitudinal separation between body and reference_lat'] = latsep_list
self.pfss_table.loc[self.pfss_table["Spacecraft/Body"]=="Reference Point", f"{coord_sys} latitude (°)"] = self.reference_lat
lat_sep_to_E = self.pos_E.lat.value - self.reference_lat
self.pfss_table.loc[self.pfss_table["Spacecraft/Body"]=="Reference_point", "Latitudinal separation to Earth's latitude"] = lat_sep_to_E

# Does this still have a use?
pass
Expand Down

0 comments on commit fd5fbf5

Please sign in to comment.