GNS-Science / simple-toshi-ui

basic react UI for Toshi API - experimental using react-relay
GNU Affero General Public License v3.0
0 stars 1 forks source link

Feature: Workaround for missing MFD data points #337

Open chrisbc opened 2 years ago

chrisbc commented 2 years ago

in https://github.com/GNS-Science/nzshm-opensha/issues/231 @chrisdicaprio describes a problems where our dynamic MFD plots are not matching the PNG versions from opensha.

The example given is http://simple-toshi-ui-test.s3-website-ap-southeast-2.amazonaws.com/InversionSolution/SW52ZXJzaW9uU29sdXRpb246MTAwMzkw

It looks like the problem is missing values in the source data (see comments on above issue). This can be fixed at source (in opensha) but it won't correct anything retrospectively. This ticket provides a simple TUI workaround which works immediatlye and retrospectively....

image

chrisbc commented 2 years ago

Notes from @benjamineac talk...

Context: MFD plots consist or one or more sereis, each series will have centres at regular intervals of 0.1

So we can safely assume: start 5.05 .., end 9.95, fill everything between at 0.1 intervals with default 1e-20

draft algorthm for each MFD series:

API table result....

table: "MFD table" 
columns: [series ID, seriesName, X, Y], 
types: 

rows: [
    “0”, “targetOnFaultSupraSeisMFD”, “5.05”, “1.0E-20"
    “0”, “targetOnFaultSupraSeisMFD”, “5.15”, “1.0E-20"
    “0”, “targetOnFaultSupraSeisMFD”, “5.35”, “1.0E-20"
    “0”, “targetOnFaultSupraSeisMFD”, “5.45”, “1.0E-20"
    “0”, “targetOnFaultSupraSeisMFD”, “5.55”, “1.0E-20"
    “1”, “SeriesB”, “5.45”, “1.0E-20"
    “1”, “SeriesB”, “5.45”, “1.0E-20"
    “1”, “SeriesB”, “5.45”, “1.0E-20"
    “1”, “SeriesB”, “5.45”, “1.0E-20"
]