Skip to content

Commit

Permalink
Pull request #145: fixed relationship between dsf and huestimate
Browse files Browse the repository at this point in the history
Merge in INCORE1/pyincore from bugfix/INCORE1-1123-d_sf-is-not-set-properly-in-population-dislocation to release/0.9.2

* commit '9be4b7cbef3ef7aa56a18fdeb9b05dcc4b25c9d1':
  change version in globals
  change version in setup
  typo in changelog
  changelog and doc version
  fixed relationship between dsf and huestimate
  • Loading branch information
navarroc committed Apr 21, 2021
2 parents 85528b2 + 9be4b7c commit 97fa154
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [0.9.2] - 2021-04-22

### Fixed
- Manual and pyincore-viz links in documentation [INCORE1-1122](https://opensource.ncsa.illinois.edu/jira/browse/INCORE1-1122)
- Relationship between dsf and huestimate variables in Population dislocation analysis [INCORE1-1123](https://opensource.ncsa.illinois.edu/jira/browse/INCORE1-1123)

## [0.9.1] - 2021-04-09
### Added
- Support bridge hurricane damage and calculation from refactored fragility curves [INCORE1-1058](https://opensource.ncsa.illinois.edu/jira/browse/INCORE1-1058)
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
author = ''

# The short X.Y version
version = '0.9.1'
version = '0.9.2'
# The full version, including alpha/beta/rc tags
release = '0.9.1'
release = '0.9.2'


# -- General configuration ---------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,22 +147,23 @@ def get_dislocation(self, seed_i: int, inventory: pd.DataFrame, value_loss: pd.D
# pd.Series to np.array
# creats d_sf column it if it does not exist, overwrites d_sf values if it does
if "huestimate" in inventory.columns:
inventory["d_sf"] = (inventory["huestimate"] > 1).astype(int)
inventory["d_sf"] = (inventory["huestimate"] == 1).astype(int)
elif "huestimate_x" in inventory.columns:
inventory = PopulationDislocationUtil.compare_columns(inventory,
"huestimate_x",
"huestimate_y", True)
if "huestimate_x-huestimate_y" in inventory.columns:
exit("Column huestimate is ambiguous, check the input datasets!")
else:
inventory["d_sf"] = (inventory["huestimate"] > 1).astype(int)
inventory["d_sf"] = (inventory["huestimate"] == 1).astype(int)

# drop d_sf_x, d_sf_y if they exist
if "d_sf_x" in inventory.columns:
inventory = inventory.drop(columns=["d_sf_x"])
if "d_sf_y" in inventory.columns:
inventory = inventory.drop(columns=["d_sf_y"])
dsf = inventory["d_sf"].values
hue = inventory["huestimate"].values.astype(int)
pbd = inventory["pblackbg"].values
phd = inventory["phispbg"].values

Expand Down
2 changes: 1 addition & 1 deletion pyincore/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import os
import shutil

PACKAGE_VERSION = "0.9.1"
PACKAGE_VERSION = "0.9.2"

INCORE_API_PROD_URL = "https://incore.ncsa.illinois.edu"
INCORE_API_DEV_URL = "https://incore-dev.ncsa.illinois.edu"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name='pyincore',
version='0.9.1',
version='0.9.2',
packages=find_packages(where=".", exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
include_package_data=True,
package_data={
Expand Down

0 comments on commit 97fa154

Please sign in to comment.