Example #1
0
def check_multiParamsInRange(mLow , mHigh , rLow , rHigh):
    ranges = ['%s to %s' % (mLow, mHigh) , '%s to %s' % (rLow, rHigh)]
    data = kiknet.multiParamsInRange(['MwFnet', 'RhypFnetMtDepth'], ranges, ['gmNo', 'MwFnet', 'RhypFnetMtDepth'])
    ms_lessThan = [d['MwFnet'] < float(mLow) for d in data]
    ms_greaterThan = [d['MwFnet'] > float(mHigh) for d in data]
    rs_lessThan = [d['RhypFnetMtDepth'] < float(rLow) for d in data]
    rs_greaterThan = [d['RhypFnetMtDepth'] > float(rHigh) for d in data]
    ms_999 = [d['MwFnet'] == -999 for d in data]
    rs_999 = [d['RhypFnetMtDepth'] == -999 for d in data]
    assert not any(ms_lessThan)
    assert not any(ms_greaterThan)
    assert not any(rs_lessThan)
    assert not any(rs_greaterThan)
    assert not any(ms_999)
    assert not any(rs_999)
Example #2
0
def check_multiParamsInRange_returnsData(mLow , mHigh , rLow , rHigh):
    ranges = ['%s to %s' % (mLow , mHigh) , '%s to %s' % (rLow , rHigh)]
    data = kiknet.multiParamsInRange(['MwFnet' , 'RhypFnetMtDepth'] , ranges , ['gmNo' , 'MwFnet' , 'RhypFnetMtDepth'])
    assert len(data) > 0