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 HvsrPreProcessingSettings object.

Parameters:
  • hvsrpy_version (str) – Denotes the version of hvsrpy used to create the Settings object. 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. None can 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. Use None to 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. If detrend == "constant", only the mean of data is subtracted. If detrend == "none", no detrend is performed. Detrend is done on a window-by-window basis.

  • ignore_dissimilar_time_step_warning (bool, optional) – If True a warning will not be raised if records have different time steps, default is False (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 Settings object’s attributes.

load(fname)

Load Settings object from file on disk.

Parameters:

fname (str) – Name of file from which the Settings object information will be loaded. Can be a relative or the full path.

Returns:

None – Updates Settings object from information stored in a file on disk.

psummary()

Pretty summary of information in Settings object.

save(fname)

Save Settings object to file on disk.

Parameters:

fname (str) – Name of file to which the Settings object will be saved. Can be a relative or the full path.

Returns:

None – Instead saves Settings object 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 PsdPreProcessingSettings object.

Parameters:
  • hvsrpy_version (str) – Denotes the version of hvsrpy used to create the Settings object. 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. None can 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. Use None to 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. If detrend == "constant", only the mean of data is subtracted. If detrend == "none", no detrend is performed. Detrend is done on a window-by-window basis.

  • ignore_dissimilar_time_step_warning (bool, optional) – If True a warning will not be raised if records have different time steps, default is False (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 is None indicating hvsrpy defaults will be used.

  • instrument_transfer_function (InstrumentTransferFunction, optional) – If the sensor’s frequency response is provided it will be removed, default is None meaning no instrument correction is performed.

  • differentiate (bool, optional) – If True the provided signal will be differentiated, default is False.

  • 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 Settings object’s attributes.

load(fname)

Load Settings object from file on disk.

Parameters:

fname (str) – Name of file from which the Settings object information will be loaded. Can be a relative or the full path.

Returns:

None – Updates Settings object from information stored in a file on disk.

psummary()

Pretty summary of information in Settings object.

save(fname)

Save Settings object to file on disk.

Parameters:

fname (str) – Name of file to which the Settings object will be saved. Can be a relative or the full path.

Returns:

None – Instead saves Settings object information to file on disk.