Git Product home page Git Product logo

Comments (11)

calum-chamberlain avatar calum-chamberlain commented on June 9, 2024
  1. Issue in catalogue2DD: Fixed in commit here

from eqcorrscan.

gabematson avatar gabematson commented on June 9, 2024

Issue in Sfile_util.readpicks:
For a pick at a time hr:mn:sc, if sc is in [0,10), i.e. it is only one digit long, then it gets read as hh:mn+1:00. It looks like it stems from the following lines:

    try:
        time=UTCDateTime(evtime.year,evtime.month,evtime.day,
                         int(line[18:20]),int(line[20:22]),int(line[23:25]),
                         int(line[26:28])*10000)
    except (ValueError):
        time=UTCDateTime(evtime.year,evtime.month,evtime.day,
                         int(line[18:20]),int(line[20:22]),0,0)
        time+=60 # Add 60 seconds on to the time, this copes with s-file

from eqcorrscan.

calum-chamberlain avatar calum-chamberlain commented on June 9, 2024

Curious, could you email me an example s-file. I haven't noticed this yet. Could you also, for that s-file, tell me what time you got?

It looks like the line highlighted is still in the develop branch here, so I should fix it.

By the way. When highlighting bugs it is really helpful to attach a link to the line in question, or the file. To link to a line, click on the line and copy the url. You have make links to things using square brackets for what you want the text to be, and round brackets for the link.

from eqcorrscan.

gabematson avatar gabematson commented on June 9, 2024

Sure thing! Here is an example of an s-file.

Thanks for the tip about bug highlighting! That is very helpful. I will
make sure to do that next time.

On Fri, Feb 12, 2016 at 5:55 PM, Calum Chamberlain <[email protected]

wrote:

Curious, could you email me an example s-file. I haven't noticed this yet.
Could you also, for that s-file, tell me what time you got?

It looks like the line highlighted is still in the develop branch here
https://github.com/calum-chamberlain/EQcorrscan/blob/develop/eqcorrscan/utils/Sfile_util.py#L443,
so I should fix it.

By the way. When highlighting bugs it is really helpful to attach a link
to the line in question, or the file. To link to a line, click on the line
and copy the url. You have make links to things using square brackets for
what you want the text to be, and round brackets for the link.


Reply to this email directly or view it on GitHub
#25 (comment)
.

from eqcorrscan.

calum-chamberlain avatar calum-chamberlain commented on June 9, 2024

Grand - how did you generate this s-file? I guess in seisan? The reason it isn't reading that properly is that the SECON column should read more like this example... As such I haven't seen this before.
12-0848-03L.S200903.txt

from eqcorrscan.

calum-chamberlain avatar calum-chamberlain commented on June 9, 2024

If it is a seisan generated file, then the patch to S-file_utils would be to replace:

time=UTCDateTime(evtime.year,evtime.month,evtime.day, int(line[18:20]),int(line[20:22]),int(line[23:25]), int(line[26:28])*10000)

with:

time=UTCDateTime(evtime.year,evtime.month,evtime.day, int(line[18:20]),int(line[20:22]),int(line[23:28].split('.')[0]), int(line[23:28].split('.')[1])*10000)

This should read in the whole SECON column and split that on the decimal point.

This patch will need to be applied to the current development version here.

@gabematson can you confirm that you generated the s-file in question using seisan?

from eqcorrscan.

gabematson avatar gabematson commented on June 9, 2024

Interesting. I generated this s-file with the LFE_ssearch_imporved.m, the
matlab equivalent to lag_calc. So it looks like S-file_util was unable to
convert '7.' (for example) into an int by int(line[23:25]). Good call on
reading in the whole second entry and splitting it up by the decimal.

On Sat, Feb 13, 2016 at 9:46 AM, Calum Chamberlain <[email protected]

wrote:

If it is a seisan generated file, then the patch to S-file_utils would be
to replace:

time=UTCDateTime(evtime.year,evtime.month,evtime.day,
int(line[18:20]),int(line[20:22]),int(line[23:25]),
int(line[26:28])*10000)

with:

time=UTCDateTime(evtime.year,evtime.month,evtime.day,
int(line[18:20]),int(line[20:22]),int(line[23:28].split('.')[0]),
int(line[23:28].split('.')[1])*10000)

This should read in the whole SECON column and split that on the decimal
point.

I won't apply this patch to EQcorrscan as we have made major changes to
Sfile_util. But I will check how this bug effects the new version. Let me
know how you generated the s-file.


Reply to this email directly or view it on GitHub
#25 (comment)
.

from eqcorrscan.

calum-chamberlain avatar calum-chamberlain commented on June 9, 2024

Okay, so it looks like an issue with that matlab file - although if seisan was able to read and locate the event then that means this patch should be applied globally.

Grand!

Bug fixed in quakeML feature branch prior to merge with develop here.

from eqcorrscan.

gabematson avatar gabematson commented on June 9, 2024

The Sfile_util patch is working great.

I am noticing something that may be a bug. In mag_calc.SVD_moments here, it looks like the number of events is getting compared to the V matrix. I am wondering if the number of events should actually be compared to the U matrix, which holds the weights for each wave form, whereas V holds the basis vectors. I very well could just be confused, but I thought I would ask.

from eqcorrscan.

gabematson avatar gabematson commented on June 9, 2024

Here is where the numpy.linalg.SVD gets called within clustering.SVD The flag 'fullmatrices = False' ensures that the V and U matrices are rectangular.

Here is the numpy documentation on the SVD method which talks about the fullmatrices flag. I actually think it might be fine to calculate rectangular matrices as long as the comparison is len(ev_list) to len(U_working) in this line.

from eqcorrscan.

calum-chamberlain avatar calum-chamberlain commented on June 9, 2024

That should be fixed in this commit.

This bug occurs only when you have more events than you use samples. I would recommend using long time windows (Rubenstein & Ellsworth use 10.5s), however you should now be able to work around it.

from eqcorrscan.

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.