Git Product home page Git Product logo

Comments (7)

fontiela avatar fontiela commented on May 29, 2024 1

Hi @TomWinder, I will re-install and let you know if the changes work or not.

from quakemigrate.

hemmelig avatar hemmelig commented on May 29, 2024 1

That's interesting to hear, but I you're right - that is a C issue outside of our immediate control. We ought to have an operating system agnostic solution to installing QuakeMigrate in place very soon that will allow us to identify and fix any issues like this as and when they arise!

As this seems to be resolved, I'll close this Issue for now. I've made a note to revisit expanding the export function to give the user more control over which picks etc get included!

from quakemigrate.

hemmelig avatar hemmelig commented on May 29, 2024

Hey,

So you want your final catalog to have each event + the associated picks made by the picker, and nothing else?

In the example you've provided, I don't see an issue - is there not another pick associated with the P pick made on QB03?

If you just don't want any modelled phase arrival estimates ("picks") in the final catalog, you could replace lines 217-232 with something like:

        pick = Pick()
        pick.extra = AttribDict()
        pick.waveform_id = wid
        pick.method_id = "autopick"
        pick.phase_hint = phase
        if str(pickline["PickTime"]) != "-1":
            pick.time = UTCDateTime(pickline["PickTime"])
            pick.time_errors.uncertainty = float(pickline["PickError"])
            pick.extra.snr = {"value": float(pickline["SNR"]),
                                "namespace": ns}
        else:
            continue
        event.picks.append(pick)

The reference indentation (i.e. that of pick = Pick()) should be the same as line 215.

from quakemigrate.

fontiela avatar fontiela commented on May 29, 2024

@hemmelig thanks for your fast reply,

Removing lines 228 and 229 doesn't fix the problem.
The output still containing autopick and modelled time picks.

To the same example I sent before:

Station,Phase,ModelledTime,PickTime,PickError,SNR
PPJ,P,2020-01-01T01:45:46.934829Z,-1,-1,-1
PPJ,S,2020-01-01T01:45:51.071473Z,2020-01-01T01:45:52.204215Z,0.0805,14
QB03,P,2020-01-01T01:45:45.681704Z,2020-01-01T01:45:44.461308Z,0.0783,7.64
QB03,S,2020-01-01T01:45:49.115079Z,-1,-1,-1

quakeml is the next one:

<pick publicID="smi:local/cd499310-296c-47df-b699-9c6b6f15dc41">
        <time>
          <value>2020-01-01T01:45:46.934829Z</value>
        </time>
        <waveformID networkCode="" stationCode="PPJ"></waveformID>
        <methodID>smi:local/modelled</methodID>
        <phaseHint>P</phaseHint>
      </pick>
      <pick publicID="smi:local/b6d177e9-ee9f-40e0-a0fe-8139d5c76dde">
        <time>
          <value>2020-01-01T01:45:51.071473Z</value>
        </time>
        <waveformID networkCode="" stationCode="PPJ"></waveformID>
        <methodID>smi:local/modelled</methodID>
        <phaseHint>S</phaseHint>
      </pick>
      <pick publicID="smi:local/30be6260-5b20-4f06-87bf-9418fd72e64e">
        <time>
          <value>2020-01-01T01:45:52.204215Z</value>
          <uncertainty>0.0805</uncertainty>
        </time>
        <waveformID networkCode="" stationCode="PPJ"></waveformID>
        <methodID>smi:local/autopick</methodID>
        <phaseHint>S</phaseHint>
        <ns0:snr>14.0</ns0:snr>
      </pick>
      <pick publicID="smi:local/34f58a31-fe1a-41e4-941f-dc8b0e45f901">
        <time>
          <value>2020-01-01T01:45:45.681704Z</value>
        </time>
        <waveformID networkCode="" stationCode="QB03"></waveformID>
        <methodID>smi:local/modelled</methodID>
        <phaseHint>P</phaseHint>
      </pick>
      <pick publicID="smi:local/76a6a6ca-38b9-4ffe-8434-28ffb0d053da">
        <time>
          <value>2020-01-01T01:45:44.461308Z</value>
          <uncertainty>0.0783</uncertainty>
        </time>
        <waveformID networkCode="" stationCode="QB03"></waveformID>
        <methodID>smi:local/autopick</methodID>
        <phaseHint>P</phaseHint>
        <ns0:snr>7.64</ns0:snr>
      </pick>
      <pick publicID="smi:local/020b355b-391e-480c-948c-ea1b5def2647">
        <time>
          <value>2020-01-01T01:45:49.115079Z</value>
        </time>
        <waveformID networkCode="" stationCode="QB03"></waveformID>
        <methodID>smi:local/modelled</methodID>
        <phaseHint>S</phaseHint>
      </pick>

As you see the modelled pick times still on the outputs.

from quakemigrate.

TomWinder avatar TomWinder commented on May 29, 2024

Hi @fontiela. As you've observed, the current code always outputs both autopick times (when they are available) and modelled times. Adding the option to output only one or the other is a good suggested improvement! At the moment the only way to filter them out is to remove/ignore
pick times which do not have an uncertainty and SNR associated with them - you could do if not pick.time.uncertainty: ... or something similar, I think.

Removing lines 228 and 229 should stop modelled times being written, but you need to re-install to make these changes take effect (I.e. re-run python setup.py install). If you've already done this (or installed with python setup.py develop) then something weird is happening. Maybe @hemmelig can check this as I'm not at my computer for the next few days!

from quakemigrate.

hemmelig avatar hemmelig commented on May 29, 2024

Hi @fontiela - sorry, I should have made my code snippet a little more clear - it is a bit more than just removing 228-229. As @TomWinder says, you'll need to reinstall the code between any edits. I recommend running pip install . from the QuakeMigrate directory (the one that contains setup.py) instead of python setup.py install, as this will ensure any previously installed versions are removed from your active environment. Any further issues, let me know!

from quakemigrate.

fontiela avatar fontiela commented on May 29, 2024

Hi @TomWinder and @hemmelig
The changes work fine after reinstall QuakeMigrate. My output are exactly what I was looking for.
To let you know that reinstall was a bit hard, because file _int8_t.h (from GCC) wasn't found. I fixed the problem with the update of CLANG from version 12.0 to 14.0. Sometimes Apple is finicky.

from quakemigrate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.