<p>By trial and error I found that the following email text (including intermediate comment lines) is acceptable to HORIZONS:-</p>

<pre><code>!$$SOF
EMAIL_ADDR = 'xxxxxx@gmail.com'
!...Target= Mercury
COMMAND= '199'
!...Reference Site = Centre of Sun
CENTER= '500@10'
MAKE_EPHEM= 'YES'
TABLE_TYPE= 'VECTORS'
OUT_UNITS= 'KM-S'
REF_PLANE= 'ECLIPTIC'
REF_SYSTEM= 'J2000'
VECT_CORR= 'NONE'
VEC_LABELS= 'YES'
VEC_DELTA_T= 'YES'
CSV_FORMAT= 'YES'
OBJ_DATA= 'YES'
VEC_TABLE= '3'
TLIST= '2451546.27149305' '2451546.27150462'
 '2451546.2715162'
 '2451546.27152777'
 '2451546.27153934'
!
! The following works OK but I want to use TLIST
!
!START_TIME= 'JD 2451590.9526841'
!STOP_TIME= 'JD 2451591.0596841'
!STEP_SIZE= '10 m'
!
!$$EOF
</code></pre>

<p>However, I can't say that I have found the reason why all the previous submissions failed to execute.  For example if I move the final 7-line comment block (leaving the !$$EOF line in place at the end) and put it in front of the TLIST command line ... then the job fails.</p>

<p>Nonetheless I have a format for using TLIST which works OK for me now.</p>

<p><strong>Useful Links</strong></p>

<p><a href="https://ssd.jpl.nasa.gov/horizons.cgi?CGISESSID=4f071eb036a53cdde6734789ff0cfa6e#top" rel="nofollow noreferrer">JPL HORIZONS web interface</a></p>

<p><a href="https://ssd.jpl.nasa.gov/?horizons#email" rel="nofollow noreferrer">https://ssd.jpl.nasa.gov/?horizons#email</a></p>

<p><a href="https://ssd.jpl.nasa.gov/dat/Configuring_Mail_Clients_to_Send_Plain_ASCII_Text.pdf" rel="nofollow noreferrer">https://ssd.jpl.nasa.gov/dat/Configuring_Mail_Clients_to_Send_Plain_ASCII_Text.pdf</a></p>

CC BY-SA 3.0
2018-01-19T00:37:31.800Z
2018-01-19T00:53:30.637Z
2018-01-19T00:53:30.637Z
steveOw
<p>I am trying to get a list of all of Mercury's Perihelia and Aphelia over a period of multiple decades. For each event I need X,Y,X and Vx,Vy,Vz data.</p>

<p>Knowing the time of the first event it is easy to obtain approximate times of the subsequent events using the known orbital period.</p>

<p>I have managed to acquire values using the manual web interface to JPL Horizons.  Working on one event at a time I can get data for an epoch within one minute of each event.  But I want (a) timings to the nearest second and (b) to obtain a whole series of apsides events in one go.</p>

<p>The JPL Horizons email interface seems to be the way to go. Using this I have been able to obtain data for a particular time range and step interval. But, as with the web interface, it is not possible (in one go) to cover the whole multi-decade period at the desired resolution (1s).</p>

<p>So now I want to use the TLIST facility to specify a list of individual event times (times at 1s intervals within a range from several seconds before and after the approximate time of each apsides event).</p>

<p>The documentation - see <a href="https://ssd.jpl.nasa.gov/?horizons#email" rel="nofollow noreferrer">how to get Horizons email documentation mailed to you</a> - includes this section on TLIST:-</p>

<pre><code>!TLIST allows users to specify up to 10000 discrete times
!individually. If TLIST is used, START_TIME, STOP_TIME and
!STEP_SIZE are ignored. TLIST is a list of either "Julian
!Day Numbers" (JD) or "Modified Julian Day Numbers"
!(MJD; days since Nov 17, 1858 (JD 2400000.5)).

