Pre-Processing Settings
- class HvsrPreProcessingSettings(hvsrpy_version='2.2.0rc1', orient_to_degrees_from_north=0.0, filter_corner_frequencies_in_hz=[None, None], window_length_in_seconds=60.0, detrend='linear', ignore_dissimilar_time_step_warning=False, preprocessing_method='hvsr')
- __init__(hvsrpy_version='2.2.0rc1', orient_to_degrees_from_north=0.0, filter_corner_frequencies_in_hz=[None, None], window_length_in_seconds=60.0, detrend='linear', ignore_dissimilar_time_step_warning=False, preprocessing_method='hvsr')
Initialize
HvsrPreProcessingSettingsobject.- Parameters:
hvsrpy_version (str) – Denotes the version of
hvsrpyused to create theSettingsobject. Should not be changed.orient_to_degrees_from_north (float, optional) – New sensor orientation in degrees from north (clockwise positive). The sensor’s north component will be oriented such that it is aligned with the defined orientation.
filter_corner_frequencies_in_hz (list of float or None, optional) – Butterworth filter’s corner frequencies in Hz.
Nonecan be used to specify a one-sided filter. For example a high pass filter at 3 Hz would be specified as[3, None]. Default is[None, None]indicating no filtering will be performed.window_length_in_seconds (float or None, optional) – Duration length of each split, default is
60.indicating all records will be split into 60-second windows. UseNoneto skip splitting records into windows during pre-processing.detrend ({“linear”, “constant”, “none”}, optional) – Type of detrending. If
detrend == "linear"(default), the result of a linear least-squares fit to data is subtracted from data. Ifdetrend == "constant", only the mean of data is subtracted. Ifdetrend == "none", no detrend is performed. Detrend is done on a window-by-window basis.ignore_dissimilar_time_step_warning (bool, optional) – If
Truea warning will not be raised if records have different time steps, default isFalse(i.e., a warning will be raised).preprocessing_method (str, optional) – Defines pre-processing for later reference, default is
'hvsr'. Should not be changed.
- Returns:
HvsrPreProcessingSettings – Object contains all user-defined settings to control preprocessing of microtremor or earthquake recordings in preparation for HVSR processing.
- property attr_dict
Dictionary of
Settingsobject’s attributes.
- load(fname)
Load
Settingsobject from file on disk.- Parameters:
fname (str) – Name of file from which the
Settingsobject information will be loaded. Can be a relative or the full path.- Returns:
None – Updates
Settingsobject from information stored in a file on disk.
- psummary()
Pretty summary of information in
Settingsobject.
- save(fname)
Save
Settingsobject to file on disk.- Parameters:
fname (str) – Name of file to which the
Settingsobject will be saved. Can be a relative or the full path.- Returns:
None – Instead saves
Settingsobject information to file on disk.
- class PsdPreProcessingSettings(hvsrpy_version='2.2.0rc1', orient_to_degrees_from_north=0.0, filter_corner_frequencies_in_hz=[None, None], window_length_in_seconds=60.0, detrend='linear', ignore_dissimilar_time_step_warning=False, window_type_and_width=['tukey', 0.1], fft_settings=None, instrument_transfer_function=None, differentiate=False, preprocessing_method='psd')
- __init__(hvsrpy_version='2.2.0rc1', orient_to_degrees_from_north=0.0, filter_corner_frequencies_in_hz=[None, None], window_length_in_seconds=60.0, detrend='linear', ignore_dissimilar_time_step_warning=False, window_type_and_width=['tukey', 0.1], fft_settings=None, instrument_transfer_function=None, differentiate=False, preprocessing_method='psd')
Initialize
PsdPreProcessingSettingsobject.- Parameters:
hvsrpy_version (str) – Denotes the version of
hvsrpyused to create theSettingsobject. Should not be changed.orient_to_degrees_from_north (float, optional) – New sensor orientation in degrees from north (clockwise positive). The sensor’s north component will be oriented such that it is aligned with the defined orientation.
filter_corner_frequencies_in_hz (list of float or None, optional) – Butterworth filter’s corner frequencies in Hz.
Nonecan be used to specify a one-sided filter. For example a high pass filter at 3 Hz would be specified as[3, None]. Default is[None, None]indicating no filtering will be performed.window_length_in_seconds (float or None, optional) – Duration length of each split, default is
60.indicating all records will be split into 60-second windows. UseNoneto skip splitting records into windows during pre-processing.detrend ({“linear”, “constant”, “none”}, optional) – Type of detrending. If
detrend == "linear"(default), the result of a linear least-squares fit to data is subtracted from data. Ifdetrend == "constant", only the mean of data is subtracted. Ifdetrend == "none", no detrend is performed. Detrend is done on a window-by-window basis.ignore_dissimilar_time_step_warning (bool, optional) – If
Truea warning will not be raised if records have different time steps, default isFalse(i.e., a warning will be raised).window_type_and_width (list, optional) – A list with entries like
["tukey", 0.1]that control the window type and width, respectively.fft_settings (dict or None, optional) – Custom settings for
np.fft.rfft, default isNoneindicatinghvsrpydefaults will be used.instrument_transfer_function (InstrumentTransferFunction, optional) – If the sensor’s frequency response is provided it will be removed, default is
Nonemeaning no instrument correction is performed.differentiate (bool, optional) – If
Truethe provided signal will be differentiated, default isFalse.preprocessing_method (str, optional) – Defines pre-processing for later reference, default is
'psd'. Should not be changed.
- Returns:
PsdPreProcessingSettings – Object contains all user-defined settings to control preprocessing of microtremor or earthquake recordings in preparation for PSD processing.
- property attr_dict
Dictionary of
Settingsobject’s attributes.
- load(fname)
Load
Settingsobject from file on disk.- Parameters:
fname (str) – Name of file from which the
Settingsobject information will be loaded. Can be a relative or the full path.- Returns:
None – Updates
Settingsobject from information stored in a file on disk.
- psummary()
Pretty summary of information in
Settingsobject.
- save(fname)
Save
Settingsobject to file on disk.- Parameters:
fname (str) – Name of file to which the
Settingsobject will be saved. Can be a relative or the full path.- Returns:
None – Instead saves
Settingsobject information to file on disk.