Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
junzis
GitHub Repository: junzis/openap
Path: blob/master/scripts/engine2.py
592 views
1
import pandas as pd
2
import argparse
3
import matplotlib.pyplot as plt
4
5
# parser = argparse.ArgumentParser()
6
# parser.add_argument('--jesd', dest="fin_jesd", required=True,
7
# help="Jet Engine Specification Database")
8
# args = parser.parse_args()
9
#
10
# html = pd.read_html(args.fin_jesd)
11
12
df = pd.read_csv('input/civtfspec.csv', header=None, thousands=',')
13
df.columns = df.iloc[0, :] + df.iloc[1, :].fillna('') + df.iloc[2, :].fillna('')
14
df = df.iloc[4:, :]
15
df.dropna(subset=['Model'], inplace=True)
16
17
df1 = df[pd.notnull(df['Thrust(cruise)[lbf]'])][['Thrust(dry)[lbf]', 'OPR(static)', 'BPR(static)', 'CruiseAltitude[ft]', 'Thrust(cruise)[lbf]']]
18
19
df1.columns = ['thr', 'opr', 'bpr', 'cr_alt', 'cr_thr']
20
21
df1 = df1.dropna()
22
23
plt.scatter(df1['thr'], df1['cr_thr'])
24
plt.show()
25
26