diff --git a/dashboard/callbacks.py b/dashboard/callbacks.py index d4558f9..fc00ea8 100644 --- a/dashboard/callbacks.py +++ b/dashboard/callbacks.py @@ -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"), @@ -264,6 +265,7 @@ def plot_cp_graph( installation_reference, node_id, sensor_coordinates_reference, + air_density, u, p_inf, cp_minimum, @@ -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, diff --git a/dashboard/layouts.py b/dashboard/layouts.py index a351a9e..a0323a5 100644 --- a/dashboard/layouts.py +++ b/dashboard/layouts.py @@ -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"), diff --git a/poetry.lock b/poetry.lock index bdefb02..ea86e66 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,7 +2,7 @@ [[package]] name = "aerosense-tools" -version = "0.9.1" +version = "0.9.2" description = "Functions for working with aerosense data, useful in building dashboards, analysis notebooks and digital twin services" category = "main" optional = false @@ -21,8 +21,8 @@ docs = [] [package.source] type = "git" url = "https://github.com/aerosense-ai/aerosense-tools.git" -reference = "0.9.1" -resolved_reference = "4967bb4b90d8d3d0378f9516e76ed95ecce12a90" +reference = "0.9.2" +resolved_reference = "21ff319324777c8380b5a04e4184dc3e2a85b7bb" [[package]] name = "alabaster" @@ -2508,4 +2508,4 @@ docs = ["Sphinx", "sphinx-charts", "sphinx-math-dollar", "sphinx-rtd-theme", "sp [metadata] lock-version = "2.0" python-versions = ">=3.8,<3.11" -content-hash = "b360c2c18201bce018b94ddc956e06953a0ebb4d4d016e58f3e99f57608ceef5" +content-hash = "37c3efc794b2a24e7e390258db9625d49e33d770b20ccc50f5a2d13752aab1f2" diff --git a/pyproject.toml b/pyproject.toml index 17b9c37..d548c4d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"