Closed ikahbasi closed 4 years ago
Morning @imankahbasi. Please see issue #353: at the moment relative magnitudes from lag_calc
is not working. I had hoped to fix this for 0.4.1, but did not get around to it.
You can use the relative_magnitude
function directly in the meantime.
The fundamental reason that the party.relative_magnitude
method does not work is because the template does not include sufficient pre-template noise to calculate the SNR. This is what results in the first error you are getting. The solution to this from my end isn't obvious; either we:
The other error is my bad on documentation. Internally the signal-window is set to the length of the template; this should be the default, but should be ignored if the user provides a signal window.
I'm going to leave this issue open to remind me to fix or remove the method. Of the fixes I prefer option 2, but this will require a new major version (0.5.0) because it will change the way that template objects work.
relative_magnitude
method on Party
and Family
to use SNRsignal_window
to be passed properly.Morinig @calum-chamberlain .
Yes, I think the solution number 2 is good. It's easy and simple.
Although it will be also good if the output of Party.lag_calc()
becomes an object like Party()
, including re-picked phases, correlation coefficient of each phases and ... (or directly change Party()
).
Then we can have rethreshold
and other methods same as Party()
for future investigations.
And we can use these correlation coefficients in relative_magnitude
function as input.
Correlation coefficients from lag calc are used by relative_magnitude when called from lag calc. Party.lag_calc updates the event object of each detection, so I think everything else you ask for is already implemented.
CJ Chamberlain, out of office
From: iman kahbasi notifications@github.com Sent: Tuesday, April 21, 2020 7:08:58 PM To: eqcorrscan/EQcorrscan EQcorrscan@noreply.github.com Cc: Calum Chamberlain calum.chamberlain@vuw.ac.nz; Mention mention@noreply.github.com Subject: Re: [eqcorrscan/EQcorrscan] Party.relative_magnitude or Party.lag_calc(relative_magnitude=True) broken in 0.4.x (#385)
Morinig @calum-chamberlainhttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcalum-chamberlain&data=02%7C01%7Ccalum.chamberlain%40vuw.ac.nz%7C91b40d9449ef450c5e5808d7e5c2ddae%7Ccfe63e236951427e8683bb84dcf1d20c%7C0%7C0%7C637230497464365156&sdata=q7kzXJBCmRaOZEVqSlr7yzIV8Bi40KeuIq53Wr7pULg%3D&reserved=0 . Yes, I think the solution number 2 is good. It's easy and simple. Although it will be also good if the output of Party.lag_calc() becomes an object like Party(), including re-picked phases, correlation coefficient of each phases and ... (or directly change Party()). Then we can have rethreshold and other methods same as Party() for future investigations. And we can use these correlation coefficients in relative_magnitude function as input.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feqcorrscan%2FEQcorrscan%2Fissues%2F385%23issuecomment-616996282&data=02%7C01%7Ccalum.chamberlain%40vuw.ac.nz%7C91b40d9449ef450c5e5808d7e5c2ddae%7Ccfe63e236951427e8683bb84dcf1d20c%7C0%7C0%7C637230497464375158&sdata=dfVLsPMZwHU4Fg8S5KosbIVwicpuNJrdhuj%2BjH6BULE%3D&reserved=0, or unsubscribehttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FACTIM476UKPRUOJCR55C5R3RNVBAVANCNFSM4MMVU7MQ&data=02%7C01%7Ccalum.chamberlain%40vuw.ac.nz%7C91b40d9449ef450c5e5808d7e5c2ddae%7Ccfe63e236951427e8683bb84dcf1d20c%7C0%7C0%7C637230497464375158&sdata=58a8FI2Kd%2BqsMoLss6qj%2FfgfOh%2B%2BwGspjAXbdEk4hiA%3D&reserved=0.
Yes, but we can't access to the correlation coefficients in distinct stations and channels after implement lag_calc method. My point is that we can access to them in all channel-stations that we use.
You can, they are in comments on the picks.
CJ Chamberlain, out of office
From: iman kahbasi notifications@github.com Sent: Tuesday, April 21, 2020 9:44:53 PM To: eqcorrscan/EQcorrscan EQcorrscan@noreply.github.com Cc: Calum Chamberlain calum.chamberlain@vuw.ac.nz; Mention mention@noreply.github.com Subject: Re: [eqcorrscan/EQcorrscan] Party.relative_magnitude or Party.lag_calc(relative_magnitude=True) broken in 0.4.x (#385)
Yes, but we can't access to the correlation coefficients in distinct stations and channels after implement lag_calc method. My point is that we can access to them in all channel-stations that we use.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feqcorrscan%2FEQcorrscan%2Fissues%2F385%23issuecomment-617073602&data=02%7C01%7Ccalum.chamberlain%40vuw.ac.nz%7Ca2ce01d2566d4b69523208d7e5d8a60e%7Ccfe63e236951427e8683bb84dcf1d20c%7C0%7C0%7C637230591050118195&sdata=bMKP05tEfrLxNdiIPvB91JtxzPLGmx5bqrQZJDr%2F8Ds%3D&reserved=0, or unsubscribehttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FACTIM45MPAXBI27CFNODLO3RNVTJLANCNFSM4MMVU7MQ&data=02%7C01%7Ccalum.chamberlain%40vuw.ac.nz%7Ca2ce01d2566d4b69523208d7e5d8a60e%7Ccfe63e236951427e8683bb84dcf1d20c%7C0%7C0%7C637230591050128189&sdata=l%2BPB6Pue4GR231joVtoBbUN7FweMy8aQkS6lLEMnTyw%3D&reserved=0.
Oooo, thank you. :)
I didn't know that.
Now I can pass them to relative_magnitude
function. :+1:
It will be also good if these correlation-coefficients be inheritance of the
class eqcorrscan.core.match_filter.detection.Detection
.
Closed by #412 - this issue requires more work changing Template objects and will (hopefully) be rekindled when I have the time, or someone else wants to chip in.
What do you need help with?
when I use lag_calc method on 'eqcorrscan.core.match_filter.party.Party' object and set relative_magnitude to True This error occurs:
ValueError: zero-size array to reduction operation maximum which has no identity
in addition when I set signal_window This error occurs:
relative_magnitude() got multiple values for keyword argument 'signal_window'
so can't I change it?for example: I used 24-hour data of a station and made a tribe with one event in this data. And used the tribe in the same data to make a self detection. In all steps everything is ok, except when I set relative_magnitude to True.
Provide an example so that we can reproduce your problem
problem 1
error is:
problem2
error is:
What help would you like?
what is the solution?
What is your setup? (please complete the following information):**