diff --git a/package.json b/package.json index 89f4cb5..234f6b2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kororaa", - "version": "1.2.4", + "version": "1.2.5", "private": true, "type": "module", "dependencies": { diff --git a/src/CHANGELOG.md b/src/CHANGELOG.md index dbeb759..2d6990e 100644 --- a/src/CHANGELOG.md +++ b/src/CHANGELOG.md @@ -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 diff --git a/src/services/spectralAccel/spectralAccel.service.ts b/src/services/spectralAccel/spectralAccel.service.ts index 2398042..58b92f3 100644 --- a/src/services/spectralAccel/spectralAccel.service.ts +++ b/src/services/spectralAccel/spectralAccel.service.ts @@ -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); diff --git a/src/views/hazardCharts/hazardPage.service.ts b/src/views/hazardCharts/hazardPage.service.ts index ebf5813..38debf9 100644 --- a/src/views/hazardCharts/hazardPage.service.ts +++ b/src/views/hazardCharts/hazardPage.service.ts @@ -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;