[MSNoise] MSNoise1.6 noise test error

wangjun wangjun1099 at qq.com
Tue Aug 24 08:11:12 UTC 2021


Dear Thomas,
     When I run MSnoise 1.6 with msnoise test command, the error is as follows.
I'd like to kown what the problem is.


thank you very much, if you could reply to me.


======================================================================
ERROR: test_025_dtt (msnoise.test.tests.MSNoiseTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\anaconda3\lib\site-packages\pandas\core\series.py", line 972, in __setitem__
    self._set_with_engine(key, value)
  File "c:\anaconda3\lib\site-packages\pandas\core\series.py", line 1005, in _set_with_engine
    loc = self.index._engine.get_loc(key)
  File "pandas\_libs\index.pyx", line 70, in pandas._libs.index.IndexEngine.get_loc
  File "pandas\_libs\index.pyx", line 75, in pandas._libs.index.IndexEngine.get_loc
TypeError: '[ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 23 31 32 33 34 35 36 37 38
 39 40 41 42 43 44 45 46]' is an invalid key


During handling of the above exception, another exception occurred:


Traceback (most recent call last):
  File "c:\anaconda3\lib\site-packages\msnoise\test\tests.py", line 312, in test_025_dtt
    main()
  File "c:\anaconda3\lib\site-packages\msnoise\s06compute_dtt.py", line 231, in main
    df['err'][tmp] = 1.0
  File "c:\anaconda3\lib\site-packages\pandas\core\series.py", line 998, in __setitem__
    self._set_with(key, value)
  File "c:\anaconda3\lib\site-packages\pandas\core\series.py", line 1031, in _set_with
    self._set_labels(key, value)
  File "c:\anaconda3\lib\site-packages\pandas\core\series.py", line 1042, in _set_labels
    raise KeyError(f"{key[mask]} not in index")
KeyError: '[ 1  2  3  4  6  7  8  9 11 12 13 14 23 31 32 33 34 36 37 38 39 41 42 43 44\n 46] not in index'


----------------------------------------------------------------------
Ran 52 tests in 147.687s




  祝 好


  江苏省地震监测中心  王 俊
           


 




------------------ Original ------------------
From:                                                                                                                        "msnoise"                                                                                    <msnoise-request at mailman-as.oma.be&gt;;
Date:&nbsp;Wed, Apr 21, 2021 08:00 PM
To:&nbsp;"msnoise"<msnoise at mailman-as.oma.be&gt;;

Subject:&nbsp;MSNoise Digest, Vol 75, Issue 3



Send MSNoise mailing list submissions to
	msnoise at mailman-as.oma.be

To subscribe or unsubscribe via the World Wide Web, visit
	http://mailman-as.oma.be/mailman/listinfo/msnoise
or, via email, send a message with subject or body 'help' to
	msnoise-request at mailman-as.oma.be

You can reach the person managing the list at
	msnoise-owner at mailman-as.oma.be

When replying, please edit your Subject line so it is more specific
than "Re: Contents of MSNoise digest..."


Today's Topics:

&nbsp;&nbsp; 1. Re: Issue-regarding Grid.dat (Dr. Arun Singh)


----------------------------------------------------------------------

Message: 1
Date: Tue, 20 Apr 2021 21:25:36 +0530 (IST)
From: "Dr. Arun Singh" <arun at gg.iitkgp.ac.in&gt;
To: msnoise <msnoise at mailman-as.oma.be&gt;
Subject: Re: [MSNoise] Issue-regarding Grid.dat
Message-ID:
	<1913349746.354648.1618934136707.JavaMail.zimbra at gg.iitkgp.ac.in&gt;
Content-Type: text/plain; charset=utf-8

Dear Thomas,
I think, I did a mistake. Thank you for pointing it out.

arun

----- Original Message -----
From: "Dr. Arun Singh" <arun at gg.iitkgp.ac.in&gt;
To: "msnoise" <msnoise at mailman-as.oma.be&gt;
Sent: Tuesday, April 20, 2021 6:44:42 PM
Subject: Re: [MSNoise] Issue-regarding Grid.dat

Hi Thomas,
Yes I think they are correct? Can you help from where is it taking these values? I can cross check them. If it is 

----- Original Message -----
From: "Thomas Lecocq" <Thomas.Lecocq at seismology.be&gt;
To: "msnoise" <msnoise at mailman-as.oma.be&gt;
Sent: Tuesday, April 20, 2021 4:25:04 PM
Subject: Re: [MSNoise] Issue-regarding Grid.dat

Hi,

Are you sure your X &amp; Y values are OK in the database ? The code

https://github.com/ThomasLecocq/msnoise-tomo/blob/master/msnoise_tomo/prepare_tomo.py#L68-L81

is correct: element 2 is Latitude (Y) and element 3 is Longitude (X)

Thomas

Le 20/04/2021 ? 12:04, Dr. Arun Singh a ?crit?:
&gt; Dear All,
&gt; Can any one of you help me out.
&gt;
&gt; prepare_tomo.py is writing "Grid.dat", However, it seems it is writing wrong minlat and minlon. In place of longitude it seems it is writing latitude. Station coordinates are correct in STACoord.dat. How X and
&gt;
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; minlon = df[3].min() - xstep*1.5
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; maxlon = df[3].max() + xstep*1.5
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; minlat = df[2].min() - ystep*1.5
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; maxlat = df[2].max() + ystep*1.5
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; f.write("%f %f\n"%(minlon, maxlon))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; # It is writing latitude
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; f.write("%f %f\n"%(minlat, maxlat))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; # It is writing longitude
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; f.write("%f %f\n"%(xstep, ystep))
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; f.close
&gt;
&gt; Somehow in the final tomographic plots (result_*), I am getting a a mirror image of expected image. (Latitude in x-axis and Longitude in Y-axis).&nbsp; If I change Grid.dat manually (by changing lat and lon) before running ANSWT.py, it is not working well.
&gt;
&gt; Regards,
&gt;
&gt; arun
&gt; _______________________________________________
&gt; MSNoise mailing list
&gt; MSNoise at mailman-as.oma.be
&gt; http://mailman-as.oma.be/mailman/listinfo/msnoise
_______________________________________________
MSNoise mailing list
MSNoise at mailman-as.oma.be
http://mailman-as.oma.be/mailman/listinfo/msnoise


------------------------------

_______________________________________________
MSNoise mailing list
MSNoise at mailman-as.oma.be
http://mailman-as.oma.be/mailman/listinfo/msnoise


End of MSNoise Digest, Vol 75, Issue 3
**************************************


More information about the MSNoise mailing list