ladybug_comfort.chart.adaptive module¶
Object for plotting a Adaptive Comfort Chart.
- class ladybug_comfort.chart.adaptive.AdaptiveChart(outdoor_temperature, operative_temperature, air_speed=None, comfort_parameter=None, legend_parameters=None, base_point=Point2D(0.00, 0.00), x_dim=1, y_dim=1, min_prevailing=10, max_prevailing=33, min_operative=14, max_operative=40, use_ip=False)[source]¶
Bases:
object
Adaptive comfort DataCollection object.
- Parameters:
outdoor_temperature –
Either one of the following inputs are acceptable:
A Data Collection of prevailing outdoor temperature values in C. Such a Data Collection must align with the operative_temperature input and bear the PrevailingOutdoorTemperature data type in its header.
A single prevailing outdoor temperature value in C to be used for all of the operative_temperature inputs below.
A Data Collection of actual outdoor temperatures recorded over the entire year. This Data Collection must be continuous and must either be an Hourly Collection or Daily Collection. In the event that the input comfort_parameter has a prevailing_temperature_method of ‘Monthly’, Monthly collections are also acceptable here. Note that, because an annual input is required, this input collection does not have to align with the operative_temperature input.
operative_temperature – Data Collection of operative temperature (To) values in degrees Celsius.
air_speed – A number for the air speed values in m/s. If None, a low air speed of 0.1 m/s wil be used. (Default: None).
comfort_parameter – Optional AdaptiveParameter object to specify parameters under which conditions are considered acceptable. If None, default will assume ASHRAE-55 criteria.
legend_parameters – An optional LegendParameter object to change the display of the AdaptiveChart. (Default: None).
base_point – A Point2D to be used as a starting point to generate the geometry of the plot. (Default: (0, 0)).
x_dim – A number to set the X dimension of each degree of temperature on the chart. (Default: 1).
y_dim – A number to set the Y dimension of each degree of temperature on the chart. (Default: 1). Note that most maximum humidity ratios are around 0.03. (Default: 1500).
min_prevailing – An integer for the minimum prevailing temperature on the chart in degrees. This should be celsius if use_ip is False and fahrenheit if use_ip is True. (Default: 10; suitable for celsius).
max_prevailing – An integer for the maximum prevailing temperature on the chart in degrees. This should be celsius if use_ip is False and fahrenheit if use_ip is True. (Default: 33; suitable for celsius).
min_operative – An integer for the minimum indoor operative temperature on the chart in degrees. This should be celsius if use_ip is False and fahrenheit if use_ip is True. (Default: 14; suitable for celsius).
max_operative – An integer for the maximum indoor operative temperature on the chart in degrees. This should be celsius if use_ip is False and fahrenheit if use_ip is True. (Default: 40; suitable for celsius).
use_ip – Boolean to note whether temperature values should be plotted in Fahrenheit instead of Celsius. (Default: False).
- Properties:
collection
prevailing_outdoor_temperature
operative_temperature
air_speed
comfort_parameter
legend_parameters
base_point
x_dim
y_dim
min_prevailing
max_prevailing
min_operative
max_operative
use_ip
chart_border
prevailing_labels
prevailing_label_points
prevailing_lines
operative_labels
operative_label_points
operative_lines
neutral_temperature
degrees_from_neutral
neutral_polyline
comfort_polygon
is_comfortable
thermal_condition
percent_comfortable
percent_uncomfortable
percent_neutral
percent_hot
percent_cold
title_text
title_location
x_axis_text
x_axis_location
y_axis_text
y_axis_location
data_points
time_matrix
hour_values
colored_mesh
legend
container
- data_mesh(data_collection, legend_parameters=None)[source]¶
Get a colored mesh for a data_collection aligned with the chart’s data.
- Parameters:
data_collection – A data collection that is aligned with the prevailing and operative temperature values of the chart.
legend_parameters – Optional legend parameters to customize the legend and look of the resulting mesh.
- Returns:
A tuple with two values.
mesh: A colored Mesh2D similar to the chart’s colored_mesh property but where each face is colored with the average value of the input data_collection.
container: A GraphicContainer object for the mesh, which possesses a legend that corresponds to the mesh.
- classmethod from_air_and_rad_temp(outdoor_temperature, air_temperature, rad_temperature=None, air_speed=None, comfort_parameter=None, legend_parameters=None, base_point=Point2D(0.00, 0.00), x_dim=1, y_dim=1, min_prevailing=10, max_prevailing=33, min_operative=14, max_operative=40, use_ip=False)[source]¶
Initialize an AdaptiveChart from air and radiant temperature.
- plot_point(prevailing, operative)[source]¶
Get a Point2D for a given prevailing and operative temperature on the chart.
- Parameters:
prevailing – A prevailing temperature value, which should be in Celsius if use_ip is False and Fahrenheit is use_ip is True.
operative – An operative temperature value, which should be in Celsius if use_ip is False and Fahrenheit is use_ip is True.
- to_y_value(temperature)[source]¶
Get the Y-coordinate for a certain operative temperature on the chart.
- Parameters:
temperature – A temperature value, which should be in Celsius if use_ip is False and Fahrenheit is use_ip is True.
- tp_x_value(temperature)[source]¶
Get the X-coordinate for a certain prevailing temperature on the chart.
- Parameters:
temperature – A temperature value, which should be in Celsius if use_ip is False and Fahrenheit is use_ip is True.
- DT_TYPE = Temperature Delta¶
- TEMP_TYPE = Temperature¶
- property air_speed¶
Value for air speed in m/s.
- property base_point¶
Point3D for the base point of this adaptive chart.
- property chart_border¶
Get a Polygon2D for the border of the chart.
- property colored_mesh¶
Get a colored mesh for the number of hours for each part of the chart.
- property comfort_parameter¶
Adaptive comfort parameters that are assigned to this object.
- property comfort_polygon¶
Get a Polygon2D for the comfort range on the chart.
- property container¶
Get the GraphicContainer for the colored mesh.
- property data_points¶
Get a tuple of Point2Ds for each of the temperature values.
- property degrees_from_neutral¶
Data Collection of the degrees from desired neutral temperature in C.
- property hour_values¶
Get a tuple for the number of hours associated with each colored_mesh face.
- property is_comfortable¶
Data Collection of integers noting whether the input conditions are acceptable according to the assigned comfort_parameter.
Values are one of the following: * 0 = uncomfortable * 1 = comfortable
- property legend¶
The legend assigned to this graphic.
- property legend_parameters¶
The legend parameters customizing this adaptive chart.
- property max_operative¶
An integer for the maximum indoor operative temperature on the chart.
Will be in celsius if use_ip is False and fahrenheit if use_ip is True.
- property max_prevailing¶
An integer for the maximum prevailing outdoor temperature on the chart.
Will be in celsius if use_ip is False and fahrenheit if use_ip is True.
- property min_operative¶
An integer for the minimum indoor operative temperature on the chart.
Will be in celsius if use_ip is False and fahrenheit if use_ip is True.
- property min_prevailing¶
An integer for the minimum prevailing outdoor temperature on the chart.
Will be in celsius if use_ip is False and fahrenheit if use_ip is True.
- property neutral_polyline¶
Get a LineSegment2D or Polyline2D noting the neutral temperature on the chart.
- property neutral_temperature¶
Data Collection of the desired neutral temperature in degrees C.
- property operative_label_points¶
Get a tuple of Point2Ds for the operative temperature labels on the chart.
- property operative_labels¶
Get a tuple of text for the operative temperature labels on the chart.
- property operative_lines¶
Get a tuple of LineSegment2Ds for the operative temperature lines.
- property operative_temperature¶
Data Collection of indoor operative temperature.
This will be in in degrees C if use_ip is False and degrees F if use_ip is True.
- property percent_cold¶
The percent of time that the thermal_condition is cold.
- property percent_comfortable¶
The percent of time comfortable given by the assigned comfort_parameter.
- property percent_hot¶
The percent of time that the thermal_condition is hot.
- property percent_neutral¶
The percent of time that the thermal_condition is neutral.
- property percent_uncomfortable¶
The percent of time uncomfortable given by the assigned comfort_parameter.
- property prevailing_label_points¶
Get a tuple of Point2Ds for the prevailing temperature labels on the chart.
- property prevailing_labels¶
Get a tuple of text for the prevailing temperature labels on the chart.
- property prevailing_lines¶
Get a tuple of LineSegment2Ds for the prevailing temperature lines.
- property prevailing_outdoor_temperature¶
Data Collection of prevailing outdoor temperature.
This will be in in degrees C if use_ip is False and degrees F if use_ip is True.
- property thermal_condition¶
Data Collection of integers noting the thermal status of a subject according to the assigned comfort_parameter.
Values are one of the following: * -1 = cold * 0 = neutral * +1 = hot
- property time_matrix¶
Get a tuple of of tuples where each sub-tuple is a row of the mesh.
Each value in the resulting matrix corresponds to the number of prevailing/ operative temperature points in a given cell of the mesh.
- property title_location¶
Get a Point2D for the title of the chart.
- property title_text¶
Get text for the title of the chart.
- property use_ip¶
Boolean for whether temperature should be in Fahrenheit or Celsius.
- property x_axis_location¶
Get a Point2D for the X-axis label of the chart.
- property x_axis_text¶
Get text for the X-axis label of the chart.
- property x_dim¶
The X dimension for each degree of prevailing temperature on the chart.
- property y_axis_location¶
Get a Point2D for the Y-axis label of the chart.
- property y_axis_text¶
Get text for the Y-axis label of the chart.
- property y_dim¶
The Y dimension for each degree of operative temperature on the chart.