Skip to content

array_thresh baz estimate range issue #38

Description

@liamtoney

From @kfmckee:

I found a small issue with array_processing.tools.generic.array_thresh. The back-azimuth estimates are from 0-360, so if az_volc+-az_diff are greater than 360 or less than 0, they are excluded from the sorting process. I wrote up a work around and figured I would share. Not the prettiest, but seems to work.

ifaz_volc-az_diff<0:
forjinrange(np.size(az)):
ifaz[j] >180:
az[j] =az[j] -360az_good=np.where((az>=az_volc-az_diff) & (az<=az_volc+az_diff))[0]
forjinrange(np.size(az)):
ifaz[j] <0:
az[j] =az[j] +360elifaz_volc+az_diff>360:
forjinrange(np.size(az)):
ifaz[j] <180:
az[j] =az[j] +360az_good=np.where((az>=az_volc-az_diff) & (az<=az_volc+az_diff))[0]
forjinrange(np.size(az)):
ifaz[j] >360:
az[j] =az[j] -360else:
az_good=np.where((az>=az_volc-az_diff) & (az<=az_volc+az_diff))[0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions