Skip to content

Commit

Permalink
improve verbose message outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
mperrin committed Mar 28, 2024
1 parent 1756beb commit bbb5029
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion webbpsf/trending.py
Original file line number Diff line number Diff line change
Expand Up @@ -1731,11 +1731,14 @@ def show_wfs_during_program(program, verbose=False, ax = None, ref_wavefront_dat
reference_opd = opds[closest]
ref_label = "WFS near "+ref_wavefront_date
if verbose:
print(f"for date {ref_wavefront_date}, using opd {closest}")
print(f"Computing delta OPDs relative to date {ref_wavefront_date}, using opd {opdtable[closest]['fileName']}")

Check warning on line 1734 in webbpsf/trending.py

View check run for this annotation

Codecov / codecov/patch

webbpsf/trending.py#L1727-L1734

Added lines #L1727 - L1734 were not covered by tests
else:
median_opd = np.median(opd_array, axis=0)
reference_opd = median_opd
ref_label = 'median wavefront'
if verbose:
print("Computing delta OPDs relative to median OPD over that time period.")

Check warning on line 1740 in webbpsf/trending.py

View check run for this annotation

Codecov / codecov/patch

webbpsf/trending.py#L1736-L1740

Added lines #L1736 - L1740 were not covered by tests

delta_opds = opd_array - reference_opd
mask = opd_array.sum(axis=0)!=0
delta_rmses = [webbpsf.utils.rms(d, mask=mask)*1000 for d in delta_opds]

Check warning on line 1744 in webbpsf/trending.py

View check run for this annotation

Codecov / codecov/patch

webbpsf/trending.py#L1742-L1744

Added lines #L1742 - L1744 were not covered by tests
Expand Down

0 comments on commit bbb5029

Please sign in to comment.