<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Example 1 
Step1:  Load time series data
Step2:  There are a few supported file formats. AT2 files can be loaded as follows
Step3:  Create site profile
This is about the simplest profile that we can create. Linear-elastic soil and rock.
Step4:  Create the site response calculator
Step5:  Specify the output
Step6:  Perform the calculation
Compute the response of the site, and store the state within the calculation object. Nothing is provided.
Step7:  Calculate all of the outputs from the calculation object.
Step8:  Plot the outputs
Create a few plots of the output.
<ASSISTANT_TASK:>
Python Code:
import matplotlib.pyplot as plt
import numpy as np
import pysra
%matplotlib inline
# Increased figure sizes
plt.rcParams["figure.dpi"] = 120
Explanation: Example 1 : Time series SRA
Time series analysis to compute surface response spectrum and site 
amplification functions.
End of explanation
fname = "data/NIS090.AT2"
with open(fname) as fp:
    next(fp)
    description = next(fp).strip()
    next(fp)
    parts = next(fp).split()
    time_step = float(parts[1])
    accels = [float(p) for l in fp for p in l.split()]
    ts = pysra.motion.TimeSeriesMotion(fname, description, time_step, accels)
ts.accels
Explanation: Load time series data
End of explanation
ts = pysra.motion.TimeSeriesMotion.load_at2_file(fname)
ts.accels
fig, ax = plt.subplots()
ax.plot(ts.times, ts.accels)
ax.set(xlabel="Time (sec)", ylabel="Accel (g)")
fig.tight_layout();
Explanation: There are a few supported file formats. AT2 files can be loaded as follows:
End of explanation
profile = pysra.site.Profile(
    [
        pysra.site.Layer(pysra.site.SoilType("Soil", 18.0, None, 0.05), 30, 400),
        pysra.site.Layer(pysra.site.SoilType("Rock", 24.0, None, 0.01), 0, 1200),
    ]
)
profile.plot('initial_shear_vel')
Explanation: Create site profile
This is about the simplest profile that we can create. Linear-elastic soil and rock.
End of explanation
calc = pysra.propagation.LinearElasticCalculator()
Explanation: Create the site response calculator
End of explanation
freqs = np.logspace(-1, 2, num=500)
outputs = pysra.output.OutputCollection(
    [
        pysra.output.ResponseSpectrumOutput(
            # Frequency
            freqs,
            # Location of the output
            pysra.output.OutputLocation("outcrop", index=0),
            # Damping
            0.05,
        ),
        pysra.output.ResponseSpectrumRatioOutput(
            # Frequency
            freqs,
            # Location in (denominator),
            pysra.output.OutputLocation("outcrop", index=-1),
            # Location out (numerator)
            pysra.output.OutputLocation("outcrop", index=0),
            # Damping
            0.05,
        ),
        pysra.output.FourierAmplitudeSpectrumOutput(
            # Frequency
            freqs,
            # Location of the output
            pysra.output.OutputLocation("outcrop", index=0),
            # Bandwidth for Konno-Omachi smoothing window
            ko_bandwidth=30,
        )
    ]
)
Explanation: Specify the output
End of explanation
calc(ts, profile, profile.location("outcrop", index=-1))
Explanation: Perform the calculation
Compute the response of the site, and store the state within the calculation object. Nothing is provided.
End of explanation
outputs(calc)
Explanation: Calculate all of the outputs from the calculation object.
End of explanation
for o in outputs:
    o.plot(style="indiv")
Explanation: Plot the outputs
Create a few plots of the output.
End of explanation
<END_TASK>