From 5a45b2610b0c19b2cdeb2dcae0811bbb2f682f6b Mon Sep 17 00:00:00 2001 From: dahlend Date: Fri, 21 Jun 2024 15:43:00 -0700 Subject: [PATCH] example typos --- src/examples/plot_observability.py | 4 +++- src/examples/plot_phases.py | 8 ++++---- src/examples/plot_uncertainty.py | 7 ++++++- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/examples/plot_observability.py b/src/examples/plot_observability.py index 8453b29..f0f1bf1 100644 --- a/src/examples/plot_observability.py +++ b/src/examples/plot_observability.py @@ -64,7 +64,9 @@ # if we cannot compute mag, set the mag to NAN and keep moving if obj.h_mag is not None: - mag = neospy.flux.hg_apparent_mag(sun2obj, sun2obs, g_phase, obj.h_mag) + mag = neospy.flux.hg_apparent_mag( + sun2obj=sun2obj, sun2obs=sun2obs, h_mag=obj.h_mag, g_param=g_phase + ) mag = np.clip(mag, -1000, 1000) else: mag = np.nan diff --git a/src/examples/plot_phases.py b/src/examples/plot_phases.py index a5d343e..b2c9d00 100644 --- a/src/examples/plot_phases.py +++ b/src/examples/plot_phases.py @@ -39,10 +39,10 @@ obj2earth = sun2earth - sun2obj mags.append( neospy.flux.hg_apparent_mag( - sun2obj, - sun2earth, - neo_subset.h_mag.iloc[i], - neo_subset.g_phase.iloc[i], + sun2obj=sun2obj, + sun2obs=sun2earth, + h_mag=neo_subset.h_mag.iloc[i], + g_param=neo_subset.g_phase.iloc[i], ) ) diff --git a/src/examples/plot_uncertainty.py b/src/examples/plot_uncertainty.py index 53a4c04..3f68070 100644 --- a/src/examples/plot_uncertainty.py +++ b/src/examples/plot_uncertainty.py @@ -51,7 +51,12 @@ for jd in jds: states = neospy.propagate_n_body(states, jd) earth = neospy.SpiceKernels.state("earth", jd) - m = [neospy.flux.hg_apparent_mag(x.pos, earth.pos, g, obj.h_mag) for x in states] + m = [ + neospy.flux.hg_apparent_mag( + sun2obj=x.pos, sun2obs=earth.pos, h_mag=obj.h_mag, g_param=g + ) + for x in states + ] mags.append(m) # Find the step where the median magnitude was the brightest