Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.stsci.edu/spst/UnixTransition/doc/sched_util.html
Дата изменения: Fri Apr 8 12:46:15 2016
Дата индексирования: Mon Apr 11 00:39:25 2016
Кодировка:
Python: module sched_util
 
 
sched_util (version 15.09.08)
index
sched_util.py

PURPOSE --
A module for handling the pass tdrs schedule and ground station files.
 
DEVELOPER --
Greg Wenzel
 
MODIFICATION HISTORY --
 
o  initial implementation  GWW   03/08/02
o  Updated tdrs_schedule class to accomodate schedman runs in summary mode.
   drc 4/23/03
o  Update for new V* contacts GWW 4/26/04
o  Improve get_times_from_tdrs. dc 2/3/05
o  improve error message from bad CFM time. drc 7/12/08
o  fix 4-tdrs bug. drc 8/12/09
o  add tds to TDRS_A_LIST. drc 12/21/10
o  archive cfm files drc 3/21/12
o  updated for new TDRS-K (172) drc 10/30/13
o  add H\d\d as a possible return code in get_times_from_cfm drc 1/30/14
o  get TDRS lists from tdrs_util. drc 11/25/14
o  fix namelist naming problem. drc 4/2/15
o  code cleanup. drc 4/6/15
o  use namelist_util.read_namelist drc 9/8/15

 
Modules
       
configure_util
os
pass_util
re
time_util

 
Classes
       
configure_util.configured_file
gstdn_schedule
tdrs_schedule

 
class gstdn_schedule(configure_util.configured_file)
    A class for ground station schedule products.
 
  Methods defined here:
__init__(self, linesumm_path, root_output_path)
Constructor for ground station schedule subclass.
__repr__(self)
returns file_name of product
delete_files(self)
deletes output files.
get_span(self)
get time span of gstdn file.
run(self, sw_version, vms=False, verbose=False)
runs pass software to create ground station schedule file
set_linesumm_path(self, path)
set linesumm file and read time info.
set_root_output_path(self, path)
top level of output
expected to be:
               '/vms/spst_ms/' for ops run
               '/vms/spst_ms/<accountname>/<date>/' for test run.

Methods inherited from configure_util.configured_file:
copy(self)
return a copy of self with current create time
get_comment(self)
gets comment for this configured file type.
get_configured_path(self)
return the file path to the configured file
get_configured_variable(self)
returns the environment definition variable for this configured file.
get_create_time(self)
returns create time
get_end_time(self)
returns the end time of span for which this file is valid.
get_environment_definition_list(self, vms=False)
returns a list of environment definition lines.
get_start_time(self)
returns the start time of span for which this file is valid.
report(self)
print out objects information.
set_configured_path(self, file_path)
sets the path for the configured file
set_configured_variable(self, var)
sets the environment definition variable for this configured file.
set_create_time(self)
returns create time
set_span(self, t1=None, t2=None)
sets the time span for which this file is valid.
validate(self)
checks for configured file existence.

 
class tdrs_schedule(configure_util.configured_file)
    A class for tdrs schedule products.
 
  Methods defined here:
__init__(self, run_mode, root_output_path, cfm_path=None)
Constructor for tdrs schedule subclass
__repr__(self)
returns file_name of product
create_namelist(self, start=None, end=None, max_days=28, sw_version='ops')
internal / private use
works with pass 31.60 and later on both unix and VMS.
delete_files(self)
deletes output files.
get_cfm_file(self)
returns the cfm file path.
get_lis_path(self)
returns self.new_tdrs_list_path
get_log_path(self)
returns self.new_tdrs_log_path
get_option(self)
Returns run option (replace, summary, delete, or, update)
get_output_directory(self)
return output_directory
get_schedule_path(self)
returns self.new_tdrs_file_path
get_span(self)
gets time span of tdrs data file.
get_update_mode(self, update=False)
set update mode. update=false will replace schedule
run(self, start=None, end=None, max_days=28, sw_version='ops', vms=False, verbose=False)
runs pass software to create tdrs schedule file
set_cfm_file(self, path)
set cfm file and read tdrs and time info.
set_old_tdrs_file_path(self, path)
checks and sets old tdrs file used for update/delete option.
set_option(self, option)
Set the run option.
 
Allowed values are replace, summary, delete, or, update
set_output_directory(self, path)
Set output_directory.
 
Use to override the setting of this directory by
set_root_output_path. In this case, 'path' should
be an already existing directory.
set_root_output_path(self, path)
top level of output
expected to be:
               '/vms/spst_ms/' for ops run
               '/vms/spst_ms/<accountname>/<date>/' for test run.
set_span(self)
sets time span of tdrs data file.
set_update_mode(self, update=False)
set update mode. update=false will replace schedule

Data and other attributes defined here:
SCHEDMAN_RUN_MODES = ['replace', 'delete', 'summary', 'update']

Methods inherited from configure_util.configured_file:
copy(self)
return a copy of self with current create time
get_comment(self)
gets comment for this configured file type.
get_configured_path(self)
return the file path to the configured file
get_configured_variable(self)
returns the environment definition variable for this configured file.
get_create_time(self)
returns create time
get_end_time(self)
returns the end time of span for which this file is valid.
get_environment_definition_list(self, vms=False)
returns a list of environment definition lines.
get_start_time(self)
returns the start time of span for which this file is valid.
report(self)
print out objects information.
set_configured_path(self, file_path)
sets the path for the configured file
set_configured_variable(self, var)
sets the environment definition variable for this configured file.
set_create_time(self)
returns create time
validate(self)
checks for configured file existence.

 
Functions
       
get_times_from_cfm(file_path)
returns start and end times of the cfm file as well as
the tdrs pair used in the file.
get_times_from_linesumm(file_path)
Gets start and end times of a configured tdrs schedule file(tdrs.dat)
returns a window object.
get_times_from_tdrs(file_path)
Gets start and end times of a configured tdrs schedule file(tdrs.dat)
returns a window object.

 
Data
        EAST_STATIONS = ('TDE', 'TDS', '049')
TDRS_A_LIST = ('TDE', 'TDS', '049')
TDRS_B_LIST = ('TDW', '171', '150')
WEST_STATIONS = ('TDW', '171', '150')
__version__ = '15.09.08'