!In either case, the input is one or more real numbers.
!The program puts TLIST in ascending chronological order
!and determines whether it is JD or MJD based on smallest
!day number.  Example usage:
!
!   TLIST= '2451454.8937833' '2451455.11256351'
!          '2451456.45576728'
!          '2451459.65778822'
!          '2451458.97618331'
!          '2451459.72787832'
!          '2451462.25656722'
!
!   Note that there can be more than one value on the line
!   OR one per line. Line length should be less than 80
!   characters. List is space or comma delimited. "TLIST="
!   is used only once so it does not supercede any previous
!   assignment in the command file.


 TLIST = 200*' '
</code></pre>

<p>But I am having a problem in formatting the TLIST input data in a way that the program will accept.  Every attempt so far has returned an error message of the form "BATVAR: cannot read TLIST value: --F4F5E805D2040CE6C2".</p>

<p>I have emailed the system manager but have had no response so far.</p>

<p>Below is a copy of the email text which I have been sending (format = To:   horizons@ssd.jpl.nasa.gov Subject: JOB ****** ).  </p>

<p>I would be grateful if anyone can suggest what needs to be done with the data format for the TLIST command.</p>

<pre><code>!$$SOF
EMAIL_ADDR = '************@gmail.com'
!...Target= Mercury
COMMAND= '199'
!...Reference Site = Centre of Sun
CENTER= '500@10'
MAKE_EPHEM= 'YES'
TABLE_TYPE= 'VECTORS'
OUT_UNITS= 'KM-S'
REF_PLANE= 'ECLIPTIC'
REF_SYSTEM= 'J2000'
VECT_CORR= 'NONE'
VEC_LABELS= 'YES'
VEC_DELTA_T= 'YES'
CSV_FORMAT= 'YES'
OBJ_DATA= 'YES'
VEC_TABLE= '2'
!
! The following works OK (but I want to use TLIST)
!
!START_TIME= 'JD 2451590.2526841'
!STOP_TIME= 'JD 2451590.2596841'
!STEP_SIZE= '1 m'
!
!
! What I desire (but it fails):-
!
!TLIST=
!'2451546.2714931'
!'2451546.2715046'
!'2451546.2715162'
!'2451546.2715278'
!'2451546.2715393'
!'2451546.2715509'
!'2451546.2715625'
!
! Test (it failed)
!
   TLIST= '2451454.8937833,2451455.11256351,'
          '2451456.45576728,'
          '2451459.65778822,'
          '2451458.97618331,'
          '2451459.72787832,'
          '2451462.25656722'
!
!
! The Following Fail:-
!
!   TLIST= 'JD 2451454.8937833' 'JD 2451455.11256351'
!          'JD 2451456.45576728'
!          'JD 2451459.65778822'
!          'JD 2451458.97618331'
!          'JD 2451459.72787832'
!          'JD 2451462.25656722'
!
!   TLIST= '2451454.8937833' '2451455.11256351'
!          '2451456.45576728'
!          '2451459.65778822'
!          '2451458.97618331'
!          '2451459.72787832'
!          '2451462.25656722'
!
!TLIST= '2451546.27149310' '2451546.27149310'
! '2451546.27150460'
!
!TLIST= '2451546.2714931' '2451546.2714931'
! '2451546.2715046'
!
!TLIST= '
! 2451546.2714931
! 2451546.2715046
! 2451546.2715162'
!
!TLIST= '
! 2451546.2714931,
! 2451546.2715046,
! 2451546.2715162'
!
!TLIST= ''2451546.2714931', '2451546.2715046', '2451546.2715162''
!
!TLIST= '2451546.2714931', '2451546.2715046', '2451546.2715162'
!
!TLIST= '2451546.2714931' '2451546.2715046' '2451546.2715162'
!
!TLIST= '2451546.2714931 2451546.2715046 2451546.2715162'
!
!TLIST='2451546.2714931,2451546.2715046,2451546.2715162'
!
!TLIST=200*''
!
!TLIST= '2451454.8937833' '2451455.11256351'
!
!TLIST= '2451546.2'
!
!TLIST='2451546.2714931''2451546.2715046''2451546.2715162'!'2451546.2715278',
!'2451546.2715393',
!'2451546.2715509',
!'2451546.2715625'
!
!$$EOF
</code></pre>

