na5 d4 parti updated feb 2010

Upload: sergioalcantara

Post on 01-Jun-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    1/42

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    2/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    2

    Summary

    The proposal of the Task B inside the NA5 was: the definition and implementation ofparametric data exchange procedures. The participants on this task are:  IGC, LGIT,ITSAK, ETHZ, KOERI, EMSC, IST and ETHZ

    Concretely, the main objectives are:

    •  Definition of the parametric data to be exchanged and the procedures tocompute them.

    •  Implementation of software at networks.

    •  To promote the exchange of Pseudo Spectral Acceleration (PSA) and PseudoSpectral Velocity (PSV), extremely useful to constrain shakemaps (  JRA3),make comparisons with community intensity maps (  NA7) and validateattenuation laws.

    •  To initiate the collection and distribution of parametric data through the portal

    (NA7, TA1).

    This task must generate the following objects:

    •  The software to obtain from every record the parametric data.

     At this point it is important to remark that the aim of this project is not to providea software tool to compute accelerometric parameters in a customizable way. Itmust be taken into account that the main idea is to disseminate a common,homogenous and automatic way to compute that parameters. Therefore, theprocessing procedures to compute parameters will be always the same with anyevent, whatever its magnitude, source, etc.

    Neither is it a goal of the project to disseminate time-histories of the events(filtered acceleration, velocity and displacement) although they are calculated.

    •  The parametric files and the event information files which will content themetadata needed to perform the searches of records and, in a future, toconstrain shakemaps, validate attenuation laws, etc.

    In order to choose the adequate procedures to be implemented in the parameterscomputation software, a miniBenchmark exercise was proposed. Then, a commonprocedure for parameters computation was studied and implemented. The parameterscomputation software was distributed to all participants and their comments were takeninto account to generate new versions.

     After the NERIES meeting of March 2008 in Grenoble some improvements has been

    introduced. Recommendations expressed by external reviewers have been considered(October 2008, update).

     After a comparison of parameters from ITACA (INGV) computed with ParamaccV8 anerror was detected in Housner Intensity routine and corrected in a new versionParamaccV9 (February 2010, updated).

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    3/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    3

    - Task B deliverables:

    # Deliverable tit le Date Nature Task

    D2 Specifications for PSA and PSVDefinition and computation of

    parametric data

    9 R, Software B

    D4 Implementation of accelerometricparameters computation and exchange

    18 R, Web B

    This deliverable D4 is composed by two parts:

    Part 1:  corresponds to the presentation of the last version of the parameterscomputation software. It contains a general description of user interfaces, computationmodule and visualization module; furthermore, there are 3 annexes containing source

    code of the software and Paramacc and RegisterVisor user manuals.

    Part 2: contains the results of each participant in reference to the application of theparameters computation software to its set of files.

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    4/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    4

    PART 1-The parameters computation software 

    Matlab platform is the language selected to implement the common procedure ofparameter computation due to its wide scientific use and the routines that the signalprocessing toolbox offers. In addition, Matlab allows compiling the scripts into self-

    contained programs for different platforms (Windows, UNIX, Linux…). A compilation under Windows platform and the source code have been distributedamong the NA5 partners. The name of the software is paramacc.

    In parallel, a second program to visualize the calculated parameters has beendeveloped. It is briefly mentioned in the following pages and its name is registervisor .

    This issue of D4 (October 2008) corresponds to the version 8 of both softwares.

    1-ParamaccV9, general structure

    The basic elements of the computation software are shown in the scheme of the Figure

    1.

    Figure 1. Scheme of the Matlab software paramaccV9 for the computation of parameters

    Basically, the computation software is composed of three main parts:

    -a user interface  that allows selecting input files to read the data to beprocessed.

    -the parameters computation modules, which calculate each output

    parameter individually with the help of filters, time-domain integrations andmany other general purpose tools.

    -the module to write  parameters in a formatted file and, additionally, tovisualize computed data.

    See Appendix A for complete list of the software and appendix B for the user manual ofParamaccV9. 

    1.1-User interface

    This graphic module allows the user to interact with the program in order to:

    a) Read the input file (event_table).

    With the file browser it is possible to open any file in any directory. See Figure 2to get a better idea of the user window.

    Input files Output fileComputation software

    Event_table

     Accelerogram

    time-series

    Parametercomputation

    modules

     Generaldata

    processingtools

    PGA, PGV, PGD

    CAV

    Trifunac duration

     Arias intensity

    Housner intensity

    PSV, 5% damping

    Filters: -Butterworth-Acausal response

    Integration: -Time-domain

    GUI: -Graphic mode-Data representation

    Parameters

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    5/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    5

     

    Figure 2. User interface with the event_table file browser opened

    Before executing the program, it is absolutely necessary to have an event_table 

    already created. Each partner must generate an event_table  file with therecords of its own area of interest. The format of the event file must be thefollowing:

    Table 1. Example of event_table.txt 

    ID Date time_event time_record Lon Lat Depth20000211_0000012 2000/02/11 16:16:29.8 16:16:23.0 2.06 42.48 9Mw Ml Mb network record

    ? 2.1 ? IGC 20000211.161630.LLIR-IGC.01.HNE.asc

    Notes:

    -It is important to remark that each field must be filled with a character differentfrom blank spaces.-The record name must have 35 characters including points, dashes and theextension of the file.-The ID is an unified identifier that will be furnished by EMSC-CSEM.-Time-series of accelerometric data must be saved classified by year, monthand day and in the same folder that the event_table:

    Figure 3. Data structure. In this example, event_table should be placed in the “ database”folder.

    b) Start processing parameters.

    Once the input file has been read, the user can start to process the records.

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    6/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    6

    1.2- Parameters computation modules

    It is considered that parameters computation modules are a set of specific functionsthat focus on the computation of each parameter. Consequently, there is one functionfor each parameter to calculate. The next flowchart shows the steps for thecomputation process.

    Figure 4. Flowchart for the parameters computation

    Here is a more detailed explanation about the function which computes eachparameter (see appendix A):

    - Raw acceleration: acceleration time-history in cm/s2, base line corrected. Itis supposed that the user should remove the offset of the record beforeprocessing it. In spite of this, the software allows (optional) an automatic baseline correction for raw acceleration records by one degree polynomialapproximation fitted in a least squares sense.

    - Record duration: duration of raw acceleration record (in seconds).

    - Raw PGA (cm/s2): PGA (peak ground acceleration) from raw accelerationrecord.

    - Highpass filter (acausal): Butterworth IIR highpass filter of two poles isimplemented. To maintain the homogeneity and to avoid being too restrictive,the cut-off frequency is 0,1Hz for all records, taking into account their varietyand instruments resolution. Filtering is applied again in the opposite time

    Raw acceleration

    Filteredacceleration

    Velocity 

    Displacement

    Highpass Butt. 2 poles, 0,1Hz 

    Integration 

    Integration 

    Raw PGA

     

    PGA

     Arias Int., Trifunac duration, CAV 

    PSV 5%,28 periods

    Housner Int.

    PGV 

    Recordduration

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    7/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    7

    direction in order to avoid phase distortion. Data padding has been introducedto avoid low frequency distortion. A number of zeros equivalent to 5% of thetime duration has been added, both at the beginning and at the end of signal.

    - Filtered acceleration: raw acceleration after the application of the previouslydefined filter.

    - PGA (cm/s2): PGA from filtered record. It is directly obtained from themaximum value of the filtered acceleration time-history.

    - AI (cm/s): Arias intensity. A specific function detailed in “Int_arias.m”according the next expression:

    ∫∞

    =0

    2 )(·2

    ..   dt t ag

     A I   π 

     

    - Trifunac duration (s): Trifunac duration is the time interval between the 5%and 95% of a Husid plot, detailed in “Trifunac.m”:

    ∫∞

    =

    0

    2

    0

    2

    )(

    )(

    )(

    dt t a

    dt t a

    t  Husid 

     

    - CAV (cm/s): Cumulative Absolute Velocity. A specific function detailed in“Cav.m” according to the next expression:

    ∫∞

    =0

    )(   dt t aCAV   

    - PSV (5%) (pseudovelocity) (cm/s) for 28 frequencies logarithmically equallyspaced (from 0.15Hz to 39Hz) (frequencies: 0.15, 0.19, 0.23, 0.28, 0.34, 0.42, 0.52, 0.64, 0.78, 0.96, 1.18, 1.45, 1.78, 2.19, 2.69, 3.31, 4.06, 4.99, 6.13,7.53, 9.25, 11.37, 13.96, 17.15, 21.07, 25.89, 31.80, 39.07 Hz). The first 6frequencies PSV values are not offered in case of PGA

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    8/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    8

    1.3-Writing/Visualizing module

    While the output parameters are calculated, a file called “parameters_table.txt” isupdated. This file is placed in the same folder that the event_table. It is important toknow that this file will be generated automatically by the program and, if it was already

    created, it will be updated with the new events reported in the event_table since thelast execution of the program.

    The next table shows the format of the “parameters_table.txt”. Note that all the valuesare placed in one row for each record.

    Table 2. Example of parameters_table.txt

    Record rec. duration. PGA_uncor. PGA Arias intensity

    20080101.000000.KOER-PPP.01.HGV.asc 30.036000 735.393877 733.029465 652.90104170

    Trifunac d. CAV PGV PSV(at 28 freq.) damping=5%

    12.880000 2138.729872 37.335376 32.054378 26.574545 18.436520 16.889276 13.165072 18.00777331.264875 63.818260 37.773259 37.081048 31.696547 26.919527 34.960381 43.099102 43.99843266.653943 83.237890 73.487635 57.535370 35.168558 23.043350 13.348033 9.029967 7.3731256.458809 5.108710 3.453048 2.835683

    Housner intensity

    65.078088

    The visualization module is optional and operates with the parameters calculated forthe last record. The goal of this possibility is to check the processing by thevisualization of acceleration, velocity and displacement time-histories and response

    spectrum (figure 5).

    Figure 5. Visualization mode

    Refer to “soft_paramacc.pdf” for a more detailed explanation about user instructions. 

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    9/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    9

    2-RegistervisorV9, general structure

    The basic elements of the visualization software are represented in the next scheme inFigure 6.

    Figura 6. Scheme of the Matlab software registervisor for the visualization of parameters

    Registervisor   reads the parameters_table  previously generated and the rawacceleration time history, and creates an image with the value of each parameter and aplot with raw acceleration time history and PSV 5%. This is only a tool for checking theoutput parameters and it doesn’t manipulate anything by itself.

    The program has a file browser to open any file in any directory. Only files generatedby paramaccV9 will be correctly read. The records available to be represented will beshowed in a window. The next figure 7 shows an example of an output file and thegraphic mode of the program:

    Figure 7. Registervisor software (left) and output file (right).

     All generated images are saved and placed in the folder where the parameters_table is

    located. 

    See Appendix C for the user manual of registervisorV9.

    Input file Output fileVisualization software

    Parameters_table

    Readparameters

    module

    *.jpg image

    GUI: -Graphic mode

    Datarepresentation

    module

     

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    10/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    10

     Appendix A: Software source code related to parameters computationmodules

    -ParamaccV9: is the initial part of the program. It manages the user interface  andenables the user to start the processing of the records.

    -Read_event: it reads the event_table file and the parameters_table file and itcompares both to establish the new records to be computed.-Mainprog: according to the information received from “Read_event”, it starts thesignal processing and writes the output parameters to the parameters file. It callsCentral_defV2.-Central_defV2: according to “mainprog”, it reads and processes each accelerometricrecord. This action includes the call of every computing parameters routines. 

    ParamaccV9

    f uncti on par amaccV9( acti on, i p_f i l e, op_f i l e, pat h, opt i on1, opt i on2, opt i on3)  

    %%%%%%%%Sei smi c paramet er s cal cul at i on sof t war e i nt o NERI ESpr oj ect %%%%%%%%%%paramaccV9( ' act i on' , ' i p_ f i l e' , ' op_f i l e' , ' path' , ' opt i on1' , ' opt i on2' , ' opt i on3' )  % execut es t he sof t ware i n an aut omat i c mode.  %% act i on: no mi nds, t ype anyt hi g.%% i p_f i l e: event s i nput f i l e wi t h ext ensi on.  %

    % op_f i l e: par amet er s out put f i l e wi t h extensi on.  %% pat h: compl et pat h of i nput f i l e, out put f i l e and t i me ser i es.  %% opt i on1: ' Def aul t ' t o r un sof t war e wi t h def aul t opt i ons, i . e.wi t h of f set cor r ecti on% and not savi ng t i me ser i es.  % ' Cust om' t o r un sof t ware accor di ng t o opt i on2 andopt i on3.  %% opt i on2: ' 1' t o appl y of f set cor r ecti on.  % ' 0' t o not appl y of f set cor r ecti on.  %

    % opt i on3: ' 1' t o save t i me ser i es.  % ' 0' t o not save t i me ser i e.  %% par amaccV9 t o r un sof t ware manual l y.  %% Exampl es:  %par amaccV9( ' ' , ' event s_t abl e. t xt ' , ' par amet er s_t abl e. t xt ' , ' C: \ Document sand Set t i ngs' , ' Def aul t ' ) ;  %%par amaccV9( ' ' , ' event s_t abl e. t xt ' , ' par amet er s_t abl e. t xt ' , ' C: \ Document sand Set t i ngs' , ' Custom' , ' 1' , ' 1' ) ;  

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    11/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    11

    gl obal   ct r l ;  gl obal   i l i ne;  gl obal   i pl i nes ;  gl obal   odat a;  gl obal   pat hname;  gl obal   cont 0;  

    gl obal   f i d20;  gl obal   nproc;  gl obal   neweve;  gl obal   f i rst i me;  gl obal   di r ect _name;  

    i f ( nargi n pl i nes)  

    i l i ne=1;  i pl i nes=1;  

    el se i l i ne=0;

    end end i f   ( st r cmp( act i on, ' pr ocess' ) )  

    i f ( npr oc==1)  

    wi d=si ze(odata) ;  f or   n=1: wi d( 1)  f pr i nt f ( f i d20, ' %s %. 6f %. 6f %. 6f %. 8f %. 6f %. 6f %. 6f

    %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f%. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f%. 6f \ n' , cont 0( neweve( i pl i nes+n- 1) , : ) ,odat a( n, 1) , odat a( n, 2) , odat a( n, 3) , odat a( n, 4) , odat a( n, 5) , odat a( n, 6) , odata( n, 7) , odat a( n, 8) , odat a( n, 9) , odat a( n, 10) , odat a( n, 11) , odat a( n, 12) , odat a( n, 13) , odat a( n, 14) , odat a( n, 15) , odat a( n, 16) , odat a( n, 17) , odat a( n, 18) , odat a( n, 19) , odat a( n, 20) , odat a( n, 21) , odat a( n, 22) , odat a( n, 23) , odat a( n, 24) , odat a( n, 25) , odat a( n, 26) , odat a( n, 27) , odat a( n, 28) , odat a( n, 29) , odat a( n, 30), odat a( n, 31) , odat a( n, 32) , odat a( n, 33) , odat a( n, 34) , odat a( n, 35) , odat a( n, 36)) ;  

    end 

    end i pl i nes=i l i ne;  set ( ctr l . pb1, ' Enabl e' , ' o f f ' ) ;  set ( ctr l . pb2, ' Enabl e' , ' on' ) ;  set ( ctr l . pb3, ' Enabl e' , ' o f f ' ) ;  set ( ctr l . pb4, ' Enabl e' , ' o f f ' ) ;  i f   ( get ( ct r l . pop, ' Val ue' ) ==1)  

    [ newl i nes odat a f i r st i medi r ect _name] =mai npr og( i nf , get ( ct r l . opci o, ' Val ue' ) , f i d20, i l i ne, pat hname, cont 0, ctr l , neweve, f i r st i me, di r ect_ name) ;  

    i l i ne=newl i nes;  

    npr oc=0;  set ( ct r l . pb1, ' Enabl e' , ' on' ) ;  set ( ct r l . pb2, ' Enabl e' , ' on' ) ;  

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    12/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    12

      set ( ct r l . pb3, ' Enabl e' , ' on' ) ;  set ( ct r l . pb4, ' Enabl e' , ' o f f ' ) ;  

    el se nst ops=st r 2num( get ( ct r l . nst op, ' St r i ng' ) ) ;  i f   ( ( nst ops > 0) &( nst ops pl i nes)  i l i ne=1;  i pl i nes=1;  

    el se i l i ne=0;

    end 

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    13/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    13

      i f   ( st r cmp( opt i on1, ' Cust om' ) )  i f   ( exi s t ( ' opt i on2' ) )

    i f   ( st r cmp( opt i on2, ' 1' ) )  set ( ct r l . opci o, ' Val ue' ,1 ) ;  

    el se i f   ( st r cmp( opt i on2, ' 0' ) )  

    set ( ct r l . opci o, ' Val ue' ,0 ) ;  el se msgbox( ' Unknown i nput argument ' , ' I nf o' , ' er r or ' ) ;  

    end end 

    end i f   ( exi s t ( ' opt i on3' ) )  

    i f   ( st r cmp( opt i on3, ' 1' ) )  set ( ct r l . ck, ' Val ue' , 1) ;  di r ect _name=pat h;  

    el se i f   ( st r cmp( opt i on3, ' 0' ) )  

    set ( ct r l . ck, ' Val ue' , 0) ;  el se

     msgbox( ' Unknown i nput argument ' , ' I nf o' , ' er r or ' ) ;  end 

    end end 

    el se i f   ( st r cmp( opt i on1, ' Def aul t ' ) )  

    set ( ct r l . opci o, ' Val ue' ,1 ) ;  set ( ct r l . ck, ' Val ue' , 0) ;  

    el se msgbox( ' Unknown i nput argument ' , ' I nf o' , ' er r or ' ) ;  

    end end i f ( f i d20 > - 1)  

    par amaccV9( ' pr ocess' ) ;  cl ose( f ) ;  f cl ose( ' al l ' ) ;  cl ear ( ' al l ' ) ;  

    end end 

    i f   ( nar gi n == 2) | ( nar gi n == 3) | ( nar gi n==4)  msgbox( ' I nput ar gument s er r or ' , ' I nf o' , ' er r or ' ) ;  

    end 

    read_event.m

    f uncti on [ f i d20, el i nes, pl i nes, pat hname, cont 0, neweve] =r ead_event ( ctr l , i p_f i l e, op _f i l e, pat hname)  

    %- - - - - - - - - - Funct i on to recogni ze new events - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - %

     %- - - - - - - - - - - - - - - - - - Sel ect an event s f i l e- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - %i f   ( nar gi n==1)  

    [ f i l ename, pat hname] =ui get f i l e( {' *. t xt ' ; ' * . dat ' ; ' *. m' ; ' * . * ' }, ' Event f i l e Sel ector ' ) ;  

    i f ( f i l ename==0)  f i d20=- 1;  

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    14/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    14

      el i nes=0;  pl i nes=0;  pat hname=' ' ;  cont 0=0;  neweve=' ' ;  return;  

    end cl ear ( ' neweve' ) ;  set ( ct r l . l b, ' St r i ng' , ' ' ) ;  set (c t r l . act i on, ' St r i ng' , ' NA5- TaskB. Accel eromet r i c parameter

    comput at i on' ) ;  

    %- - - - - - - - - - - - - - - - - - - - Cr eat e par amet er s f i l e- - - - - - - - - - - - - - - - - - - - - - - - - - -- - - %

     event f i l e=cat ( 2, pathname, f i l ename) ;  par amf i l e=' par amet er s_t abl e. t xt' ;  par amf i l e=[ pat hname par amf i l e] ;  

    end 

    %- - - - - - - - - - - - - - - - - - Open pr esel ect ed event f i l e and par amt ers f i l e- - - - -- - - %i f   ( nar gi n==4)  

    pat hname=cat ( 2, pat hname, ' / ' ) ;  event f i l e=cat ( 2, pat hname, i p_f i l e) ;  par amf i l e=cat ( 2, pat hname, op_f i l e) ;  

    end %- - - - - - - - - - - Open event f i l e and parameters f i l e- - - - - - - - - - - - - - - - - - - - - - -- - - %

     f i d10=f open( event f i l e, ' r ' ) ;  i f ( f i d10==- 1)  

    f i d20=- 1;  el i nes=0;  pl i nes=0;  pat hname=' ' ;  cont 0=0;  neweve=' ' ;  er r or dl g( ' Er r or openi ng t he event f i l e' , ' Fi l e er ror ' ) ;  set (c t r l . act i on, ' St r i ng' , ' Can´t open event f i l e. ' ) ;  return;  

    end f i d20=f open( par amf i l e, ' a+' ) ;  i f ( f i d20==- 1)  

    f cl ose( f i d10) ;  el i nes=0;  pl i nes=0;  pat hname=' ' ;  cont 0=0;  neweve=' ' ;  er r or dl g( ' Er r or openi ng t he par amet er s f i l e' , ' Fi l e er r or ' ) ;  set (c t r l . act i on, ' St r i ng' , ' Can´t open par amet er s f i l e. ' ) ;  return;  

    end %- - - - - - - - - - - - - - Readi ng t he records name f rom event f i l e- - - - - - - - - - - - - - -- - - - %

     el i nes=0;  f or   k=1: 11 

    f scanf ( f i d10, ' %s' , [1 1] ) ;  

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    15/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    15

    end year =f scanf ( f i d10, ' %4s' , [ 1 1] ) ;  mont h=f scanf ( f i d10, ' %2s' , [1 1] ) ;  day=f scanf ( f i d10, ' %2s' , [1 1] ) ;  r est name=f scanf ( f i d10, ' %27s\ n' , [1 1] ) ;  archi vo1=[ year mont h day rest name] ;  

    whi l e  ( i sempt y( archi vo1) ~=1)  cont 0( el i nes+1, : ) =ar chi vo1;  f or   k=1: 11 

    f scanf ( f i d10, ' %s' , [1 1] ) ;  end year =f scanf ( f i d10, ' %4s' , [ 1 1] ) ;  mont h=f scanf ( f i d10, ' %2s' , [1 1] ) ;  day=f scanf ( f i d10, ' %2s' , [1 1] ) ;  r est name=f scanf ( f i d10, ' %27s\ n' , [1 1] ) ;  archi vo1=[ year mont h day rest name] ;  i f   ( ( l ength(archi vo1) ~=35) &( i sempty( archi vo1) ~=1) )  

    f cl ose( ' al l ' ) ;  el i nes=0;  pl i nes=0;

     pat hname=' ' ;  cont 0=0;  neweve=' ' ;  er r or dl g( ' Wr ong event f i l e' , ' Fi l e er r or ' ) ;  set (c t r l . act i on, ' St r i ng' , ' Wr ong event f i l e. ' ) ;  return;  

    end el i nes=el i nes+1;  

    end 

    %- - - - - - - - - Readi ng t he records name fr om par amet ers f i l e- - - - - - - - - - - - - - -- - - - %

     f seek( f i d20, 0, - 1) ;  t l i ne=f get s(f i d20) ;  pl i nes=0;  whi l e  ( t l i ne~=- 1)  

    cont 1( pl i nes+1, : ) =[ t l i ne( 1: 35) ] ;  t l i ne=f get s(f i d20) ;  pl i nes=pl i nes+1;  

    end 

    %- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - %i f ( exi s t ( ' cont 0' ) )  

    l engt hev=si ze( cont 0) ;  el se l engt hev=0;  

    end i f ( exi s t ( ' cont 1' ) )  

    l engt hpa=si ze( cont 1) ;  el se 

    l engt hpa=0;  end 

    %- - - - - - - - - - - - - - Looki ng f or new regi st er s t o t r eat - - - - - - - - - - - - - - - - - - - - -- - - - %

     

    i ndex=1;  i f ( pl i nes > 0) &( el i nes > 0)  

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    16/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    16

      f or   ( n=1: l engt hev( 1) )  f or   ( r =1: l engt hpa( 1) )  

    i f ( st r cmp( cont 0( n, : ) , cont 1( r , : ) ) ==1)  break;  

    el sei f   ( ( st r cmp( cont 0( n, : ) , cont 1( r , : ) ) ==0) &( r ==l engt hpa( 1) ) )  

    neweve( i ndex) =n;  i ndex=i ndex+1;  end 

    end end 

    el se f or   ( n=1: l engt hev( 1) )  

    neweve( i ndex) =n;  i ndex=i ndex+1;  

    end end 

    %- - - - - - - - - - - - - - But t on enabl i ng f or t he menu- - - - - - - - - - - - - - - - - - - - - - - - - - -

    - - - - % set (c t r l . opci o, ' Enabl e' , ' on' ) ;  set ( ctr l . pb3, ' Enabl e' , ' on' ) ;  set ( ct r l . l b, ' Enabl e' , ' on' ) ;  set ( ct r l . ck, ' Enabl e' , ' on' ) ;  i f ( exi s t ( ' neweve' ) )  

    f or ( i =1: l engt h( neweve) )  pr ev=get ( ctr l . l b, ' St r i ng' ) ;  set ( ct r l . l b, ' St r i ng' , [ pr ev; cont 0( ( neweve( i ) ) , : ) ] ) ;  

    end el se 

    neweve=[ ] ;  

    end set ( ctr l . pop, ' Enabl e' , ' on' ) ;  set ( ctr l . nstop, ' Enabl e' , ' on' ) ;  

    f cl ose( f i d10) ;  

    Mainprog.m

    f uncti on  [ newl i nes odat a f i r st i medi r ect _name] =mai npr og( st op, of cl , f i d20, i l i ne, pat hname, cont 0, ct r l , neweve, f i r st i me, di r ect_name)  

    %- - - - - - - - - - Funct i on to cal l the paramet ers cal cul at i on- - - - - - - - - - - - - - - -- - - - %

    cl nof f =of cl ;  i f ( st op==1)  

    pok=1;  el se 

    pok=0;  end 

    %- - - - - - - - Save t i me- ser i es?- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - %

     

    i f ( ( get ( ct r l . ck, ' Val ue' ) ==1)&&( f i r st i me==0) )  f i r st i me=1;  i f   ( st r cmp( di r ect _name, ' ' ) )  

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    17/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    17

      di r ect _name=ui getdi r ( ' di al og_ t i t l e' , ' Sel ect out put t i me ser i esf i l es dest i nat i on' ) ;  

    end i f ( di r ect _name==0)  

    odat a=' ' ;  newl i nes=i l i ne;  

    f i r st i me=0;  return;  end 

    el se i f ( get ( ct r l . ck, ' Val ue' ) ==0)  

    f i r st i me=0;  di r ect _name=0;  

    end end 

    %- - - - - - - - Are al l event s al r eady done?- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - %

     

    f seek( f i d20, 0, 1) ;  i f ( ( i l i ne- 1==l engt h( neweve) ) | ( i l i ne==0) )  set (c t r l . act i on, ' St r i ng' , ' Al l event s have been t r eat ed. Pr ogr am

    f i ni shed' ) ;  newl i nes=l engt h( neweve)+1;  odat a=' ' ;  return;  

    end 

    %- - - - - - - - - - Read t he f i r st new event - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - %

     archi vo1pat h=[ pathname cont 0( neweve( i l i ne) , 1: 4) ' / '  

    cont 0( neweve( i l i ne) , 5: 6) ' / '   cont 0( neweve( i l i ne) , 7: 8) ' / '  cont 0( neweve( i l i ne) , : ) ] ;  

    %- - - - - - - - - - Cal cul ate the f i r s t event parameters - - - - - - - - - - - - - - - - - - - - - - -- - - - %

     i f   ( exi st ( archi vo1path) ==0)  

    f cl ose( ' al l ' ) ;  er r or dl g( ' I nput f i l e name or f i l e pat h er r or . ' ) ;  set (c t r l . act i on, ' St r i ng' , ' I nput f i l e er r or . ' ) ;  newl i nes=0;  odat a=' ' ;  set ( ctr l . pb4, ' Enabl e' , ' on' ) ;

     return;  end set (c t r l . act i on, ' St r i ng' , [ ' Comput i ng par amet ers of '  cont 0( neweve( i l i ne) , 1: 31) ] ) ;  pause(0. 1) ;  [ SD, PGAu, PGAc, I A, TD, CAV, PGV, PSV, I H] =Cent r al _def V2( ar chi vo1path, cl nof f ,pok, f i r st i me, di r ect _name) ;  

    %- - - - - - - - - - - Put parameters i n an i ntermedi ate var i abl e- - - - - - - - - - - - - - - -- - - - %  

    odata( 1, : ) =[ SD PGAu PGAc I A TD CAV PGV PSV I H] ;  

    i f ( st op==i nf )  f pr i nt f ( f i d20, ' %s %. 6f %. 6f %. 6f %. 8f %. 6f %. 6f %. 6f %. 6f %. 6f%. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    18/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    18

    %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f \ n' ,cont 0( neweve( 1) , : ) ,odat a( 1, 1) , odat a( 1, 2) , odat a( 1, 3) , odat a( 1, 4) , odat a( 1, 5) , odat a( 1, 6) , odata( 1, 7) , odat a( 1, 8) , odat a( 1, 9) , odat a( 1, 10) , odat a( 1, 11) , odat a( 1, 12) , odat a( 1, 13) , odat a( 1, 14) , odat a( 1, 15) , odat a( 1, 16) , odat a( 1, 17) , odat a( 1, 18) , odat a( 1, 19) , odat a( 1, 20) , odat a( 1, 21) , odat a( 1, 22) , odat a( 1, 23) , odat a( 1, 24) , o

    dat a( 1, 25) , odat a( 1, 26) , odat a( 1, 27) , odat a( 1, 28) , odat a( 1, 29) , odat a( 1, 30), odat a( 1, 31) , odat a( 1, 32) , odat a( 1, 33) , odat a( 1, 34) , odat a( 1, 35) , odat a( 1, 36)) ;  end i f ( pok==1)  

    set (c t r l . act i on, ' St r i ng' , [ cont 0( neweve( i l i ne) , 1: 31) ' has beensuccesf ul l y comput ed. ' ] ) ;  

    newl i nes=i l i ne+1;  i f ( i l i ne==l engt h( neweve) )  

    set ( ctr l . pb3, ' St r i ng' , ' Save l ast r esul t s' ) ;  msgbox( ' Press "save l ast r esul t s" but t on t o save new dat a

    par ameters. ' , ' I nf o' , ' war n' ) ;  el se 

    msgbox( ' Press "pr ocess" but t on to f ol l ow pr ocessi ng and savenew dat a paramet er s. ' , ' I nf o' , ' warn' ) ;  

    end return;  

    end 

    %- - - - - - - - - - Cal cul at e par amet er s f or t he r est of t he event s- - - - - - - - - - - -- - - - %

     f or   j =( i l i ne+1) : l engt h( neweve)  

    archi vo1path=[ pathname cont 0( neweve( j ) , 1: 4) ' / '  cont 0( neweve( j ) , 5: 6) ' / '   cont 0( neweve( j ) , 7: 8) ' / '   cont 0( neweve( j ) , : ) ] ;  

    i f   ( exi st ( ar chi vo1path) ==0)  

    f cl ose( ' al l ' ) ;  er r or dl g( ' I nput f i l e name or f i l e pat h er r or . ' ) ;  set ( ct r l . act i on, ' St r i ng' , ' I nput f i l e er ror . ' ) ;  newl i nes=0;  return;  

    end i f ( r em( j - i l i ne+1, st op) ==0)  

    pok=1;  el se 

    pok=0;  end set (c t r l . act i on, ' St r i ng' , [ ' Comput i ng par amet ers of '  

    cont 0( neweve( j ) , 1: 31) ] ) ;  

    pause(0. 1) ;  [ SD, PGAu, PGAc, I A, TD, CAV, PGV, PSV, I H] =Cent r al _def V2( ar chi vo1path, cl nof f ,pok, f i r st i me, di r ect _name) ;  

    odat a( j - i l i ne+1, : ) =[ SD, PGAu PGAc I A TD CAV PGV PSV I H] ;  i f ( st op==i nf )  

    f pr i nt f ( f i d20, ' %s %. 6f %. 6f %. 6f %. 8f %. 6f %. 6f %. 6f %. 6f %. 6f%. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f%. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f %. 6f \ n' ,cont 0( neweve( j - i l i ne+1) , : ) , odat a( j - i l i ne+1, 1) , odat a( j -i l i ne+1, 2) , odat a( j - i l i ne+1, 3) , odat a( j - i l i ne+1, 4) , odat a( j -i l i ne+1, 5) , odat a( j - i l i ne+1, 6) , odat a( j - i l i ne+1, 7) , odat a( j -i l i ne+1, 8) , odat a( j - i l i ne+1, 9) , odat a( j - i l i ne+1, 10) , odat a( j -

    i l i ne+1, 11) , odat a( j - i l i ne+1, 12) , odat a( j - i l i ne+1, 13) , odat a( j -i l i ne+1, 14) , odat a( j - i l i ne+1, 15) , odat a( j - i l i ne+1, 16) , odat a( j -i l i ne+1, 17) , odat a( j - i l i ne+1, 18) , odat a( j - i l i ne+1, 19) , odat a( j -

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    19/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    19

    i l i ne+1, 20) , odat a( j - i l i ne+1, 21) , odat a( j - i l i ne+1, 22) , odat a( j -i l i ne+1, 23) , odat a( j - i l i ne+1, 24) , odat a( j - i l i ne+1, 25) , odat a( j -i l i ne+1, 26) , odat a( j - i l i ne+1, 27) , odat a( j - i l i ne+1, 28) , odat a( j -i l i ne+1, 29) , odat a( j - i l i ne+1, 30) , odat a( j - i l i ne+1, 31) , odat a( j -i l i ne+1, 32) , odat a( j - i l i ne+1, 33) , odat a( j - i l i ne+1, 34) , odat a( j -i l i ne+1, 35) , odat a( j - i l i ne+1, 36) ) ;  

    end i f ( pok==1)  set (c t r l . act i on, ' St r i ng' , [ cont 0( neweve( j ) , 1: 31) ' has been

    succesf ul l y comput ed. ' ] ) ;  newl i nes=j +1;  i f ( j ==l ength(neweve) )  

    set ( ctr l . pb3, ' St r i ng' , ' Save l ast r esul t s' ) ;  msgbox( ' Press "save l ast r esul t s" but t on t o save new

    dat a. ' , ' I nf o' , ' warn' ) ;  el se 

    msgbox( ' Pr ess "pr ocess" but t on t o f ol l ow pr ocessi ng andsave new dat a. ' , ' I nf o' , ' warn' ) ;  

    end return;

     end end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%newl i nes=l engt h( neweve)+1;  set (c t r l . act i on, ' St r i ng' , ' Pr ogr am f i ni shed' ) ;  

    Central_defV2.m

    f uncti on [ SD, PGAu, PGAc, I a, Tr i f , Cav1, PGV, Psv, I H] =Cent r al _def V2( FI LEs, cl nof f , pok,f i r st i me, di r ect _name)  

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Accel er omet r i c dat a pr ocessi ng %% NERI ES NA5 ( by M. Tapi a and Al ber t Marsal ) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

     %- - - - - r eadi ng accel erograms- - - - - - - - - - - - - - - - - - - - - - - - - - - - - %% Two col umns: t i me ( t ) and ampl i t ude ( a) %%- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %  Dat os=l oad( FI LEs) ;  t =Dat os( : , 1) ;  a=Dat os( : , 2) ;  %- - - - - - - - - - - - - Despreci ate t i me negat i ve val ues- - - - - - - - - - - - - - - - - - - - - - - -- - - - %

    f or   i =1: l engt h( t )  i f   ( t ( i ) >=0)  break;  

    end end t =t ( i : l engt h( t ) ) ;  a=a( i : l engt h( a) ) ;  %- - - - - - - - - - - - - Si gnal Durat i on=l as t sampl e of t i me- - - - - - - - - - - - - - - - - - - - -- - - - %SD=t ( l engt h( t ) ) ;  %- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - %i f ( cl nof f ==1)  

    a_cor =of f set cl eaner ( a, t ) ;  a=a_cor ;  end 

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    20/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    20

    At =t ( 2) - t ( 1) ;  Fnyq=1/ ( 2*At ) ;  %Get t he f i l e name f r om t he compl et pat h name L=l engt h( FI LEs) ;  i =0;  whi l e  ( FI LEs(L- i ) ~=' / ' )  

    i =i +1;  end f i l e=FI LEs(L- i +1: L);  %- - - - - PGA unf i l t er ed ( cm/ s2) - - - - - - - - - - - - - - - - - - - - - - - - - - - - %%- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %PGAu=max( abs( a) ) ;  %- - - - - Fi l t er i ng t he accel erogram- - - - - - - - - - - - - - - - - - - - - - - - %% But t er wor t h f i l t er f r om 0. 1 t o ( Fnyq- 1) Hz %%- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %or den=2;  f r eqi nf =0. 1; %Hz f r eqsup=Fnyq- 1. ; %Hz %- - - - - - Zer o paddi ng at t he begi nni ng and at t he end of t he si gnal - - - - -- - - - %% The l engt h of zer o paddi ng i s 10% of t he l engt h of t he or i gi nalrecord %- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - %zero_pad=l engt h( t ) / 10;  zer o_pad=r ound( zer o_pad) ;  newl ength=l ength( t ) +zer o_pad;  f or   i =1: l engt h( t )  

    t 2( i ) =t ( i ) ;  end f or   i =l engt h( t ) +1: newl engt h 

    t 2( i ) =t 2( i - 1) +At ;  end f or   i =1: r ound( zero_pad/ 2)  

    a2( i ) =0;  end f or   i =r ound( zero_pad/ 2) +1: l engt h( t ) +r ound( zero_pad/ 2)  

    a2( i ) =a( i - r ound( zer o_pad/ 2) ) ;  end f or   i =l engt h( t ) +r ound( zero_pad/ 2) +1: newl engt h 

    a2( i ) =0;  end t 2=t 2' ;  a2=a2' ;  %%%%%%- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %[ a_f i l t ] =But 2pol V2( a2, f r eqi nf , f r eqsup, or den, Fnyq) ;  %- - - - - PGA f i l t er ed ( cm/ s2) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %%- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %PGAc=max( abs( a_f i l t ) ) ;  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Comput ed par amet er s f r om t he accel . t i me hi st or i es%%%%%%

     %Ar i as i nt ensi t y ( cm/ s)  I a=I nt _ar i as( t 2, a_ f i l t ) ;  %Tr i f unac dur at i on ( s)   Tr i f =Tr i f unac( t 2, a_f i l t ) ;  %CAV, cumul at i ve absol ut e vel oci t y ( cm/ s)  Cav1=Cav( t 2, a_f i l t ) ;  

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%- - - - - Fi ndi ng t he vel oci t y and di spl acement - - - - - - - - - - - - - %

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    21/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    21

    % i n t he t i me domai n %%- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %%Vel oci t y ( cm/ s)  i nt gr 1=cumt r apz(t 2, a_f i l t ) ;%Di spl acement ( cm)  i nt gr 2=cumt r apz( t 2, i nt gr 1) ;  

    %- - - - - Opt i on t o save acel er at i on, vel oci t y and di spl acement - - %i f ( f i r st i me==1)  out f i l e=cat ( 2, di r ect _name, ' / ' , f i l e( 1: l engt h( f i l e) - 3) , ' avd' ) ;  f i d30=f open( out f i l e, ' w+' ) ;  f or   i =1: 100 

    f or mat ( i ) =' ' ;  end f pr i nt f ( f i d30, ' Fi l t er ed accel er at i on ( cm/ s 2̂) ' ) ;  f pr i nt f ( f i d30, ' Vel oci t y ( cm/ s)' ) ;  f pr i nt f ( f i d30, ' Di spl acement ( cm) \ n' ) ;  posi t i on=f t el l ( f i d30) ;  f or   r =1: l engt h( a_f i l t )  

    f pr i nt f ( f i d30, ' %s' , f or mat ) ;  f seek(f i d30, posi t i on+10, - 1) ;

     f pr i nt f ( f i d30, ' %f ' , a_f i l t ( r ) ) ;  f seek(f i d30, posi t i on+39, - 1) ;  f pr i nt f ( f i d30, ' %f ' , i nt gr1( r ) ) ;  f seek(f i d30, posi t i on+61, - 1) ;  f pr i nt f ( f i d30, ' %f \ n' , i nt gr2( r ) ) ;  posi t i on=f t el l ( f i d30) ;  

    end f cl ose( f i d30) ;  

    end %- - - - - PGV ( cm/ s) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %%- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %PGV=max(abs( i ntgr1) ) ;  

    %- - - - - Pseudospectr um vel oci t y 5% dampi ng- - - - - - - - - - - - - - - - %%- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %%dampi ng amor t =0. 05;  % PSV comput ed at t hese f r equenci es f f =[ 0. 15, 0. 19, 0. 23, 0. 28, 0. 34, 0. 42, 0. 52, 0. 64, 0. 78, . . .  

    0. 96, 1. 18, 1. 45, 1. 78, 2. 19, 2. 69, 3. 31, 4. 06, 4. 99, 6. 13,7. 53, . . .  

    9. 25, 11. 37, 13. 96, 17. 15, 21. 07, 25. 89, 31. 80, 39. 07] ;  

    w=2*pi *f f ;  %PSV comput at i on 

    [ f psv, Psv] =psv( amor t , w, a_f i l t , t 2) ;  %Housner i nt ensi t y ( cm) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %I H=Housner ( f psv, Psv) ;  %I H=1; %pr ova %- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %

     %When PGA

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    22/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    22

    i f ( pok==1)  f i gur e( ' Name' , f i l e, ' Number Ti t l e' , ' of f ' ) ;  subpl ot ( 2, 2, 1: 2) ;  pl ot ( t , a) ;  t i t l e( ' Accel er ogr am dat a, bef or e t wo pol es But t er wor t h f i l t er f r om

    0. 1Hz t o Nyqui st

    f r equency' , ' Font Wei ght ' , ' Bol d' , ' Col or ' , ' b' , ' Font Si ze' , 14) ;  xl abel ( ' Ti me ( s) ' , ' Font Wei ght ' , ' Bol d' ) ;  yl abel ( ' Accel er at i on ( cm/ s 2̂) ' , ' Font Wei ght ' , ' Bol d' ) ;  subpl ot ( 2, 2, 3) ;  pl ot ( t2, i ntgr1) ;  t i t l e( ' Vel oci t y' , ' Font Wei ght ' , ' Bol d' , ' Font Si ze' , 13, ' Col or ' , ' b' ) ;  xl abel ( ' Ti me ( s) ' , ' Font Wei ght ' , ' Bol d' ) ;  yl abel ( ' Vel oci t y ( cm/ s)' , ' Font Wei ght ' , ' Bol d' ) ;  subpl ot ( 2, 2, 4) ;  pl ot ( t2, i ntgr2) ;  

    t i t l e( ' Di spl acement ' , ' Font Wei ght ' , ' Bol d' , ' Font Si ze' , 13, ' Col or ' , ' b' ) ;  xl abel ( ' Ti me ( s) ' , ' Font Wei ght ' , ' Bol d' ) ;  yl abel ( ' Di spl acement ( cm) ' , ' Font Wei ght ' , ' Bol d' ) ;

     f i g=f i gner i es( f i l e, SD, PGAu, PGAc, I a, Tr i f , Cav1, PGV, Psv, I H) ;  end 

    Cav.m

    f uncti on  [ CAV] =Cav( t , a)  %Cumul at i ve absol ut e vel oci t y CAV=t r apz( t , abs( a) ) ;  

    Housner.m

    f uncti on  [ I Housner ] =Housner ( f , psv)  %i nt egr al ent r e 0. 1s y 2. 5s de per i odo par a PSV*per i odo di f er enci al de %f r ecuenci a X=1. / f ( 6: 21) ;   Y=psv( 6: 21) ;  f =f ( 6: 21) ;   Y=Y. *X. *X;  I Housner =abs( t r apz( f , Y) ) ;  

    Int_arias.m

    f uncti on  [ar i as]=I nt _ar i as(t , a)  %Comput at i on of t he Ar i as i nt ensi t y%i nput : t i me, accel er ogr am ( cm/ s2)  a2=a. *a;  ar i as=( pi / ( 2*981. ) ) *t r apz(t , a2) ;  

    Psv.m

    f uncti on  [ f r eq, PSV] =psv( et ha, w, a, t )  %I nput t i me accel erat i on %dampi ng- - >et ha=0. 05 %vect or f r eq, w%comput at i on of psv f or t he f r equenci es especi f i ed i n w.  %Psv i s computed usi ng t he convol ut i on t heorem t o sol ve duhamel i nt .  %- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    - - -  %enl ar gement of t he si gnal t o avoi d osci l at i ons f or l ow f r equenci es %( f ~0. 05Hz- - >Ttot ~20s) .  

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    23/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    23

    t t ot=max( t ) ;  N=l engt h( t ) ;  i f   t t ot < 20;  

    t _add=20- t t ot ;  count s_add=i nt 32( t _add/ ( t ( 2) - t ( 1) ) ) ;  count s_t ot =20/ ( t ( 2) - t ( 1) ) ;  

    %addi ng zeros at t he begi ni ng of t he si gnal  f or   i =1: count s_add aa( i ) =0;  

    end f or   i =1: N 

    aa( i +count s_add) =a( i ) ;  end f or   i =1: count s_t ot  

    t ( i ) =( t ( 2) - t ( 1) ) * ( i - 1) ;  end a=aa;  

    end

    %- - - - - - - - - - - - - Despreci ate t i me negat i ve val ues- - - - - - - - - - - - - - - - - - - - - - - -- %f or   i =1: l engt h( t )  

    i f   ( t ( i ) >=0)  break;  

    end end t =t ( i : l engt h( t ) ) ;  a=a( i : l engt h( a) ) ;  %- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - %f or   i =1: 28 

    f unc=(( exp( - (etha) *( t ) * (w( i ) ) ) ) . * (s i n( ( w( i ) ) * ( t ) ) ) ) ;  PSV( i ) =max(( conv(a, f unc) ) ) ;  

    end At =t ( 2) - t ( 1) ;  PSV=PSV*At ;  f r eq=w. / ( 2*pi ) ;  

    Trifunac.m

    f uncti on  [ t r i f unac]=TTr i f unac(t , a)  %Comput at i on of t he Husi d di agr am and t he Tr i f unac dur at i on,%t i empo bet ween 0. 05% and 95% f r om Husi d di agr amnor ma=t r apz( t , a. *a) ;  f or   i =2: l engt h( a) ;  

    a2=a( 1: i ) . *a( 1: i ) ;  t 2=t ( 1: i ) ;  H( i ) =t r apz( t 2, a2) ;  

    end;  H=H/ nor ma;  f or   i =2: l engt h( a) ;  

    i f   H( i )

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    24/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    24

     f uncti on  [ a_f i l t ] =But 2pol V2( a, f r eqi nf , f r eqsup, or den, f nyq)%I nput : accel er ogr am i n t i me domai n %t o be f i l t er ed %Fr equency pass- band%  Wn=[ f r eqi nf , f r eqsup] . / f nyq;

    %Const r uct i on of a But t er wor t h f i l t er wi t h or der "or den"  % comput at i on of t he coef i ci ent s b and a[ bi , ai ] =but t er ( or den, Wn) ;  

    % f i l t er i ng t he t i me si gnal  a_f i l t =f i l t f i l t ( bi , ai , a) ;  

    Offsetcleaner.m

    f uncti on  [ a_cor ] =of f set cl eaner ( a, t )At =t ( 2) - t ( 1) ;  

    p=pol yf i t ( t , a, 1) ;  f or   i =1: l engt h( a)  a_cor ( i ) =a( i ) - p( 2) - p( 1) *( i - 1) *At ;  

    end %f i rs t order f i t %%a_cor ( i ) =a( i ) - p( 2) - p( 1) *( i - 1) *At ;  %second or der f i t %%a_cor( i ) =a( i ) - p( 3) - p( 2) *t( i ) - p( 1) *t( i ) 2̂;  

    Registervisor

    Figneries.m

    f uncti on  [ f ] =f i gner i es( name, sd, pgau, pga, i a, t r , cav, pgv, psv, hous)  

    %- - - - - - - - - - - Funct i on f or gr aphi c PSV r epr esent at i on and par amet er svi sual i zat i on- - - - - - - - - - - - - %

     f f =[ 0. 15, 0. 19, 0. 23, 0. 28, 0. 34, 0. 42, 0. 52, 0. 64, 0. 78, . . .  

    0. 96, 1. 18, 1. 45, 1. 78, 2. 19, 2. 69, 3. 31, 4. 06, 4. 99, 6. 13,7. 53, . . .  

    9. 25, 11. 37, 13. 96, 17. 15, 21. 07, 25. 89, 31. 80, 39. 07] ;  

    pos=1;  maxpsv=0;  mi npsv=99999;  f or   i =1: 28 

    i f ( psv( i ) ==99999)  pos=pos+1;  

    el se i f ( maxpsv < psv( i ) )  

    maxpsv=psv( i ) ;  end i f ( mi npsv > psv( i ) )  

    mi npsv=psv( i ) ;  end 

    end end 

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    25/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    25

     %- - - - - - - - - - - - - - - - - - - - - - - - - - Def ect val ues- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - %maxpsvad=10;  mi npsvad=0. 001;  ch=1;  

    posy=1;  posx=0. 16;  xl i mi t =0. 01;  

    %- - - - - - - - - - - - - - - - - - Gr af i c par amet er s def i ni t i on- - - - - - - - - - - - - - - - - - - - - - -- - - - %i f ( ( maxpsv < 1)&&( mi npsv > 0. 001) )  

    maxpsvad=1;  mi npsvad=0. 001;  endi d=28; %t ext number s of di spl acement  i f   ( pos==1)

    i ndexa=15; %t ext numbers of accel erat i on endi a=28;

    i ndexd=13;mul t =0. 25;cw=0. 74;posx=0. 15;  xl i mi t =0. 01;  i nt ersecd=0. 01;  i nt er seca=0. 3;  post d=0. 04;  post a=15;  ch=0. 8;  posy=1. 2;  

    el se i ndexa=13; %t ext number s of accel erat i on 

    endi a=27; %t ext number s of accel erat i on i ndexd=13; %t ext number s of di spl acement  mul t =0. 1; %t ext s l l egendcw=0. 7; %wi dt h posx=0. 16; %x posi t i on xl i mi t =0. 1;  i nt ersecd=0. 003;  i nt er seca=0. 6;  post d=0. 4;  post a=15;  

    end el sei f    ( ( maxpsv > 1) &&( maxpsv < 10) )  

    maxpsvad=10;  

    mi npsvad=0. 001;  endi d=28;  i f   ( pos==1)

    i ndexa=10;  endi a=28;i ndexd=9;mul t =0. 2;cw=0. 7;posx=0. 16;  xl i mi t =0. 01;  i nt ersecd=0. 03;  i nt er seca=0. 6;  post d=0. 04;  

    post a=15;  el se i ndexa=11;  

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    26/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    26

      endi a=27;  i ndexd=13;  mul t =0. 9;  cw=0. 57;  posx=0. 23;  xl i mi t =0. 1;  

    i nt ersecd=0. 003;  i nt er seca=0. 6;  post d=0. 4;  post a=15;  

    end el sei f    ( ( maxpsv > 10) &&( maxpsv < 100) )  

    maxpsvad=100;  mi npsvad=0. 001;  endi d=28;  i f   ( pos==1)

    i ndexa=9;  endi a=28;i ndexd=7;mul t =0. 87;cw=0. 57;posx=0. 23;  xl i mi t =0. 01;  i nt ersecd=0. 03;  i nt er seca=0. 6;  post d=0. 04;  post a=15;  

    el se i ndexa=11;  endi a=27;  i ndexd=13;  mul t =0. 98;  cw=0. 43;  posx=0. 32;  xl i mi t =0. 1;  i nt ersecd=0. 003;  i nt er seca=0. 6;  post d=0. 4;  post a=15;  

    end el sei f    ( ( maxpsv > 100)&&( maxpsv < 1000) )  

    maxpsvad=1000;  mi npsvad=0. 01;  endi d=25;  i f   ( pos==1)

    i ndexa=5;  endi a=26;i ndexd=4;mul t =0. 87;cw=0. 7;posx=0. 16;  xl i mi t =0. 01;  i nt er secd=0. 3;  i nt erseca=6;  post d=0. 04;  post a=15;  

    el se i ndexa=7;  endi a=23;  i ndexd=9;  mul t =0. 98;  

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    27/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    27

      cw=0. 43;  posx=0. 32;  xl i mi t =0. 1;  i nt ersecd=0. 03;  i nt erseca=6;  post d=0. 4;  

    post a=15;  end el sei f  ( ( maxpsv < 1) &&( mi npsv < 0. 001) )  

    maxpsvad=1;  mi npsvad=0. 0001;  endi d=30;  i f   ( pos==1)

    i ndexa=15;  endi a=32;i ndexd=12;mul t =0. 1;cw=0. 7;posx=0. 16;  xl i mi t =0. 01;

     i nt ersecd=0. 003;  i nt er seca=0. 06;  post d=0. 04;  post a=15;  

    el se i ndexa=13;  endi a=28;  i ndexd=14;  mul t =0. 1;  cw=0. 57;  posx=0. 23;  xl i mi t =0. 1;  i nt ersecd=0. 001;  i nt er seca=0. 3;  post d=0. 4;  post a=15;  

    end end angl e=45;  

    %- - - - - - - - - - - - - - - - - - - - - - - - Gr aphi c edi t i on- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - %

     f =f i gur e;  r esol ut i on=get ( 0, ' Moni t or posi t i on' ) ;  

    r esol ut i on( 1) =r esol ut i on( 1) +50;  r esol ut i on( 2) =r esol ut i on( 2) +50;  r esol ut i on( 4) =700;  r esol ut i on( 3) =494;  se t ( f , ' Pos i t i on' , resol ut i on) ;  axs=axes;  pl ot ( f f ( pos: 28) , psv( pos: 28) , ' Li neWi dt h' , 3) ;  xl abel ( ' Frequency ( Hz) ' , ' Font Wei ght ' , ' Bol d' ) ;  yl abel ( ' Vel oci t y ( cm/ s)' , ' Font Wei ght ' , ' Bol d' ) ;  set ( axs, ' XScal e' , ' l og' , ' YScal e' , ' l og' , ' XGr i d' , ' on' , ' Ygr i d' , ' on' , ' XLi m', [ xl i mi t 100] , ' YLi m' , [ mi npsvad maxpsvad] , ' Pos i t i on' , [ posx posy*0. 23 cwch*0. 5] ' , ' Font Wei ght ' , ' Bol d' ) ;  

    %- - - - - - - - - - - - - - - - - - - Par amet er s vi sual i zat i on- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - %  

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    28/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    28

    l abel 12=ui cont r ol ( ' Sty l e' , ' Edi t ' , ' Uni t s ' , ' nor mal i zed' , ' Pos i t i on' , [ 0. 060. 13 0. 4 0. 021] , ' St r i ng' , [ ' Recor d Dur at i on ( s) : '  num2st r ( sd) ] , ' Font Si ze' , 8, ' BackgroundCol or ' , [ 1 11] , ' Font Name' , ' Ar i al ' , ' Font Wei ght ' , ' bol d' ) ;  l abel =ui cont r ol ( ' Sty l e' , ' Edi t ' , ' Uni t s ' , ' nor mal i zed' , ' Pos i t i on' , [ 0. 060. 1 0. 4 0. 021] , ' St r i ng' , [ ' r aw PGA ( cm/ s 2̂) : '  

    num2st r ( pgau) ] , ' Font Si ze' , 8, ' BackgroundCol or ' , [ 1 11] , ' Font Name' , ' Ar i al ' , ' Font Wei ght ' , ' bol d' ) ;  l abel 2=ui cont r ol ( ' St yl e' , ' Edi t ' , ' Uni ts ' , ' nor mal i zed' , ' Pos i t i on' , [ 0. 060. 05 0. 4 0. 021] , ' St r i ng' , [ ' PGA ( cm/ s 2̂) : '  num2st r ( pga) ] , ' Font Si ze' , 8, ' Backgr oundCol or ' , [ 1 11] , ' Font Name' , ' Ar i al ' , ' Font Wei ght ' , ' bol d' ) ;  l abel 4=ui cont r ol ( ' St yl e' , ' Edi t ' , ' Uni ts ' , ' nor mal i zed' , ' Pos i t i on' , [ 0. 060. 02 0. 4 0. 021] , ' St r i ng' , [ ' Ar i as i nt ensi t y ( cm/ s) : '  num2st r ( i a) ] , ' Font Si ze' , 8, ' BackgroundCol or ' , [ 1 11] , ' Font Name' , ' Ar i al ' , ' Font Wei ght ' , ' bol d' ) ;  l abel 6=ui cont r ol ( ' St yl e' , ' Edi t ' , ' Uni ts ' , ' nor mal i zed' , ' Pos i t i on' , [ 0. 550. 13 0. 4 0. 021] , ' St r i ng' , [ ' Tr i f unac dur at i on ( s): '  num2st r ( t r ) ] , ' Font Si ze' , 8, ' BackgroundCol or ' , [ 1 11] , ' Font Name' , ' Ar i al ' , ' Font Wei ght ' , ' bol d' ) ;

     l abel 8=ui cont r ol ( ' St yl e' , ' Edi t ' , ' Uni ts ' , ' nor mal i zed' , ' Pos i t i on' , [ 0. 550. 1 0. 4 0. 021] , ' St r i ng' , [ ' CAV ( cm/ s) : '  num2st r ( cav) ] , ' Font Si ze' , 8, ' Backgr oundCol or ' , [ 1 11] , ' Font Name' , ' Ar i al ' , ' Font Wei ght ' , ' bol d' ) ;  l abel 10=ui cont r ol ( ' Sty l e' , ' Edi t ' , ' Uni t s ' , ' nor mal i zed' , ' Pos i t i on' , [ 0. 550. 05 0. 4 0. 021] , ' St r i ng' , [ ' PGV ( cm/ s) : '  num2st r ( pgv) ] , ' Font Si ze' , 8, ' Backgr oundCol or ' , [ 1 11] , ' Font Name' , ' Ar i al ' , ' Font Wei ght ' , ' bol d' ) ;  l abel 14=ui cont r ol ( ' Sty l e' , ' Edi t ' , ' Uni t s ' , ' nor mal i zed' , ' Pos i t i on' , [ 0. 550. 02 0. 4 0. 021] , ' St r i ng' , [ ' Housner i nt ensi t y ( cm) : '  num2st r ( hous) ] , ' Font Si ze' , 8, ' BackgroundCol or ' , [ 1 11] , ' Font Name' , ' Ar i al ' , ' Font Wei ght ' , ' bol d' ) ;  

    vd=[ 10000 6000 3000 1000 600 300 100 60 30 10 6 3 1 0. 6 0. 3 0. 1 0. 060. 03 0. 01 0. 006 0. 003 0. 001 0. 0006 0. 0003 0. 0001 0. 00006 0. 000030. 00001 0. 000006 0. 000003 0. 000001 0. 0000006 0. 0000003 0. 0000001] ;  va=[ 100000 600000 300000 100000 60000 30000 10000 6000 3000 1000 600300 100 60 30 10 6 3 1 0. 6 0. 3 0. 1 0. 06 0. 03 0. 01 0. 006 0. 003 0. 0010. 0006 0. 0003 0. 0001 0. 00006 0. 00003 0. 00001 0. 000006 0. 000003] ;  f w=l ogspace( - 2, 2, 5000) ;  hol d;  f or   i =1: l engt h( vd)  

    vdv=2*pi *vd( i ) *f w;  i f ( vd( i ) ==i nt er secd)  

    pl ot ( f w, vdv, ' k' , ' Li neWi dt h' , 2) ;  vdr =vdv;

     el se pl ot ( f w, vdv, ' k' ) ;  

    end end f or   i =1: l engt h( va)  

    vda=va( i ) . / ( f w*2*pi ) ;  i f ( va( i ) ==i nt er seca)  

    pl ot ( f w, vda, ' k' , ' Li neWi dt h' , 2) ;  var =vda;  

    el se pl ot ( f w, vda, ' k' ) ;  

    end end 

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    29/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    29

    %- - - - - - - - - - - - - - Pl ot l egends- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - %

     t ext ( post d, maxpsvad- maxpsvad*mul t , ' Di spl acement( cm) ' , ' Font Wei ght ' , ' Bol d' , ' Rot at i on' , 360- angl e) ;  t ext ( post a, maxpsvad- maxpsvad*mul t , ' Accel er at i on

    (g) ' , ' Font Wei ght ' , ' Bol d' , ' Hor i zont al Al i gnment ' , ' Ri ght ' , ' Rot at i on' , angle) ;  

    %- - - - - - - - - Text of di spl acement s- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - %  

    f or   i =i ndexd: endi d vdv=2*pi *vd( i ) *f w;  di f =abs( var ( 1) - vdv(1)) ;  r i =1;  f or   j =2: l engt h( var )  

    i f   (abs(var( j ) - vdv( j ) )

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    30/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    30

     f i d=f open( par amf i l e, ' r ' ) ;  i f ( f i d==- 1)  

    er r or dl g( ' Er r or openi ng t he par amet er s f i l e' , ' Fi l e er r or ' ) ;  return;  

    end 

    L=l engt h( par amf i l e) ;  i =0;  whi l e  ( ( par amf i l e( L- i ) ~=' / ' ) &&( par amf i l e( L- i ) ~=' \ ' ) )  

    i =i +1;  end pat hname=paramf i l e(1: L- i ) ;  

    %Si t uat e on t he r i gt h l i ne f or   i =1: ( n_l i ne- 1)  

    t l i ne=f get s( f i d) ;  end 

    name=f scanf ( f i d, ' %s' ,1 ) ;  sd=f scanf ( f i d, ' %f ' ,1 ) ;  pgau=f scanf ( f i d, ' %f ' ,1 ) ;  pga=f scanf ( f i d, ' %f ' , 1) ;  i a=f scanf ( f i d, ' %f ' ,1 ) ;  t r =f scanf ( f i d, ' %f ' ,1 ) ;  cav=f scanf ( f i d, ' %f ' , 1) ;  pgv=f scanf ( f i d, ' %f ' , 1) ;  f or   i =1: 28 

    psv( i ) =f scanf ( f i d, ' %f ' ,1 ) ;  end hous=f scanf ( f i d, ' %f ' ,1 ) ;  

    f =f i gner i es( name, sd, pgau, pga, i a, t r , cav, pgv, psv, hous) ;  

    %%%%%%%Pl ot accel erat i on t i me- ser i es i n t he same graphi c 

    t i me_f i l e=cat ( 2, pathname, cat ( 2, name(1: 4) , ' \ ' ) ) ;  t i me_f i l e=cat ( 2, t i me_f i l e, cat ( 2, name( 5: 6) , ' \ ' ) ) ;  t i me_f i l e=cat ( 2, t i me_f i l e, cat ( 2, name( 7: 8) , ' \ ' ) ) ;  t i me_f i l e=cat ( 2, t i me_f i l e, name) ;  i f   ( exi st ( t i me_f i l e) ==0)  

    msgbox( ' Can not f i nd accel er at i on r ecor d' , ' I nf o' , ' er r or ' ) ;  f cl ose( ' al l ' ) ;  return;  

    end Dat os=l oad( t i me_f i l e) ;  t =Dat os( : , 1) ;  a=Dat os( : , 2) ;  axs1=axes;  set ( axs1, ' Pos i t i on' , [ 0. 16 0. 8 0. 7 0. 15] ) ;  pl ot ( axs1, t , a) ;  set ( axs1, ' YLi m' , [ mi n( a) - 1 max( a) +1] ) ;  t i t l e(axs1, [ ' Accel er at i on and PSV 5% - - - '  name] , ' Font Wei ght ' , ' Bol d' , ' Font Si ze' , 10, ' Col or ' , ' b' ) ;  xl abel ( axs1, ' Ti me ( s) ' , ' Font Si ze' , 7, ' Font Wei ght ' , ' Bol d' ) ;  yl abel ( axs1, ' Accel er at i on ( cm/ s 2̂) ' , ' Font Si ze' , 7, ' Font Wei ght ' , ' Bol d' ) ;  

    name=( [ pat hname name( 1: 8) ' - '   name( 10: 15) ' - '   name( 17: 24) ' - '  name( 26: 27) ' - '   name( 29: 31) ' . j pg' ] ) ;  se t ( f , ' PaperPosi t i onMode' , ' aut o' )  

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    31/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    31

    pr i nt ( ' - f ' , ' - dj peg' , ' - r 250' , name) ;  cl ose( f ) ;  f cl ose( f i d) ;  

    pathdef.m

    f uncti on  p = pat hdef  %PATHDEF Sear ch pat h def aul t s.  % PATHDEF r eturns a st r i ng t hat can be used as i nput t o MATLABPATH % i n or der t o set t he pat h.  

    % Copyr i ght 1984- 2002 The Mat hWorks, I nc.  % $Revi si on: 1. 4. 2. 1 $ $Date: 2003/ 01/ 16 12: 51: 34 $ 

    % DO NOT MODI FY THI S FI LE. I T I S AN AUTOGENERATED FI LE.% EDI TI NG MAY CAUSE THE FI LE TO BECOME UNREADABLE TO

    % THE PATHTOOL AND THE I NSTALLER.  p = [ . . .  %%% BEGI N ENTRI ES %%%  ' E: \ VERSI O2\ Mat l ab; ' , . . .  

    mat l abr oot , ' \ t ool box\ mat l ab\ gener al ; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ ops; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ l ang; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ el mat ; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ el f un; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ specf un; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ mat f un; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ dat af un; ' , . . .  

    mat l abr oot , ' \ t ool box\ mat l ab\ pol yf un; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ f unf un; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ spar f un; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ scr i be; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ gr aph2d; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ gr aph3d; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ specgr aph; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ gr aphi cs; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ ui t ool s; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ str f un; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ i magesci ; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ i of un; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ audi ovi deo; ' , . . .  

    mat l abr oot , ' \ t ool box\ mat l ab\ t i mef un; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ dat at ypes; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ verct r l ; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ codet ool s; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ hel pt ool s; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ wi nf un; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ demos; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ t i meser i es; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ hds; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ gui de; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ pl ot t ool s; ' , . . .  mat l abr oot , ' \ tool box\ l ocal ; ' , . . .  mat l abr oot , ' \ t ool box\ shar ed\ cont ro l l i b; ' , . . .  mat l abr oot , ' \ t ool box\ compi l er ; ' , . . .

     mat l abr oot , ' \ tool box\ s i gnal \ s i gnal ; ' , . . .  mat l abr oot , ' \ tool box\ s i gnal \ s i gt ool s ; ' , . . .  

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    32/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    32

      mat l abr oot , ' \ t ool box\ s i gnal \ spt ool gui ; ' , . . .  mat l abr oot , ' \ t ool box\ si gnal \ si gdemos; ' , . . .  mat l abr oot , ' \ t ool box\ shar ed\ spcui l i b; ' , . . .  mat l abr oot , ' \ t ool box\ shar ed\ dast udi o; ' , . . .  mat l abr oot , ' \ work; ' , . . .  

    %%% END ENTRI ES %%%

      . . .  ] ;  

    p = [ userpath, p] ;  

    read_param.m

    f uncti on  p = pat hdef  %PATHDEF Sear ch pat h def aul t s.  % PATHDEF r eturns a st r i ng t hat can be used as i nput t o MATLABPATH % i n or der t o set t he pat h.  

    % Copyr i ght 1984- 2002 The Mat hWorks, I nc.  % $Revi si on: 1. 4. 2. 1 $ $Date: 2003/ 01/ 16 12: 51: 34 $ 

    % DO NOT MODI FY THI S FI LE. I T I S AN AUTOGENERATED FI LE.% EDI TI NG MAY CAUSE THE FI LE TO BECOME UNREADABLE TO% THE PATHTOOL AND THE I NSTALLER.  

    p = [ . . .  %%% BEGI N ENTRI ES %%%  ' E: \ VERSI O2\ Mat l ab; ' , . . .  

    mat l abr oot , ' \ t ool box\ mat l ab\ gener al ; ' , . . .  

    mat l abr oot , ' \ t ool box\ mat l ab\ ops; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ l ang; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ el mat ; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ el f un; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ specf un; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ mat f un; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ dat af un; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ pol yf un; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ f unf un; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ spar f un; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ scr i be; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ gr aph2d; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ gr aph3d; ' , . . .  

    mat l abr oot , ' \ t ool box\ mat l ab\ specgr aph; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ gr aphi cs; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ ui t ool s; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ str f un; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ i magesci ; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ i of un; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ audi ovi deo; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ t i mef un; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ dat at ypes; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ verct r l ; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ codet ool s; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ hel pt ool s; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ wi nf un; ' , . . .  

    mat l abr oot , ' \ t ool box\ mat l ab\ demos; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ t i meser i es; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ hds; ' , . . .  

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    33/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    33

      mat l abr oot , ' \ t ool box\ mat l ab\ gui de; ' , . . .  mat l abr oot , ' \ t ool box\ mat l ab\ pl ot t ool s; ' , . . .  mat l abr oot , ' \ tool box\ l ocal ; ' , . . .  mat l abr oot , ' \ t ool box\ shar ed\ cont ro l l i b; ' , . . .  mat l abr oot , ' \ t ool box\ compi l er ; ' , . . .  mat l abr oot , ' \ tool box\ s i gnal \ s i gnal ; ' , . . .  

    mat l abr oot , ' \ tool box\ s i gnal \ s i gt ool s ; ' , . . .  mat l abr oot , ' \ t ool box\ s i gnal \ spt ool gui ; ' , . . .  mat l abr oot , ' \ t ool box\ si gnal \ si gdemos; ' , . . .  mat l abr oot , ' \ t ool box\ shar ed\ spcui l i b; ' , . . .  mat l abr oot , ' \ t ool box\ shar ed\ dast udi o; ' , . . .  mat l abr oot , ' \ work; ' , . . .  

    %%% END ENTRI ES %%%  . . .  ] ;  

    p = [ userpath, p] ;  

    registervisorV9.m

    f uncti on  r egi st er vi sor V9( acti on)  

    gl obal   ct r l ;  

    i f ( nargi n

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    34/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    34

    % f unct i on named CALLBACK i n REGVI SOR. M wi t h t he gi ven i nputar guments.  %% REGVI SOR( ' Proper t y' , ' Val ue' , . . . ) cr eat es a new REGVI SOR orr ai ses t he % exi sti ng si ngl et on*. St ar t i ng f r om t he l ef t , pr oper t y val ue

    pai r s ar e % appl i ed t o t he GUI bef or e Regvi sor _Openi ngFunct i on get s cal l ed.An % unrecogni zed pr opert y name or i nval i d val ue makes propert yappl i cat i on % st op. Al l i nput s ar e passed t o Regvi sor _Openi ngFcn vi avar ar gi n.  %% *See GUI Opt i ons on GUI DE' s Tool s menu. Choose "GUI al l owsonl y one % i nst ance t o r un ( si ngl et on) ".  %% See al so: GUI DE, GUI DATA, GUI HANDLES 

    % Edi t t he above t ext t o modi f y t he response t o hel p Regvi sor  

    % Last Modi f i ed by GUI DE v2. 5 04- Oct - 2007 12: 50: 20 

    % Begi n i ni t i al i zat i on code - DO NOT EDI T gui _Si ngl et on = 1;  gui _Stat e = st r uct ( ' gui _Name' , mf i l ename, . . .  

    ' gui _Si ngl et on' , gui _Si ngl et on, . . .  ' gui _Openi ngFcn' , @Regvi sor _Openi ngFcn, . . .  ' gui _Out put Fcn' , @Regvi sor _Output Fcn, . . .  ' gui _Layout Fcn' , [ ] , . . .  ' gui _Cal l back' , [ ] ) ;  

    i f   nar gi n && i schar( var argi n{1})  gui _Stat e. gui _Cal l back = st r 2f unc( var ar gi n{1}) ;  end 

    i f   nargout  [ var ar gout {1: nar gout }] = gui _mai nf cn( gui _Stat e, var ar gi n{: }) ;  

    el se gui _mai nf cn( gui _St at e, var ar gi n{: }) ;  

    end % End i ni t i al i zat i on code - DO NOT EDI T 

    % - - - Execut es j ust bef or e Regvi sor i s made vi si bl e. f uncti on  Regvi sor_Openi ngFcn( hObj ect , event data, handl es, var argi n)  

    % Thi s f unct i on has no out put ar gs, see Out put Fcn.  % hObj ect handl e t o f i gur e % event data r eserved - t o be def i ned i n a f ut ur e ver si on of MATLAB % handl es st r uct ure wi t h handl es and user data ( see GUI DATA)  % varargi n command l i ne argument s t o Regvi sor ( see VARARGI N)  

    % Choose def aul t command l i ne out put f or Regvi sor  handl es. out put = hObj ect ;  

    % Updat e handl es st r uct ur e gui dat a( hObj ect , handl es) ;  

    % UI WAI T makes Regvi sor wai t f or user r esponse ( see UI RESUME)  % ui wai t ( handl es. f i g) ;  

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    35/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    35

     

    % - - - Out put s f r om t hi s f unct i on ar e r et ur ned t o t he command l i ne.  f uncti on  varar gout = Regvi sor_Out put Fcn( hObj ect , event data, handl es)% var ar gout cel l ar r ay f or r etur ni ng out put ar gs ( see VARARGOUT) ;  % hObj ect handl e t o f i gur e 

    % event data r eserved - t o be def i ned i n a f ut ur e ver si on of MATLAB % handl es st r uct ure wi t h handl es and user data ( see GUI DATA)  

    % Get def aul t command l i ne out put f r omhandl es st r uct ur e var argout {1} = handl es. out put ;  

    % - - - Execut es on sel ect i on change i n l b.  f uncti on  l b_Cal l back(hObj ect , event dat a, handl es)  % hObj ect handl e t o l b ( see GCBO)  % event data r eserved - t o be def i ned i n a f ut ur e ver si on of MATLAB % handl es st r uct ure wi t h handl es and user data ( see GUI DATA)  

    % Hi nt s: cont ent s = get ( hObj ect, ' St r i ng' ) r et ur ns l b cont ent s as cel larray % cont ent s{get ( hObj ect, ' Val ue' ) } r et ur ns sel ected i t em f r om l b 

    % - - - Execut es dur i ng obj ect creat i on, af t er set t i ng al l pr oper t i es.  f uncti on  l b_Cr eat eFcn( hObj ect , event dat a, handl es)  % hObj ect handl e t o l b ( see GCBO)  % event data r eserved - t o be def i ned i n a f ut ur e ver si on of MATLAB % handl es empt y - handl es not cr eat ed unt i l af t er al l Cr eat eFcnscal l ed 

    % Hi nt : l i st box cont r ol s usual l y have a whi t e backgr ound on Wi ndows.  % See I SPC and COMPUTER.  i f   i spc && i sequal ( get ( hObj ect , ' Backgr oundCol or ' ) ,get ( 0, ' def aul t Ui cont r ol Backgr oundCol or ' ) )  

    set ( hObj ect , ' BackgroundCol or ' , ' whi t e' ) ;  end 

    % - - - Execut es on but t on pr ess i n pb1.  f uncti on  pb1_Cal l back( hObj ect , event dat a, handl es)  % hObj ect handl e t o pb1 ( see GCBO)  % event data r eserved - t o be def i ned i n a f ut ur e ver si on of MATLAB % handl es st r uct ure wi t h handl es and user data ( see GUI DATA)

     

    % - - - Execut es on but t on pr ess i n pb2.  f uncti on  pb2_Cal l back( hObj ect , event dat a, handl es)  % hObj ect handl e t o pb2 ( see GCBO)  % event data r eserved - t o be def i ned i n a f ut ur e ver si on of MATLAB % handl es st r uct ure wi t h handl es and user data ( see GUI DATA)  

    % - - - Execut es on but t on pr ess i n pb3.  f uncti on  pb3_Cal l back( hObj ect , event dat a, handl es)  % hObj ect handl e t o pb3 ( see GCBO)  % event data r eserved - t o be def i ned i n a f ut ur e ver si on of MATLAB % handl es st r uct ure wi t h handl es and user data ( see GUI DATA)  

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    36/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    36

     

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    37/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    37

      Appendix B: User manual for the sof tware of seismic data calculation with in theNeries project: Paramacc

    User manual for the software of seismic data calculation wi thin

    the Neries project – February 2010

    1-Installing the software

    This application can be used under Windows and Unix platforms for users whohave and do not have MATLAB installed. Therefore we can distinguish 4 types ofusers:

    -Windows with Matlab.-Windows without Matlab.-Unix with Matlab.

    1.1-Windows platform with MATLAB

    If your PC uses Windows and you are going to run this application withMATLAB, copy all files *.m, *.fig attached in the zipped file paramaccV7_Matlabs.zip toyour working directory. Note that if your working directory is not the same that MATLABuses as default (“C:\Program Files\MATLAB\Version\work”), you must change theMATLAB path with the option “Current Directory” in the menu toolbar. To run theapplication type the following at the MATLAB command prompt:

    >> paramaccV9

    1.2-Windows platform without MATLAB

    Install the MCR (MATLAB Component Runtime) by running theMCRinstaller.exe placed in the folder \MCR. This will allow you to run the applicationwithout MATLAB. Copy *.CTF and *.exe of the zipped file paramaccV9_compiled.zip toyour working directory. If you are not a Windows XP user, add the following directory toyour system path:

    C:\\version\runtime\win32

    Run the application double clicking in the file paramaccV9.exe.

    1.3-Unix platform wi th MATLAB

    Follow the same instructions done in the paragraph 1.1.

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    38/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    38

     

    2-User manual

    This application allows the calculation of accelerograms’ parameters according

    to the agreements taken in the Neries project. These records are registered in an inputfile and with a specific format that makes impossible to use another file format to runthe program. As a result of the calculation process, an output file will be generated withthe parameters for each record. This last file is the one required for the visualizationapplication (registervisor).

    2.1-The window

    When executing the application a window like this is displayed:

    The window has the following elements: four action buttons (right side), a boxwith a list of new records, a text box to display additional information and an option boxwith a pop-up menu, a selection button, a check button and a small text box.

    The list box contains all the new processable records and the text box below(“Information”) displays the work in process. The two boxes to the left are only forshowing process information to the user.

    The different buttons start the following actions:

    -The “Open event_table file” button opens a browse dialog to choose the file*.m, *.dat or *.txt which contains data related to the input records. This file willusually have the standard name “events_table.txt”.

    -The “Process” button starts the parameters computation according to theoptions chosen in the “Options” box. The “Options” box allows the user to:

    -Make an offset correction of the original record to improve the outputresults when the button “Offset correction” is selected.

    -Select a continuous process or a process with interruptions with the

    pop-up menu. The parameter data and the intermediate time-histories(acceleration, velocity and displacement) calculated for the last recordwill de displayed at each stop and the user will be able to check them in

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    39/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    39

    a screen plot. The number of records processed between stops ischosen in the “Stop” text box below.

    -Save intermediate time-histories (acceleration, velocity anddisplacement) with “Save time series”.

    -The “Repeat” button recomputes the records that have been processed beforewith the button “Process” when the user doesn’t agree with results and wants tochange any option. This function is only available when a process with stops ischosen.

    -The “Close” button ends the application.

    2.2-Instructions 

    For a normal execution of the application follow the instructions listed below:

    -Click “Open event_table file” to choose your input event file. In the same foldershould be located the “parameters_table.txt”. If there is no parameters file, anew “parameters_table.txt” will be created and it will be supposed that all therecords are computed for the first time.When a file “parameters_table.txt” exists in the folder, the application will add tothe file the results for new records not processed before. The applicationcompares the records in the input file “events_table.txt” and the ones in“parameters_table.txt”.The new records should be placed at the end of the events file“events_table.txt” to make a more understandable process.

    -The window “New records” displays the new records to process, which are the

    ones not found in the “parameters_table.txt”. Before processing you can chooseto:

    -Apply an offset correction to the new record.

    -Process all the new records at once.

    -Process a number of records entered in the text box “Stop” with thepossibility of checking the last one.

    -Save time-histories of each record processed in a folder chosen by theuser.

    -Click “Process” to start processing according to the options before.

    -If a continuous process has been chosen, the application will computeall new records adding the new calculated parameters at the end of the“parameters_table.txt”. Offset correction will be applied if chosen andeach record’s time-histories will be saved in a new file if “Save timeseries” had also been chosen.

    -If a stop while processing has been chosen (“Stop each…”) you must fillthe text box “Stop” with the number of records processed betweeninterruptions. Offset correction will be applied to this number of records ifchosen and time-histories will be saved if “Save time series” is activated.

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    40/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    40

    Once the application stops to display the parameters and time-histories,you can change the options. At this point two choices exist:

    -If you agree with previous results, click “Process” to save newcalculated parameters and to restart computing next records.Time-histories will have been saved before clicking “Process” if“Save time series” was activated.

    -If you don’t agree with previous results displayed during thestop, you may change the options (for example, apply offsetcorrection if it wasn’t applied) and then click “Repeat” toreprocess the parameters of all records until last stop. If theoption “Stop each…” is still selected with the same number in“Stop”, the application will stop at the same record and willdisplay the new results. If you agree, click “Process” to save andfollow processing according to the options.New calculated time-histories will overwrite the last ones if “Save

    time series” was activated and you click on “Repeat” button.

    In any stop you can enable or disable the option “Save time series”.Consequently, from that moment the time-histories will start or stopbeing saved.

    -Click “close” to end the application.

    Finally, in the menu bar there is the option “Help” that simply opens thisdocument in order to offer the necessary instructions to people who had not initialaccess to this document.

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    41/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

    41

      Appendix C: User manual for the software of seismic data visual ization withinthe Neries project: Registervisor

    User manual for the software of seismic data visualization

    within the Neries project

    1-Installing the software

    This application can be used under Windows and Unix platforms for users whohave and do not have MATLAB installed. Therefore we can distinguish 4 types ofusers:

    -Windows with Matlab.-Windows without Matlab.-Unix with Matlab.

    1.1-Windows platform with MATLAB

    If your PC uses Windows and you are going to run this application withMATLAB, copy all files *.m, *.fig attached in the zipped file registervisor_Matlabs.zip toyour working directory. Note that if your working directory is not the same that MATLABuses as default (“C:\Program Files\MATLAB\Version\work”), you must change theMATLAB path with the option “Current Directory” in the menu toolbar. To run theapplication type the following at the MATLAB command prompt:

    >> registervisorV9

    1.2-Windows platform without MATLAB

    Install the MCR (MATLAB Component Runtime) by running theMCRinstaller.exe placed in the folder \MCR. This will allow you to run the applicationwithout MATLAB. Copy *.CTF and *.exe of the zipped file registervisor_compiled.zip toyour working directory. If you are not a Windows XP user, add the following directory toyour system path:

    C:\\version\runtime\win32

    Run the application double clicking in the file registervisorV9.exe.

    1.3-Unix platform wi th MATLAB

    Follow the same instructions done in the paragraph 1.1.

  • 8/9/2019 NA5 D4 PartI Updated Feb 2010

    42/42

    NA5 + D4: ACCELEROMETRIC PARAMETERS COMPUTATION AND EXCHANGE

     

    2-User manual  

    This application must be only used to display the results of the parameters

    calculated with Neries software. This means that only the files generated with theNeries software will be read correctly.

     A window like this one is shown when the application is executed:

    The window contains three buttons, a list box and a smaller text box. Theinstructions to display the parameters are the following:

    -Click the “Open parameters file” button to browse and choose your file“parameters_table.txt” that can be also in *.dat or *.m extension. Rememberthat the format of input files must be correct and only files generated with theNeries software should be used.

    -The program will read all the events included in the file and will show theirnames in the list box. The text box named “Current file” contains the path ofinput file.

    -Select the records you want to display by highlighting elements in the listwindow. Click “View” button to display the parameters. This process can berepeated indefinitely.

    -For each event displayed an image event_name.jpg will be saved in the samefolder that the input file. The image shows record duration, PGA, correctedPGA, Arias intensity, Trifunac duration, CAV, PGV, Housner intensity and aPSV plot at 28 frequencies from 0.15 to 39Hz.

    -Click “Close” button to end the program.

    Finally, in the menu bar there is the option “Help” that simply opens thisdocument in order to offer the necessary instructions to people who had not initialaccess to this document.