> For the complete documentation index, see [llms.txt](https://tlcfem.gitbook.io/suanpan-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tlcfem.gitbook.io/suanpan-manual/command-collection/process/response_spectrum.md).

# response\_spectrum

Compute Response Spectrum of a Given Accelerogram

Minimum version: v2.6

Reference:

1. <https://doi.org/10.1016/S0267-7261(05)80015-6>

Please note the following.

1. **Only applies to elastic system.**
2. **Only trivial initial conditions are accounted for.**

## Syntax

### Form A

For accelerogram record stored in single column plain text file. The following syntax can be used.

```
response_spectrum (1) (2) (3) (4)
# (1) string, file path of the accelerogram file
# (2) string, file path of the period file
# (3) double, sampling interval
# (4) double, damping ratio
```

The accelerogram stores discrete acceleration amplitudes in the first column of the file.

The desired period points where the response spectrum is computed are stored in the first column of the period file. The period file itself can have multiple columns, but only the first column is used.

As the accelerogram only provides the amplitudes, the sampling interval must be provided as the `(3)` argument.

### Form B

For accelerogram record stored in double column plain text file. The following syntax can be used.

```
response_spectrum (1) (2) (3)
# (1) string, file path of the accelerogram file
# (2) string, file path of the period file
# (3) double, damping ratio
```

The accelerogram stores the time and acceleration amplitudes in the first and second columns of the file.

The time series ***must*** be equally spaced.

The desired period points where the response spectrum is computed are stored in the first column of the period file. The period file itself can have multiple columns, but only the first column is used.

## Remarks

The sampling interval is provided as the `(3)` argument in Form A, and is computed from the time series in Form B.

The same sampling interval is used in Lee's algorithm to compute the response histories. If the provided interval is large, the response spectra may be inaccurate. One can use the [`upsampling`](/suanpan-manual/command-collection/process/upsampling.md) command to process the accelerogram before using the `response_spectrum` command.

## Example

See [this example](/suanpan-manual/example/structural/dynamics/computing-response-spectrum.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://tlcfem.gitbook.io/suanpan-manual/command-collection/process/response_spectrum.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