CC BY-SA 3.0
2018-01-17T02:28:13.590Z
@uhoh Thanks for your suggestions and offer. At the moment I am focusing  on JPL Horizons and my current Plan B for this particular query is to use the NASA WebGeoCalc online app.  But I would like to solve the JPL Horizons email TLIST problem not just for this apsides-related query but for other possible types of query in the future.  Unfortunately I have not used Python but please feel free to post an answer with your method as it may help other users in the future.
steveOw
CC BY-SA 3.0
2018-01-18T23:17:41.037Z
@barrycarter. Thanks.  (Re:previous comment 1) The HORIZONS web interface doesn't provide TLIST functionality.  CSPICE is too heavy for me right now. (Re comment 2): The HORIZONS email documentation indicates that comment lines (prefixed by !) can appear anywhere.  I have recently found that one particular TLIST format does work OK despite having additional comment lines. I have added it at the end of the question.
steveOw
CC BY-SA 3.0
2018-01-19T01:00:13.497Z
@uhoh Many thanks for the suggestions. I have moved my update into an answer and included the links. Re: Email button - on the [HORIZONS Web-Interface page](https://ssd.jpl.nasa.gov/horizons.cgi?CGISESSID=4f071eb036a53cdde6734789ff0cfa6e#top), under Special Options, the 3rd bullet is  'show "batch-file" data (for use by the E-mail interface)'
steveOw
CC BY-SA 4.0
2022-03-04T16:50:28.560Z
December 2, 2021 -- Version 4.92 * TLIST values may now include calendar dates in addition to JD and MJD numeric forms, if each value is individually enclosed in quotes. For example: TLIST= '2021-Dec-03 12:10:43.21' '2023-05-17 09:11:01' '2459551.367633' '2033-07-15 02:52.771' '17bc-feb-2 01:00' See the updated command-file example documentation here: https://ssd.jpl.nasa.gov/ftp/ssd/hrzn_batch.txt
PM 2Ring
CC BY-SA 4.0
2022-03-14T17:22:01.570Z
@PM 2Ring Its a while since I last worked in this area but thanks for the information.
steveOw
<orbit><ephemeris>
JPL Horizons - how to format TLIST input times for Email query?
steveOw
# JPL Horizons - how to format TLIST input times for Email query?

(Asked by: username_0 on 2018-01-16)

I am trying to get a list of all of Mercury's Perihelia and Aphelia over a period of multiple decades. For each event I need X,Y,X and Vx,Vy,Vz data.
Knowing the time of the first event it is easy to obtain approximate times of the subsequent events using the known orbital period.
I have managed to acquire values using the manual web interface to JPL Horizons.  Working on one event at a time I can get data for an epoch within one minute of each event.  But I want (a) timings to the nearest second and (b) to obtain a whole series of apsides events in one go.
The JPL Horizons email interface seems to be the way to go. Using this I have been able to obtain data for a particular time range and step interval. But, as with the web interface, it is not possible (in one go) to cover the whole multi-decade period at the desired resolution (1s).
So now I want to use the TLIST facility to specify a list of individual event times (times at 1s intervals within a range from several seconds before and after the approximate time of each apsides event).
The documentation - see how to get Horizons email documentation mailed to you - includes this section on TLIST:-
!TLIST allows users to specify up to 10000 discrete times
!individually. If TLIST is used, START_TIME, STOP_TIME and
!STEP_SIZE are ignored. TLIST is a list of either "Julian
!Day Numbers" (JD) or "Modified Julian Day Numbers"
!(MJD; days since Nov 17, 1858 (JD 2400000.5)).

!In either case, the input is one or more real numbers.
!The program puts TLIST in ascending chronological order
!and determines whether it is JD or MJD based on smallest
!day number.  Example usage:
!
!   TLIST= '2451454.8937833' '2451455.11256351'
!          '2451456.45576728'
!          '2451459.65778822'
!          '2451458.97618331'
!          '2451459.72787832'
!          '2451462.25656722'
!
!   Note that there can be more than one value on the line
!   OR one per line. Line length should be less than 80
!   characters. List is space or comma delimited. "TLIST="
!   is used only once so it does not supercede any previous
!   assignment in the command file.


 TLIST = 200*' '

But I am having a problem in formatting the TLIST input data in a way that the program will accept.  Every attempt so far has returned an error message of the form "BATVAR: cannot read TLIST value: --F4F5E805D2040CE6C2".
I have emailed the system manager but have had no response so far.
Below is a copy of the email text which I have been sending (format = To:   horizons@ssd.jpl.nasa.gov Subject: JOB ****** ).  
I would be grateful if anyone can suggest what needs to be done with the data format for the TLIST command.
!$$SOF
EMAIL_ADDR = '************@gmail.com'
!...Target= Mercury
COMMAND= '199'
!...Reference Site = Centre of Sun
CENTER= '500@10'
MAKE_EPHEM= 'YES'
TABLE_TYPE= 'VECTORS'
OUT_UNITS= 'KM-S'
REF_PLANE= 'ECLIPTIC'
REF_SYSTEM= 'J2000'
VECT_CORR= 'NONE'
VEC_LABELS= 'YES'
VEC_DELTA_T= 'YES'
CSV_FORMAT= 'YES'
OBJ_DATA= 'YES'
VEC_TABLE= '2'
!
! The following works OK (but I want to use TLIST)
!
!START_TIME= 'JD 2451590.2526841'
!STOP_TIME= 'JD 2451590.2596841'
!STEP_SIZE= '1 m'
!
!
! What I desire (but it fails):-
!
!TLIST=
!'2451546.2714931'
!'2451546.2715046'
!'2451546.2715162'
!'2451546.2715278'
!'2451546.2715393'
!'2451546.2715509'
!'2451546.2715625'
!
! Test (it failed)
!
   TLIST= '2451454.8937833,2451455.11256351,'
          '2451456.45576728,'
          '2451459.65778822,'
          '2451458.97618331,'
          '2451459.72787832,'
          '2451462.25656722'
!
!
! The Following Fail:-
!
!   TLIST= 'JD 2451454.8937833' 'JD 2451455.11256351'
!          'JD 2451456.45576728'
!          'JD 2451459.65778822'
!          'JD 2451458.97618331'
!          'JD 2451459.72787832'
!          'JD 2451462.25656722'
!
!   TLIST= '2451454.8937833' '2451455.11256351'
!          '2451456.45576728'
!          '2451459.65778822'
!          '2451458.97618331'
!          '2451459.72787832'
!          '2451462.25656722'
!
!TLIST= '2451546.27149310' '2451546.27149310'
! '2451546.27150460'
!
!TLIST= '2451546.2714931' '2451546.2714931'
! '2451546.2715046'
!
!TLIST= '
! 2451546.2714931
! 2451546.2715046
! 2451546.2715162'
!
!TLIST= '
! 2451546.2714931,
! 2451546.2715046,
! 2451546.2715162'
!
!TLIST= ''2451546.2714931', '2451546.2715046', '2451546.2715162''
!
!TLIST= '2451546.2714931', '2451546.2715046', '2451546.2715162'
!
!TLIST= '2451546.2714931' '2451546.2715046' '2451546.2715162'
!
!TLIST= '2451546.2714931 2451546.2715046 2451546.2715162'
!
!TLIST='2451546.2714931,2451546.2715046,2451546.2715162'
!
!TLIST=200*''
!
!TLIST= '2451454.8937833' '2451455.11256351'
!
!TLIST= '2451546.2'
!
!TLIST='2451546.2714931''2451546.2715046''2451546.2715162'!'2451546.2715278',
!'2451546.2715393',
!'2451546.2715509',
!'2451546.2715625'
!
!$$EOF

**Tags:** orbit, ephemeris

> **Comments:**
> **username_0**: @uhoh Thanks for your suggestions and offer. At the moment I am focusing  on JPL Horizons and my current Plan B for this particular query is to use the NASA WebGeoCalc online app.  But I would like to solve the JPL Horizons email TLIST problem not just for this apsides-related query but for other possible types of query in the future.  Unfortunately I have not used Python but please feel free to post an answer with your method as it may help other users in the future.  
> **username_0**: @barrycarter. Thanks.  (Re:previous comment 1) The HORIZONS web interface doesn't provide TLIST functionality.  CSPICE is too heavy for me right now. (Re comment 2): The HORIZONS email documentation indicates that comment lines (prefixed by !) can appear anywhere.  I have recently found that one particular TLIST format does work OK despite having additional comment lines. I have added it at the end of the question.  
> **username_0**: @uhoh Many thanks for the suggestions. I have moved my update into an answer and included the links. Re: Email button - on the [HORIZONS Web-Interface page](https://ssd.jpl.nasa.gov/horizons.cgi?CGISESSID=4f071eb036a53cdde6734789ff0cfa6e#top), under Special Options, the 3rd bullet is  'show "batch-file" data (for use by the E-mail interface)'  
> **username_1**: December 2, 2021 -- Version 4.92 * TLIST values may now include calendar dates in addition to JD and MJD numeric forms, if each value is individually enclosed in quotes. For example: TLIST= '2021-Dec-03 12:10:43.21' '2023-05-17 09:11:01' '2459551.367633' '2033-07-15 02:52.771' '17bc-feb-2 01:00' See the updated command-file example documentation here: https://ssd.jpl.nasa.gov/ftp/ssd/hrzn_batch.txt  
> **username_0**: @username_1 Its a while since I last worked in this area but thanks for the information.  

---

## 1 answers

### Answer by username_0 on 2018-01-19. Score: 2 | Accepted answer

By trial and error I found that the following email text (including intermediate comment lines) is acceptable to HORIZONS:-
!$$SOF
EMAIL_ADDR = 'xxxxxx@gmail.com'
!...Target= Mercury
COMMAND= '199'
!...Reference Site = Centre of Sun
CENTER= '500@10'
MAKE_EPHEM= 'YES'
TABLE_TYPE= 'VECTORS'
OUT_UNITS= 'KM-S'
REF_PLANE= 'ECLIPTIC'
REF_SYSTEM= 'J2000'
VECT_CORR= 'NONE'
VEC_LABELS= 'YES'
VEC_DELTA_T= 'YES'
CSV_FORMAT= 'YES'
OBJ_DATA= 'YES'
VEC_TABLE= '3'
TLIST= '2451546.27149305' '2451546.27150462'
 '2451546.2715162'
 '2451546.27152777'
 '2451546.27153934'
!
! The following works OK but I want to use TLIST
!
!START_TIME= 'JD 2451590.9526841'
!STOP_TIME= 'JD 2451591.0596841'
!STEP_SIZE= '10 m'
!
!$$EOF

However, I can't say that I have found the reason why all the previous submissions failed to execute.  For example if I move the final 7-line comment block (leaving the !$$EOF line in place at the end) and put it in front of the TLIST command line ... then the job fails.
Nonetheless I have a format for using TLIST which works OK for me now.
Useful Links
JPL HORIZONS web interface
https://ssd.jpl.nasa.gov/?horizons#email
https://ssd.jpl.nasa.gov/dat/Configuring_Mail_Clients_to_Send_Plain_ASCII_Text.pdf


---

