SWOT-JPL/swotsimulator

Inconsistency between orbit file and reading instruction

Closed this issue · 1 comments

Hi, in the build_swath file, makeorbit function, I had to modify the orbit file reading instruction because the columns are not given in appropriate order. I suggest to restablish consistency like this, so that the default configuration of the simulator runs without modification:
if p.order_orbit_col is None:
#volon, volat, votime = numpy.loadtxt(orbitfile, usecols=(1, 2, 0),
volon, volat, votime = numpy.loadtxt(orbitfile, usecols=(0, 1, 2),
unpack=True)

Hi,
A key has been added to parameter files order_orbit_col in version 2.3 so that users who do not use the default orbit but their own orbit or an old one can still use the simulator. The default orbit is the official one provided by CNES since august 2016, ephem_science_sept2015_ell.txt and the order of column is (1, 2, 0) for (lon, lat, time).
If you use an older orbit file or an other one not provided within the simulator, the order of columns may be different. You just have to update your parameter file with order_orbit_col=(0, 1, 2). Keep in mind that the official orbit ephem_science_sept2015_ell.txt is slightly different from the old orbit file. You can find more information in the documentation.