# Version 1.1 released by Yi-Chuan Lu on February 23, 2023. # Release 1.1 accommodates old Python 2 installations that # interpret some constants as integers instead of reals. # Version 1.0 released by Yi-Chuan Lu on May 18, 2022. # # When using this code, please cite: # # @article{20heatindex, # Title = {Extending the Heat Index}, # Author = {Yi-Chuan Lu and David M. Romps}, # Journal = {Journal of Applied Meteorology and Climatology}, # Year = {2022}, # Volume = {61}, # Number = {10}, # Pages = {1367--1383}, # Year = {2022}, # } # # This headindex function returns the Heat Index in Kelvin. The inputs are: # - T, the temperature in Kelvin # - RH, the relative humidity, which is a value from 0 to 1 # - show_info is an optional logical flag. If true, the function returns the physiological state. exec(open('heatindex.py').read()) error = 1e-8 if (all(list(map(lambda RH, HI: abs(heatindex(200,RH)/HI -1)