-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPI-3688 Improved SP3 content writer tests, test data, header formatting correctness, and comment handling / passthrough options #73
base: main
Are you sure you want to change the base?
Conversation
…ne by line and display diffs of the incorrect lines
…ng at least the minimum number of comment lines are output. Also change minimal comment to fit the spec, which includes an extra space.
…t already set, as this is the version it outputs
…ines without newlines on them, but add these back in just before concatenating header output
…irst header line specification compliant. Update SP3 test data to match the SP3d spec regarding alignment of the Data Used field.
…o make things more general. Added specific wrapper function for SP3 header datetime formatting.
…ed to 6 chars as a way of adding leading whitespace, which was confusing)
…3 checks, to better reflect current implementation state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good and introduces some very handy functionality. Just a couple suggestions for type hints and unittests for new functions. If that is resolved, I think this can go in
def remove_offline_sats(sp3_df: _pd.DataFrame, df_friendly_name: str = ""): | ||
def reflow_string_as_lines_for_comment_block( | ||
comment_string: str, line_length_limit: int = SP3_COMMENT_MAX_LENGTH, comment_line_lead_in: str = SP3_COMMENT_START | ||
) -> list[str]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will need to import List
from typing
(from typing import List
) and use that rather than list
return output_lines | ||
|
||
|
||
def get_sp3_comments(sp3_df: _pd.DataFrame) -> list[str]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above comment
|
||
def update_sp3_comments( | ||
sp3_df: _pd.DataFrame, | ||
comment_lines: Union[list[str], None] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Union[List[str]]
@@ -270,11 +275,71 @@ def mjd2j2000(mjd: _np.ndarray, seconds_frac: _np.ndarray, pea_partials=False) - | |||
return datetime2j2000(datetime) | |||
|
|||
|
|||
def j2000_to_igs_dt(j2000_secs: _np.ndarray) -> _np.ndarray: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably have unittests for this and the other functions as well? (including j2000_to_igs_epoch_row_header_dt
and j2000_to_sp3_head_dt
)
Also: