Skip to content

Commit

Permalink
ENH: Allow input of air density for Cp plot
Browse files Browse the repository at this point in the history
  • Loading branch information
cortadocodes committed Jun 7, 2023
1 parent c5d6235 commit fcd722d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
3 changes: 3 additions & 0 deletions dashboard/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ def get_pressure_data_for_time_window(installation_reference, node_id, start_dat
State("installation-select", "value"),
State("node-select", "value"),
State("sensor-coordinates-select", "value"),
State("air-density-input", "value"),
State("u-input", "value"),
State("p-inf-input", "value"),
State("cp-minimum-input", "value"),
Expand All @@ -264,6 +265,7 @@ def plot_cp_graph(
installation_reference,
node_id,
sensor_coordinates_reference,
air_density,
u,
p_inf,
cp_minimum,
Expand Down Expand Up @@ -299,6 +301,7 @@ def plot_cp_graph(
return plot_cp_curve(
df=df,
sensor_coordinates_reference=sensor_coordinates_reference,
air_density=air_density,
u=u,
p_inf=p_inf,
cp_minimum=cp_minimum,
Expand Down
14 changes: 14 additions & 0 deletions dashboard/layouts.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,20 @@ def create_cp_plot_tab_layout(app):
SensorCoordinatesSelect(),
html.Div(
[
html.Div(
[
html.Label("Air density"),
dash_daq.NumericInput(
id="air-density-input",
value=1.225,
min=0,
max=1e9,
size=120,
persistence=True,
),
],
style={"display": "inline-block"},
),
html.Div(
[
html.Label("u"),
Expand Down
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ gunicorn = "^20.1.0"
dash = "^2.4.1"
Flask-Caching = "^2.0.0"
dash-daq = "^0.5.0"
aerosense-tools = {git = "https://github.com/aerosense-ai/aerosense-tools.git", rev = "0.9.1"}
aerosense-tools = {git = "https://github.com/aerosense-ai/aerosense-tools.git", rev = "0.9.2"}

[tool.poetry.dev-dependencies]
coverage = "^6.2"
Expand Down

0 comments on commit fcd722d

Please sign in to comment.