models/state.model.ts
Service response for a model
Properties |
hazardResponse |
hazardResponse:
|
Type : HazardCalcResponse
|
The hazard calc response |
model |
model:
|
Type : NshmId
|
The model |
spectra |
spectra:
|
Type : Spectra[]
|
The spectra |
import {
DynamicHazardControlForm,
ResponseSpectra,
} from '@ghsc/nshmp-lib-ng/hazard';
import {ServiceCallInfo} from '@ghsc/nshmp-lib-ng/nshmp';
import {NshmpPlot} from '@ghsc/nshmp-lib-ng/plot';
import {
HazardCalcResponse,
HazardUsageResponse,
} from '@ghsc/nshmp-utils-ts/libs/nshmp-haz/www/hazard-service';
import {NshmMetadata} from '@ghsc/nshmp-utils-ts/libs/nshmp-haz/www/nshm-service';
import {Imt} from '@ghsc/nshmp-utils-ts/libs/nshmp-lib/gmm';
import {SourceType} from '@ghsc/nshmp-utils-ts/libs/nshmp-lib/model';
import {NshmId} from '@ghsc/nshmp-utils-ts/libs/nshmp-lib/nshm';
import {Parameter} from '@ghsc/nshmp-utils-ts/libs/nshmp-ws-utils/metadata';
/**
* Plot ids.
*/
export enum Plots {
HAZARD = 'HAZARD',
HAZARD_COMPONENTS = 'HAZARD_COMPONENTS',
HAZARD_DIFFERENCES = 'HAZARD_DIFFERENCES',
SPECTRUM = 'SPECTRUM',
SPECTRUM_COMPONENTS = 'SPECTRUM_COMPONENTS',
SPECTRUM_DIFFERENCES = 'SPECTRUM_DIFFERENCES',
}
/**
* Development dynamic hazard compare state.
*/
export interface AppState {
/** Available NSHMs */
availableModels: Parameter[];
/** Common usage for selected models */
combinedUsage: HazardUsageResponse;
/** Models that can compare with a selected model */
comparableModels: Parameter[];
/** NSHM service metadata */
nshmServices: NshmMetadata[];
/** The application's plots */
plots: Map<string, NshmpPlot>;
/** Service call info */
serviceCallInfo: ServiceCallInfo;
/** Hazard service responses */
serviceResponses: ServiceResponses;
/** Hazard usage responses */
usageResponses: Map<string, HazardUsageResponse>;
}
/**
* Control panel form.
*/
export interface ControlForm extends DynamicHazardControlForm {
/** IMT */
imt: Imt;
/** NSHM model to compare */
modelCompare: NshmId;
}
/**
* Service response for a model
*/
export interface ServiceResponse {
/** The hazard calc response */
hazardResponse: HazardCalcResponse;
/** The model */
model: NshmId;
/** The spectra */
spectra: Spectra[];
}
/**
* Service responses for both models to compare.
*/
export interface ServiceResponses {
/** First model */
modelA: ServiceResponse;
/** Second model */
modelB: ServiceResponse;
}
/**
* The response spectra for a specific source type.
*/
export interface Spectra {
/** The response spectra */
responseSpectra: ResponseSpectra;
/** The source type */
sourceType: SourceType;
}