Initial version of this code was provided by Dmitry Strekalov from JPL in January 2013.