Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

event downloads: toggle to select only highest samplerate #157

Open
filefolder opened this issue Nov 18, 2024 · 0 comments
Open

event downloads: toggle to select only highest samplerate #157

filefolder opened this issue Nov 18, 2024 · 0 comments

Comments

@filefolder
Copy link
Collaborator

often there are multiple "duplicate" channels per station recording at different sample rates (see #69 for background).

for events the user is essentially ALWAYS going to want the highest sample rate data possible as this allows the most precision for their analysis and the size of the data is fairly small. I have implemented this change in collect_requests_event

def collect_requests_event(eq,inv,min_dist_deg=30,max_dist_deg=90,
                           before_p_sec=20,after_p_sec=160,
                           model=None,settings=None,highest_sr_only=True):
    """ 
    Collect requests for event eq for stations in inv 
    """
    settings, db_manager = setup_paths(settings)
    origin = eq.origins[0] # default to the primary I suppose
    ot = origin.time
    if highest_sr_only:
        sub_inv = select_highest_samplerate(inv,time=ot,minSR=5) #filter by time and also select highest samplerate
    else:
        sub_inv = inv.select(time = ot) #only filter by time

This would ensure that we're only downloading the best version of the data. However as alluded in issue #69, some servers don't have their metadata set correctly. We need to have a toggle for "download highest samplerate only" that effectively sets the highest_sr_only kwarg in collect_requests_event and it should be ON by default, which also just alerts users what's happening.

Fortunately these kinds of errors are fairly few, but notably all of the AU data at IRIS are affected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant