Skip to content

Commit

Permalink
increase precision of hazard curve and UHS csv files (#467)
Browse files Browse the repository at this point in the history
* increase precision of hazard curve and UHS csv files
* bump version and update changelog
  • Loading branch information
chrisdicaprio authored Jul 19, 2024
1 parent d789429 commit bc8a163
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kororaa",
"version": "1.2.4",
"version": "1.2.5",
"private": true,
"type": "module",
"dependencies": {
Expand Down
6 changes: 6 additions & 0 deletions src/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file.

## [v1.2.5](https://github.com/GNS-Science/kororaa/compare/v1.2.4...v1.2.5) - 2024-07-19

### Changed
- higher floating point precision for csv files of hazard curves and UHS


## [v1.2.4](https://github.com/GNS-Science/kororaa/compare/v1.2.3...v1.2.4) - 2024-07-02

### Changed
Expand Down
2 changes: 1 addition & 1 deletion src/services/spectralAccel/spectralAccel.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const getSpectralCSVData = (
curveCSVData.push(convertAgg(value[0]));
if (value) {
value[1].data.forEach((point) => {
curveCSVData.push(point[1].toFixed(2).toString());
curveCSVData.push(point[1].toPrecision(4).toString());
});
}
csvData.push(curveCSVData);
Expand Down
2 changes: 1 addition & 1 deletion src/views/hazardCharts/hazardPage.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export const getHazardCSVData = (data: HazardChartsPlotsViewQuery$data): string[
const curveCSVData = [latLonArray[0], latLonArray[1], curve?.vs30.toString(), curve?.imt, curve?.agg];
curve?.curve?.values.forEach((value) => {
if (value) {
curveCSVData.push(value.toFixed(6).toString());
curveCSVData.push(value.toPrecision(6).toString());
}
});
return curveCSVData;
Expand Down

0 comments on commit bc8a163

Please sign in to comment.