From 6fab0c83f1af9b35e8443d58e54928dacd0960e5 Mon Sep 17 00:00:00 2001 From: Hanspeter Schaub Date: Fri, 8 Mar 2024 14:53:32 -0700 Subject: [PATCH 1/2] fix matplotlib warning about special character being used The plotting string needed the "r" prefix to treat it as a raw string. --- examples/scenarioDeployingSolarArrays.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/scenarioDeployingSolarArrays.py b/examples/scenarioDeployingSolarArrays.py index 567359c005..b17597f2a3 100644 --- a/examples/scenarioDeployingSolarArrays.py +++ b/examples/scenarioDeployingSolarArrays.py @@ -716,7 +716,7 @@ def run(show_plots): plt.figure(8) plt.clf() plt.plot(timespan, omega_BN_BNorm) - plt.title('Hub Angular Velocity Norm $|{}^\mathcal{B} \omega_{\mathcal{B}/\mathcal{N}}|$', fontsize=16) + plt.title(r'Hub Angular Velocity Norm $|{}^\mathcal{B} \omega_{\mathcal{B}/\mathcal{N}}|$', fontsize=16) plt.ylabel(r'(deg/s)', fontsize=14) plt.xlabel(r'(min)', fontsize=14) plt.grid(True) From 89ae8af7f3b43d39902c071f2f8487a8f907d1c0 Mon Sep 17 00:00:00 2001 From: Hanspeter Schaub Date: Fri, 8 Mar 2024 14:55:04 -0700 Subject: [PATCH 2/2] remove depreciation warning with newest pandas package Pandas is creating warnings about delim_whitespace now being depreciated. This commit applies the recommended correction. --- src/utilities/readAtmTable.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utilities/readAtmTable.py b/src/utilities/readAtmTable.py index 56b557c581..3fd3e53095 100644 --- a/src/utilities/readAtmTable.py +++ b/src/utilities/readAtmTable.py @@ -43,7 +43,7 @@ def readStdAtm76(filename): def readEarthGRAM(filename): - df = pd.read_csv(filename, delim_whitespace = True) + df = pd.read_csv(filename, sep=r'\s+') df.sort_values(by=['Hgtkm'],ascending=True, inplace=True) df.Hgtkm = df.Hgtkm * 1000 altList = df.Hgtkm.to_list() @@ -53,7 +53,7 @@ def readEarthGRAM(filename): return altList, rhoList, tempList def readMarsGRAM(filename): - df = pd.read_csv(filename, delim_whitespace = True) + df = pd.read_csv(filename, sep=r'\s+') df.sort_values(by=['HgtMOLA'],ascending=True, inplace=True) df.HgtMOLA = df.HgtMOLA * 1000 altList = df.HgtMOLA.to_list() @@ -108,7 +108,7 @@ def readJupiterGRAM(filename): def readMSIS(filename): - df = pd.read_csv(filename, skiprows = 29, header=0,delim_whitespace = True, + df = pd.read_csv(filename, skiprows = 29, header=0, sep=r'\s+', names=["alt", "rho", "temp"]) df.sort_values(by=['alt'],ascending=True, inplace=True) df.alt = df.alt * 1000