def _sim_WA(trace, PAZ, seedresp, water_level, velocity=False):
<EOL>PAZ_WA = {'<STR_LIT>': [-<NUM_LIT> + <NUM_LIT>, -<NUM_LIT> - <NUM_LIT>],<EOL>'<STR_LIT>': [<NUM_LIT:0> + <NUM_LIT>], '<STR_LIT>': <NUM_LIT:1.0>, '<STR_LIT>': <NUM_LIT>}<EOL>if velocity:<EOL><INDENT>PAZ_WA['<STR_LIT>'] = [<NUM_LIT:0> + <NUM_LIT>, <NUM_LIT:0> + <NUM_LIT>]<EOL><DEDENT>trace.detrend('<STR_LIT>')<EOL>if PAZ:<EOL><INDENT>trace.data = seis_sim(trace.data, trace.stats.sampling_rate,<EOL>paz_remove=PAZ, paz_simulate=PAZ_WA,<EOL>water_level=water_level,<EOL>remove_sensitivity=True)<EOL><DEDENT>elif seedresp:<EOL><INDENT>trace.data = seis_sim(trace.data, trace.stats.sampling_rate,<EOL>paz_remove=None, paz_simulate=PAZ_WA,<EOL>water_level=water_level, seedresp=seedresp)<EOL><DEDENT>else:<EOL><INDENT>UserWarning('<STR_LIT>')<EOL>trace.data = seis_sim(trace.data, trace.stats.sampling_rate,<EOL>paz_remove=None, paz_simulate=PAZ_WA,<EOL>water_level=water_level)<EOL><DEDENT>return trace<EOL>
Remove the instrument response from a trace and simulate a Wood-Anderson.

Returns a de-meaned, de-trended, Wood Anderson simulated trace in
its place.

Works in-place on data and will destroy your original data, copy the
trace before giving it to this function!

:type trace: obspy.core.trace.Trace
:param trace:
    A standard obspy trace, generally should be given without
    pre-filtering, if given with pre-filtering for use with
    amplitude determination for magnitudes you will need to
    worry about how you cope with the response of this filter
    yourself.
:type PAZ: dict
:param PAZ:
    Dictionary containing lists of poles and zeros, the gain and
    the sensitivity. If unset will expect seedresp.
:type seedresp: dict
:param seedresp: Seed response information - if unset will expect PAZ.
:type water_level: int
:param water_level: Water level for the simulation.
:type velocity: bool
:param velocity:
    Whether to return a velocity trace or not - velocity is non-standard
    for Wood-Anderson instruments, but institutes that use seiscomp3 or
    Antelope require picks in velocity.

:returns: Trace of Wood-Anderson simulated data
:rtype: :class:`obspy.core.trace.Trace`