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

WIP - Don't do jobs if station RMS is "bad" #201

Open
ThomasLecocq opened this issue Mar 3, 2020 · 1 comment
Open

WIP - Don't do jobs if station RMS is "bad" #201

ThomasLecocq opened this issue Mar 3, 2020 · 1 comment

Comments

@ThomasLecocq
Copy link
Member

here I summarise the discussions/code done with @awatlet today to avoid using toppled over seismic nodes in the CC calculations

  1. scan archive
  2. compute QC (psd)
    2.1. extract RMS
    2.2 define bad periods, save to csv
    2.3 use csv to delete CC jobs
  3. back to normal process: compute_cc, etc...
@ThomasLecocq
Copy link
Member Author

temporarily here, the job cleaner is (and its CSV):

linecol,start,end
2L_01103,18/11/2018 00:00,04/12/2018 00:00
2L_01104,08/08/2018 15:00,14/08/2018 00:00
2L_01104,18/11/2018 21:00,04/12/2018 00:00
2L_01105,16/11/2018 22:00,28/11/2018 15:00
2L_02103,25/11/2018 20:00,27/11/2018 21:00
2L_02104,13/11/2018 22:00,04/12/2018 00:00
2L_02105,25/11/2018 23:00,28/11/2018 10:00
2L_03102,08/08/2018 19:00,14/08/2018 00:00
2L_03103,25/11/2018 20:00,27/11/2018 13:00
2L_03104,02/08/2018 20:00,14/08/2018 00:00
2L_03104,19/11/2018 20:00,04/12/2018 00:00
"""
Job cleaner
"""

bad = pd.read_csv("data_check.csv", parse_dates=["start", "end"], dayfirst=True)
print(bad.head())
c = 0
for sta, group in bad.groupby("linecol"):
    print(sta, len(group), "bad periods")
    for id, period in group.iterrows():
        cmd = "DELETE FROM jobs where pair like '%%%s%%' and day BETWEEN '%s' and '%s' " % (sta.replace("_","."),period.start.date(), period.end.date())
        os.system("msnoise db execute \"%s\"" % cmd)

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