IMPORT







Syntax




   IMPORT  @file (0:1) AS @schedule


Description




The IMPORT command reads (imports) the contents of a schedule (intervals and annotation) from a disk file. Schedules that require considerable resources to develop (for instance, the occultations of a particular satellite during the course of a year) may be saved in files (with the EXPORT command), and restored for use during later sessions.



Optional arguments



You may specify both the name of the schedule to be created and the name of the file to be read:

   IMPORT JUPITER_MAX_DIAM.SCH AS JMAX ;
You may omit the ``AS name'' portion of the IMPORT command. In such a case, the name of the file will be determined by first examining the specified file to see if the name is present in the file. If so that name will be used. If the name of the schedule is not present in the file, a name will be constructed from the name of the file, provided the file name can be converted to an allowed schedule name. If the schedule name is not present in the file and the file name can not be converted to a schedule name, the name of the imported schedule will be

   SCHEDULE_xyz
where `x', `y', and `z' are chosen from the digits `0', `1', ... , `9'.



Schedule files



Typically, schedules are imported from files originally written with the EXPORT command. However, the IMPORT command can restore a set of intervals from any file that has the correct format.

The following is an example of an acceptable input file.

   Schedule>>: IO_OCCULTATIONS UTC UTC
 
   Occultations of Io, determined by D. Taggart in test
   session 3/17/89. Experimental radii for Io, Jupiter.
 
   '1984 SEP 23 00:00:00'    '1984 SEP 23 00:36:15'
   '1984 SEP 24 16:55:53'    '1984 SEP 24 19:05:04'
   '1984 SEP 26 11:25:17'    '1984 SEP 26 13:33:58'
   '1984 SEP 28 05:53:31'    '1984 SEP 28 08:02:36'
   '1984 SEP 30 00:21:44'    '1984 SEP 30 02:31:35'
   '1984 OCT 01 18:51:03'    '1984 OCT 01 21:00:23'
   '1984 OCT 03 13:19:21'    '1984 OCT 03 15:28:52'
The first non-blank line contains the marker ``Schedule>>:'' When this marker is present, the next word of the first line is taken as the name of the schedule to create. The next two markers, if present, are interpreted as the time system of the beginning and ending times of each interval of the schedule. Allowed values are:

   UTC            (Coordinated Universal Time)
   TDB            (Barycentric Dynamical Time)
   TDT            (Terrestrial Dynamical Time)
   PDT            (Pacific Daylight Time)
   PST            (Pacific Standard Time)
   MDT            (Mountain Daylight Time)
   MST            (Mountain Standard Time)
   CDT            (Central Daylight Time)
   CST            (Central Standard Time)
   EDT            (Eastern Daylight Time)
   EST            (Eastern Standard Time)
 
   UTC+/-HR:MN    (hour and minute offsets from UTC)
Any other words that appear on the first non-blank line are ignored.

All subsequent non-blank lines following the title line and prior to the first line that contains two epochs, are regarded as annotation for the schedule.

Finally, the actual intervals are regarded as beginning with the first line that contains two quoted epochs followed by nothing or arbitrary text. Intervals must be listed one interval per line, as shown above.

Intervals need not be ordered, and may overlap: the program will form the schedule represented by the union of the input intervals and order the resulting intervals appropriately. (Note that the length of the interval, which is written following the epochs by the EXPORT command, is not required for restoration. It is merely provided by the EXPORT command for your convenience in comparing the lengths of intervals.)

Lines in which the first non-blank character is something other than an apostrophe are ignored.



Examples






Example 1



The IMPORT command may be used to restore schedules that have already been computed---for example, schedules containing mutual satellite events---in a fraction of the time that would be required to recompute them.

   IMPORT OCCULTATIONS.SCH AS OCC;
   IMPORT ECLIPSES.SCH     AS ECL;
   IMPORT TRANSITS.SCH     AS TRN;


Example 2



The EXPORT and IMPORT commands may also be used to store and restore schedules created during the current session, reducing the possibility that the maximum number of schedules will be exceeded.

   FIND OCCULTED OCCULTATION OF IO BY JUPITER
        FROM EARTH STEP SIZE 20 MINUTES;
 
   EXPORT OCCULTED;
   FORGET SCHEDULE OCCULTED TO occulted.sch;
    .
    .
   IMPORT occulted.sch;
Note that the name of the schedule has been omitted in the IMPORT command. The name of the schedule is stored in the exported file and will be used when the schedule is IMPORTED.



Related Topics




  1. Export
  2. About Schedules
  3. The Percy Help System