brown-ccv / icesat2waves

ICESat-2 track analysis
GNU General Public License v3.0
0 stars 2 forks source link

Change branched logic on m_tools_ph3.py #194

Open kmilo9999 opened 3 months ago

kmilo9999 commented 3 months ago
          All the branches do the same thing here! Maybe the intend is to use `np.floor` if `case == "floor"`, etc.?
    _case_func = {
    'round': np.round,
    'floor': np.floor,
    'ceil': np.ceil
    }

    if case in _case_func:
        case_func = _case_func[case]
        for k in np.logspace(0, 24, 25):
            if case_func(a/k) == 1:
                return k
    else:
        raise Warning('no proper case')

_Originally posted by @cpaniaguam in https://github.com/brown-ccv/icesat2waves/pull/131#discussion_r1517842224_