Response

Contains information relevant to Responses.

class FapResponse(response_data=None, fap=[])

Class for frequency, amplitude and phase type response. Inherits Response class.

Variables:fap (Array) – an array of five float values which contain the frequency, amplitude, phase, amplitude_error, phase_error in that order
class PazResponse(response_data=None, scale_factor=None, poles=[], zeros=[])

Class for poles and zeros type of response. Inherits Response class.

Variables:
  • scale_factor (float) – scale factor of the response
  • poles (Array) – array of all the poles in the response. Poles are arrays of floats and contain the imaginary value of the pole and the error of the pole
  • zeros (Array) – array of all the zeros in the response. Poles are arrays of floats and contain the imaginary value of the zero and the error of the zero
getObspyResponse(mode='dis')

Method for getting the response in a format suited for obspy.

Parameters:mode (string) – dis, vel or acc depending on which derivative of paz file you want
Returns:response in a format fitting to obspy
class Response(data=None)

Class for response information. Always use either PazResponse or FapResponse instead of this class.

Parameters:

data (array) – all the relevant data for response in an array. These values are accessed by its numerations.

Variables:
  • c_id (int) – Creation id of the response in the database
  • response_id (int) – Response id of the response in the database
  • file_name (string) – Name of the response file from which this object was read from
  • source (string) – Source of the response
  • stage (int) – stage of the response
  • description (string) – description of the response
  • response_format (string) – format of this response file. Either paz or fap
  • author (string) – author of the response
  • response_id – id of the response in the database
  • FILE_NAME (int) – Enumeration of the data list. Value of 0
  • SOURCE (int) – Enumeration of the data list. Value of 1
  • STAGE (int) – Enumeration of the data list. Value of 2
  • DESCRIPTION (int) – Enumeration of the data list. Value of 3
  • RESPONSE_FORMAT (int) – Enumeration of the data list. Value of 4
  • AUTHOR (int) – Enumeration of the data list. Value of 5
  • ID (int) – Enumeration of the data list. Value of 6
readResponseArrayToResponse(resp, file_name)

Function for reading response string array into a Response object

Parameters:
  • resp (Array) – response string
  • file_name (String) – name of the response file.
Returns:

PazResponse object or FapResponse object