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

PURPOSE --
A module for dealing with plan windows
 
DEVELOPER --
Bill Workman
 
MODIFICATION HISTORY --
Date        Who            What
====        ===            ====
10-16-02    Workman        Initial implementaion.
 8-05-04    Chance         Cleanup and refactored.
 3-15-05    Chance         More cleanup and refactoring.
 5-03-05    chance         fix earliest_start function
 6-06-05    Chance         Add processing_error_reason code
11-14-05    Chance         add __repr__ function to planOrient
11-15-05    Chance         improve __repr__ function
 6-06-06    Chance         fix constructor to not reinialize visit
                           if it's already a visit_util.visit object
 6-14-06    Chance         improve latest_end, earliest_start functions
 8-22-06    Chance         move get_windowlette_sum and get_total_duration to
                           time_util.window_list class
 6-03-15    Chance         add get_all_plan_windows_for_lrp function
 6-10-15    Chance         updated to work better with pyodbc
 8-06-15    Jones          Use 'sunit_id' dict value instead of str()
                           as parameter to DB queries involving sunit_id

 
Modules
       
lrp_util
spss_sys_util
stpydb
time_util
visit_util

 
Classes
       
__builtin__.object
planOrient
time_util.window_list(__builtin__.list)
planWindow

 
class planOrient(__builtin__.object)
    A class for a plan orient window.
 
  Methods defined here:
__init__(self, lrp, visit)
Constructor for a plan orient object.
__repr__(self)
get_v3_max_ang(self)
get_v3_min_ang(self)
get_v3_pref_ang(self)

Static methods defined here:
__new__(cls, lrp, visit)
Return planOrient object from internal dictionary
if it already exists.

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class planWindow(time_util.window_list)
    A class for a plan window.
 
Definition:
A plan window is a list of one or more time windows
(windowlettes) that define a set of intervals in which an
associated visit may be executed;
 
 
Method resolution order:
planWindow
time_util.window_list
__builtin__.list
__builtin__.object

Methods defined here:
__init__(self, lrp, visit, pw_list=[])
Constructor for a plan window object.
 
If the input parameter 'data' is not a planWindow object or a
pair of spss_times, a
TypeError will be raised.
get(self, field, failobj=None)
Gets the value of field.
Will retrieve it from the PMDB if needed.
get_implied_fr_date(self)
Return the flight ready date implied by the earliest plan window
begin.
 
This is 3 weeks before the Monday before the earliest PW begin.

Static methods defined here:
__new__(cls, lrp, visit, pw_list=[])
Return planWindow object from internal dictionary
if it already exists.

Methods inherited from time_util.window_list:
__add__(self, other)
__eq__(self, other)
Equals comparison.
__ne__(self, other)
__repr__(self)
The string representation of a window list.
 
Returns a string containing each
pair of times for each window in the list.
complement(self, interval=1980.001:00:00:00 - 2028.001:23:59:59)
Returns the complement of a set of windows over 'interval'.
Interval defaults to infinity as defined by the constant
INFINITE_WINDOW.
If there is no complement, None is returned.
contains(self, other)
Returns True if other is total contained within self.
Otherwise returns False.
earliest_start(self)
Return the earliest window start time.
find_window_containing(self, t)
Return the first window containing time t or None if none do.
get_total_duration(self)
Gets the delta time between earliest windowlette start and latest
windowlette end for the plan window.
get_windowlette_sum(self)
Gets the sum of the delta times for all windowlettes in the plan
window.
intersection(self, other)
Finds the intersection between two window_lists.
 
Input parameter 'other' must be a window_list.
Raises a TypeError if 'other' is not a window_list.
latest_end(self)
Return the lastest window end time.
sort(self, key=<function window_keyfunc>)
Sort this window_list based on the input 'cmpfunc'.
 
Default sorts are done with the 'window.compare' function.
union(self)
Returns the union of the current set of windows.

Data descriptors inherited from time_util.window_list:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Methods inherited from __builtin__.list:
__contains__(...)
x.__contains__(y) <==> y in x
__delitem__(...)
x.__delitem__(y) <==> del x[y]
__delslice__(...)
x.__delslice__(i, j) <==> del x[i:j]
 
Use of negative indices is not supported.
__ge__(...)
x.__ge__(y) <==> x>=y
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__gt__(...)
x.__gt__(y) <==> x>y
__iadd__(...)
x.__iadd__(y) <==> x+=y
__imul__(...)
x.__imul__(y) <==> x*=y
__iter__(...)
x.__iter__() <==> iter(x)
__le__(...)
x.__le__(y) <==> x<=y
__len__(...)
x.__len__() <==> len(x)
__lt__(...)
x.__lt__(y) <==> x<y
__mul__(...)
x.__mul__(n) <==> x*n
__reversed__(...)
L.__reversed__() -- return a reverse iterator over the list
__rmul__(...)
x.__rmul__(n) <==> n*x
__setitem__(...)
x.__setitem__(i, y) <==> x[i]=y
__setslice__(...)
x.__setslice__(i, j, y) <==> x[i:j]=y
 
Use  of negative indices is not supported.
__sizeof__(...)
L.__sizeof__() -- size of L in memory, in bytes
append(...)
L.append(object) -- append object to end
count(...)
L.count(value) -> integer -- return number of occurrences of value
extend(...)
L.extend(iterable) -- extend list by appending elements from the iterable
index(...)
L.index(value, [start, [stop]]) -> integer -- return first index of value.
Raises ValueError if the value is not present.
insert(...)
L.insert(index, object) -- insert object before index
pop(...)
L.pop([index]) -> item -- remove and return item at index (default last).
Raises IndexError if list is empty or index is out of range.
remove(...)
L.remove(value) -- remove first occurrence of value.
Raises ValueError if the value is not present.
reverse(...)
L.reverse() -- reverse IN PLACE

Data and other attributes inherited from __builtin__.list:
__hash__ = None

 
Functions
       
get_all_plan_window_status_info(lrp)
Get all the plan window status info for all the visits in an lrp.
get_all_plan_windows_for_lrp(lrp)
Construct all the plan windows for all the visits in an lrp.

 
Data
        PLAN_WINDOW_CHANGES_FIELDS = ('change_date', 'user_name', 'tool_used', 'reason')
PLAN_WINDOW_STATUS_FIELDS = ('su_track_status', 'active_flag', 'lrp_state', 'usc', 'plib_ver', 'status', 'schedulable', 'processing_error', 'execution_time')
__version__ = '15.08.06'
assist_db = 'assist'
spss_db = 'spss'