Skip to content

Commit

Permalink
NPI-3688 fix SP3 comment update function to not expect optional args
Browse files Browse the repository at this point in the history
  • Loading branch information
treefern committed Jan 30, 2025
1 parent 55b0375 commit caac791
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions gnssanalysis/gn_io/sp3.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,10 @@ def get_sp3_comments(sp3_df: _pd.DataFrame) -> list[str]:


def update_sp3_comments(
sp3_df: _pd.DataFrame, comment_lines: Union[list[str], None], comment_string: Union[str, None], ammend: bool = True
sp3_df: _pd.DataFrame,
comment_lines: Union[list[str], None] = None,
comment_string: Union[str, None] = None,
ammend: bool = True,
) -> None:
"""
Update SP3 comment lines in-place for the SP3 DataFrame provided. By default ammends new lines to
Expand Down Expand Up @@ -1646,13 +1649,14 @@ def trim_to_first_n_epochs(
def sp3_hlm_trans(
a: _pd.DataFrame,
b: _pd.DataFrame,
) -> tuple[_pd.DataFrame, list]:
) -> tuple[_pd.DataFrame, Tuple[_np.ndarray, _np.ndarray]]:
"""
Rotates sp3_b into sp3_a.
:param _pd.DataFrame a: The sp3_a DataFrame.
:param _pd.DataFrame b: The sp3_b DataFrame.
:return tuple[_pd.DataFrame, list]: A tuple containing the updated sp3_b DataFrame and the HLM array with applied computed parameters and residuals.
:return tuple[_pd.DataFrame, Tuple[_np.ndarray, _np.ndarray]]: A tuple containing the updated sp3_b DataFrame and
a nested tuple containing the HLM array with applied computed parameters and residuals. TODO: is it residules first?
"""
hlm = _gn_transform.get_helmert7(pt1=a.EST[["X", "Y", "Z"]].values, pt2=b.EST[["X", "Y", "Z"]].values)
b.iloc[:, :3] = _gn_transform.transform7(xyz_in=b.EST[["X", "Y", "Z"]].values, hlm_params=hlm[0])
Expand Down

0 comments on commit caac791

Please sign in to comment.