lib/models/hazard-control-form.model.ts
Control panel forms for hazard apps
Properties |
| maxDirection |
maxDirection:
|
Type : boolean
|
|
Whether to apply max direction scaling values |
| truncate |
truncate:
|
Type : boolean
|
|
Whether to truncate the hazard values |
import {Imt} from '@ghsc/nshmp-utils-ts/libs/nshmp-lib/gmm';
import {NshmId} from '@ghsc/nshmp-utils-ts/libs/nshmp-lib/nshm';
/**
* Common dynamic hazard control form parameters.
*/
export interface BaseDynamicControlForm extends BaseHazardControlForm {
/** The time-averaged shear-wave velocity (VS) to a depth of 30 meters (in m/s) */
vs30: number;
}
/**
* Common control form parameters
*/
export interface BaseHazardControlForm {
/** Common return period (in years) */
commonReturnPeriods: number;
/** Latitude of site (in degrees) */
latitude: number;
/** Longitude of site (in degrees) */
longitude: number;
/** The NSHM */
model: NshmId;
/** Return periods (in years) */
returnPeriod: number;
/** Site class */
siteClass: string;
}
/**
* Disaggregation application control form parameters.
*/
export interface DisaggControlForm extends BaseDynamicControlForm {
/** Disaggregation component data type */
disaggComponent: string;
/** Service target */
disaggTarget: DisaggTarget;
/** Intensity measure level, for IML target */
iml: number;
/** Intensity measure type */
imt: Imt;
/** Whether to apply max direction scaling values */
maxDirection: boolean;
}
/**
* Dynamic hazard application control form parameters.
*/
export interface DynamicHazardControlForm extends BaseDynamicControlForm, HazardControlForm {
/** Imt */
imt: Imt;
/** Earthquake source type */
sourceType: string;
}
/**
* Disaggregation service target.
*/
export enum DisaggTarget {
IML = 'IML',
RETURN_PERIOD = 'RETURN_PERIOD',
}
/**
* Control panel forms for hazard apps
*/
export interface HazardControlForm extends BaseHazardControlForm {
/** Whether to apply max direction scaling values */
maxDirection: boolean;
/** Whether to truncate the hazard values */
truncate: boolean;
}
/**
* Control panel form ids for hazard apps
*/
export enum HazardFormControlIds {
COMMON_RETURN_PERIODS = 'commonReturnPeriods',
DISAGG_COMPONENT = 'disaggComponent',
DISAGG_TARGET = 'disaggTarget',
IMT = 'imt',
LATITUDE = 'latitude',
LONGITUDE = 'longitude',
MAX_DIRECTION = 'maxDirection',
MODEL = 'model',
RETURN_PERIOD = 'returnPeriod',
SITE_CLASS = 'siteClass',
SOURCE_TYPE = 'sourceType',
TRUNCATE = 'truncate',
VS30 = 'vs30',
}