GitHub URL:   https://github.com/ucgmsim/qcore

What is this repo about?

Commonly used functions that can be shared by code from different repositories.


Repo status

README presentNo
Is Public?Yes

Number of commits

789

Last time Updated

April 4 2019


Functionalities

  • Description: State how this function is used or interacts with other sw components.
  • Status: (1: not working, 2: unstable, 3: works under specific condition, 4: works with known issues, 5: perfect )
  • Tests: (1: none, 2: broken/outdated. 3: with limited coverage, 4: works with known issues, 5: perfect)
  • Doc (1: none, 2: outdated,  3: with limited coverage, 4: mostly ok, 5: perfect)  Give a link
  • Frequency of use: Daily, Weekly, Monthly, Yearly, Never
  • Frequency of code/req. change: Daily, Weekly, Monthly, Yearly, Never
  • Bus Factor: Number of people that are familiar with the code (1-7)
FunctionalityDescriptionStatusKnown issuesTests?Doc?Frequency of useFrequency of code/req. changeBus Factor
setup.pyCan install itself under site_packages5
11Daily - WeeklyMonthly-Yearly7

config.py

Determines the machine type and loads its associated configuration in HPC environment. (Even if it is not Maui/Mahuika it loads a default configuration)5

3

(self evident)



7
binary_version.pyReturns the path of the executables for a given version specified in the config5

3

(comments)



7
constants.pyDefault constants4Work in progress. More constants can be added

3

(comments)



7
empdb.pyFrom an HDF5 formatted empdb,
  1. load hazard curve data for a given station / IM
  2. load dead data grid for a given station / IM
  3. Return top contributing faults to hazard for a specified IM and exceedance
5
1

3

(comments)



2
formats.py

Misc. functions/classes related to data loading

  1. Loading IM file
5For what it is, it appears ok (but this is better be expanded or relocated)

3

(comments)



7
gen_coords.pyGenerate coordinate files for an emod3d domain (set of grid points)4

params_vel.py deprecated.

Move to Pre-processing.

3

3

(comments)

Monthly

(srfinfo2vm and nhm2vm)



7
geo.pyA set of functions for geometric calculation and conversions4The code is mature and well-tested, but use of docstring for comment desirable.4

3

(comments)

Weekly

(Pre-processing, GMSimViz, xyts..)


1
gmt.py / gmt_test.pyGMT wrappers4

grid dx and dy should be by default automatically calculated

consistency among accessory functions' working directory logic

add support for different interpolation methods (xyz2grd, surface, nearestneighbour etc...)

avg_ll calculated elsewhere should be local function that works over equator

3

3

(comments)

WeeklyWeekly2
im.pyLoad a csv file containing IM data and reorder4Could merge with the load_im_file() in formats.py1

3

(comments)

Weekly

(slurm_gm_workflow & Empirical_Engine)

Never5
imdb.pyIMDB access api that was created by imdb_create.py4IMDB format may be subject to change.1

3

(comments)

Daily

(Seisfinder2, gm_selection, ground_failure)

Weekly3
mpl.pyFunctions related to Matplotlib plotting5(code updated a year ago but used daily : must be solid)1

3

(comment)

Daily

(Seisfinder2, visualisation, techplatform2, pwavemethod)

Yearly4
nputil.pyargserach: find the index of elements of one array in another array if found5Solid, but if the example from stack overflow is added, it will be easier to understand. Should it be here?1

3

(comment)

Weekly

(validation, visualisation)

Yearly7
pool_wrapperWrapper to facilitate multiprocessing5Solid1

1

(not even comment)

Weekly

(IM_calculation, Pre-processing)

Yearly7
shakemap_grid.pyGenerates shake-up header using given values for PAGER4Solid, but should it be here?1

Rarely2
shared.pyMiscellaneous generic functions4

There are other function/scripts of the same name in GroundFailure and createSRF

slurm_gm_workflow has a duplicate shared.py


is_virtual_station : can be removed. Not used by other un-archived repos except visualisation

1

Weekly

get_stations: slurm_gm_workflow

get_corners: visualisation
exe: slurm_gm_workflow, IM_calc, GroundFailure

is_virtual_station: Only at visulisation



 

Monthly7
simulation_structure.pyConstructs standard path for simulation structure5
1

slurm_gm_workflow

Pre-processing

GroundFailure


Weekly7
siteamp_models.pysite amplification func.5

Mature

Move to slurm_gm_workflow

1

3

(comment)

Weekly

(slurm_gm_workflow - bb_sim)

Weekly1
sosfiltfilt.pyRequired functions for sosfiltfilt to work with scipy 0.16+ copied from scipy.4

Not needed anymore.

qcore.timeseries.py can directly import from scipy.signal

1

3

(comment)

WeeklyYearly1
srf.pyVarious functions related to loading srf file and extracting info from it.5Last update was in Feb after frequent updates - should be stable3

3

(comment)

Weekly

(slurm_gm_workflow, visualisation, im_calc)

Weekly5
testing.pyCommon testing boilerplate codes5(Tested extensively by Travis integration)5

3

(comment)

DailyMonthly2
timeseries.pyWaveform time-series related functions4Binary workflow is solid.
Some functions are old, but still used.
1

3

(comment)

Daily


Monthly3
utils.pyMisc generic functions4

Remove DotDictify

load_params
load_py_cfg is no longer used.

yams related functions can be separated

update function should be defined inside load_sim_params(), no need to be visible.

1

3

(comment)

Weekly (load_sim_params)Monthy-Never7
validate_vm.pyVM validation5
13 (comment)

Weekly-Monthly

(Pre-processing, slurm_gm_workflow)

Monthly2
xyts.pyLoads xytx.e3d file, extract info out of it.5
3

3

(comment)

Weekly-Monthly

(visualisation, GMSimViz,

Yearly1

Suggested Improvements / New Features

  • Description: State how/why this will be useful
  • Timeline: Estimate of how many sprints will it take to develop 
FunctionalityDescriptionTimeline
empdb.pyMore features to be added after empdb format is stable
im.py and formats.py to be mergedMerge and call it imutil.py to contain all raw IM related functions
shake-up_grid.pyHow should we incorporate PAGER into our workflow
gen_coords.pyMove to Pre-process1 day
siteamp_models.pyMove to slurm_workflow1 day
QCore restructuringNeed more coherent structure. eg. IM related functions all under IM.py (or IMutil.py)
Better API docSRF, IMDB related libraries deserve better API doc.



  • No labels