lofar-astron / RMextract

extract TEC, vTEC, Earthmagnetic field and Rotation Measures from GPS and WMM data for radio interferometry observations
GNU General Public License v3.0
31 stars 22 forks source link

weird generation of NaNs! #32

Closed twillis449 closed 4 years ago

twillis449 commented 4 years ago

This is really weird- every three hours in reports produced By RMextract I get NaNs for the TEC and RM. e.g

twillis-Latitude-E6540 5:36pm] [examples]> grep nan RMextract_report_test_PSR_J1141-6545

1 : 0 0.0 300.0 0.7180768251419067 3.6733219623565674 nan nan 0.7108205883686297 37 : 0 10800.0 300.0 0.41684314608573914 3.562303304672241 nan nan 0.5202358008838824 73 : 0 21600.0 300.0 0.23322181403636932 3.291348934173584 nan nan 0.4174430897339062 109 : 0 32400.0 300.0 0.2413012683391571 2.9670825004577637 nan nan 0.42128198393009586 145 : 0 43200.0 300.0 0.43764880299568176 2.7049098014831543 nan nan 0.5332277105447197 181 : 0 54000.0 300.0 0.7434141039848328 2.6118547916412354 nan nan 0.7261104694527948 217 : 0 64800.0 300.0 1.0140488147735596 2.8697948455810547 nan nan 0.8697324024549102 253 : 0 75600.0 300.0 0.9953503012657166 3.4627625942230225 nan nan 0.8611996794494563 289 : 0 86400.0 300.0 0.7110430598258971 3.67352294921875 nan nan 0.70653456261819

I noticed this effect quite a while ago, but kept forgetting to create an Issue about it. I'm using RMextract 0.4

Tony

maaijke commented 4 years ago

Could you provide a script/input paramters that reproduces this?

twillis449 commented 4 years ago

Looks like my bad. I cloned your current version of RMextract and ran the agw_examples.py script. No NaNs appear. So whatever was causing the issue seems to have disappeared. :)

twillis449 commented 4 years ago

Oops! Sorry I worked on this too early this morning. This problem is still there. Just run the agw_examples.py script in the 'examples' directory and grep for nans in both the output files RMextract_report_test_Upington_dec_2014 created directly by the agw_examples.py script and the file test_report_Upington_dec_2014 generated internally in yourscript getRM.py There should b four lines with nans in both of the scripts.

maaijke commented 4 years ago

It happened when the requested time would exactly coincide with a timestamp in the IONEX files. Should be fixed now.