Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

With command : python calculate_ims.py ../BB.bin b -o /home/yzh231/ -i Albury_666_999 -r Albury -t s -v 18p3 -n 112A CMZ -m PGV pSA -p 0.02 0.03 -e -c geom -np 2

  • input file path: ../BB.bin
  • b: input file type is binary
  • -o: output result csvs location is /home/yzh231, default is /home/$user
  • -i: unique identifier/runname of the simrun and output folder name are Albury_666_999, default is 'all_station_ims'. This attribute will be stored in the meta data file.
  • -r: rupture name is Albury, default is unknown. This attribute will be stored in the meta data file.
  • -t: type of simrun is  simulated, default is unknown. This attribute will be stored in the meta data file.
  • -v: version of simrun is v18p3, default is XXpY. This attribute will be stored in the meta data file.
  • -n: station names used to perform im claculation are 112A  and CMZ 112A, default is all the stations in the binary file
  • -m: measures used to perform im calculation are PGV  and pSA, default is all the measures
  • -p: period of pSA used to perform im calculation are 0.02 0.03, default is Karim's 15 periods
  • -e: In addition to the period specified by -p option, use extended 100 period of pSA, default not using
  • -c: component of waveform acceleration used to perform im calculation is geom, default is '090, 000, ver'
  • -np: number of processors used to perform im calculation is 2, default is 2

...

  • 'Albury_666_999' is the folder that contains all outputs. The folder name 'Albury_666_999' is made of the string specified by the '-i' argument. Default is 'all_station_ims' if  not specified.
  • 'Albury_666_999.csv' is the summary csv file that contains all stations' im calculations. The summary file name is made of the string specified by the '-i' argument.
  • 'Albury_666_999_imcalc.meta_info' is the meta data file. The meta data file name is made of the string specified by the '-i' argument.
  • 'station' is the folder that contains all individual station's im_calculations. The folder name is defaulted and cannnot be specified by the user.
  • '112A_geom.csv' is the individual csv file that contains geom component im calculation for station 112A. Each name of the individual station csv file name is made of  station_name + component 

Image RemovedImage Added

TEST FOR CALCUALTE_IMS.PY

...

  1. Follow the instruction in Binary Workflow FAQ, we can generate single waveform files. These waveforms are intended for the testing of ascii functionality of calculate_ims.py. Open a python cell

    Code Block
    languagepy
    from qcore.timeseries import BBSeis
    bb = BBSeis('/nesi/transit/nesi00213/RunFolder/daniel.lagrava/Kelly_VMSI_Kelly-h0p4_EMODv3p0p4_180531/BB/Cant1D_v2-midQ_leer_hfnp2mm+_rvf0p8_sd50_k0p045/Kelly_HYP01-03_S1244/Acc/BB_with_siteamp.bin')
    bb.all2txt(self, prefix='/home/$user/benchmark_im_sim_waveforms/', f='acc'):


    Now we have all the wavefomswaveforms

3. Create Test Folder

  1. Create The test folder structure follows Testing Standards for ucgmsim Git repositories
  2. Select 10 stations you want to test and cp corresponding waveforms files to the singel_files directory as below
  3. Copy the source binary file 'BB_with_siteamp.bin' to the input folder
  4. Run 'write_benchmark_csv(sample_bench_path)' function inside test_calculate_ims.py to generate 'new_im_sim_benchmark.csv', where 'sample_bench_path' is the folder we created in 1.4 Generate summary_benchmark: benchmark_im_sims. This function should only be run once for each binary file.

...