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

Incorrect parsing in getIONEX.py #29

Open infy-infy opened 4 years ago

infy-infy commented 4 years ago
  1. if readdata: data = np.fromstring(" -".join(line.strip().split("-")), sep=" ") * exponent This line doesn't parse case when all number places in value are used (there's 5 places per value in data in IONEX file) correctly. It's better to split them by 5 characters, not by space.
  2. Using just datetime.datetime in parsing data in IONEX header also is not enough: sometimes they use 24th hour of current day instead of 0 hour of next day, what leads to datetime error. So this case should be handled separately.