File Exchange

image thumbnail

readPEER

version 3.1 (1.7 KB) by gopi
Read PEER ground motion

9 Downloads

Updated 27 Sep 2018

View License

This program is used to read ground motion data from PEER database.

Comments and Ratings (8)

Works great! This is awesome.

Mugetsu

Very useful function, thanks a lot!

gopi

@ Fabrizio Salvatore Stramaglia

filefolder = 'H:\Google Drive\Thesis\asd_peer_analysis' ; % the folder where the data is stored
pulse_directory = dir([filefolder '\*.AT2']); % .AT2 extention is need to read acceleration files.
% If you want to read velocity or displacement, write .VT2 or .DT2, respectively.

ns = fix(length(pulse_directory));

for kk = 1 : ns

fl_nms{kk} = pulse_directory(kk).name;
[acceleration{kk}, dt(kk, 1), npts(kk, 1), rsn(kk, 1)] = ...
readPEER(filefolder, fl_nms{kk});

acceleration{kk} = acceleration{kk}*g;
acceleration{kk} = acceleration{kk} - mean(acceleration{kk});

end

How can I extract time_series, dt, npts and rsn data for a series of ground motion data files taken from PEER database? Is it possible to apply the function for all files at the same time? In which way?

gopi

@ Xinzhe Yuan thanks for the suggestion. Suggested improvement has been implemented.

Xinzhe Yuan

very useful file, thanks a lot.

One quick question please, if you change the format after the fid using one '%f' instead of 5 and the variable 'CollectOutput' to 0 (zero) instead of 1 in the textscan command, it will automatically generate a vector, saving some efforts to generate one series by yourself.

useful

Updates

3.1

Minor improvements

3.0.0.0

File selection is added

2.0.0.0

Changed the file name

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux