Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.stsci.edu/spst/UnixTransition/doc/calrep_calopt_unix.html
Дата изменения: Fri Apr 8 12:46:14 2016
Дата индексирования: Mon Apr 11 05:13:48 2016
Кодировка:

Поисковые слова: п п п п п п п п п п п п п п п п п п п п п п п п п п п п
Python: module calrep_calopt_unix
 
 
calrep_calopt_unix (version 15.08.20)
index
calrep_calopt_unix.py

PURPOSE --
A module for dealing with CALOPT and its output.
 
DEVELOPER --
Don Chance
 
MODIFICATION HISTORY --
Initial implemetation 11/1/99
Beef up the run function drc 6/16/00
Add a logfile option drc 6/29/00
Added errors_list and printing of warning on an empty .usr file  drc 7/21/00
Fix formatting on all.usr file drc 8/25/00
Updated output format for SPSS 43.4 (Orient angle column) 10/12/00
Check for missing .usr files drc 11/2/00
Fix bug in the checking for missing .usr files drc 1/3/01
Allow setting calopt interval parameter from command line APP 4/13/01
Replace lpspr with genscript.  drc 7/26/02
Replace genscript with enscript. drc 11/4/04
Add overrides for the B-field/Gx slew alignment constraints
  to essentially eliminate the check.  mdr 6/23/05
Add check of LRP estimated orbits.  gab 10/05/07
Improve parsing of scheduling places.  gab 03/11/08
Rework finding inefficient SUs. drc 12/14/10
Handle unset priorities gracefully. drc 5/4/11
Add new Python pcalopt. drc 7/6/11
Find SU's causing WFC3/IR overlights.  gab  10/3/12
Don't assume the default use of the cpu nodes file. mdr 12/21/12
Fix bug with lower case SU id. drc 10/10/14
code cleanup. drc 4/15/15
updated for su_util.su code changes. drc 8/20/15

 
Modules
       
ccl_util
file_util
glob
os
pcalopt
re
spss_sys_util
sys
time_util
visit_util
wfc3_ir_overlight_check

 
Functions
       
calopt_string(calendar, sus='all', interval=3600, prefix=None, handoff=None, verbose=None, verify=None)
Construct a calopt command.
 
Returns a calopt command, as a string.  All input parameters
are to be strings, except for interval which should be an
integer.  The parameters here correspond to parameters on the
CALOPT SPSS command.  See the SPSS help for their exact meaning.
calrep_calopt(calendar, interval, logfile=<open file '<stdout>', mode 'w' at 0x47078>)
Create the calendar report and generate the usr files in parallel.
 
Input parameter, 'calendar', must be a ccl object. Calls
'spss_sys_util.parallel_rsh' to generate the usr files.
ceil(...)
ceil(x)
 
Return the ceiling of x as a float.
This is the smallest integral value >= x.
check_su_efficiency(calendar, usrlist)
Check SU scheduling in the calopt output. Determine if the actual
number of orbits exceeds the estimated number of orbits.
check_sus_for_overlight(calendar)
Find SU's that cause WFC3/IR overlight conditions.
cmp_usr_list(usrlist1, usrlist2)
Used to sort the list with contents of all the .usr files.
 
Sorts by priority first, then SU id, then slew end time, etc.
parse_usr(candidates, calendar)
Converts the contents of the usr files in the current directory to a list.
 
Reads the .usr files in the current working directory and puts their contents
into a list, leaving out the header lines.
place_calopt(calendar, printer=None)
Produces an ASCII graphical presentation of .usr file data.
 
Calls Fortran program 'pcalopt.'  Requires a calendar object as input.
This function sets up the three files the Fortran needs as input, then
calls the Fortran.
run(cclname=None, *args)
Run the CALOPT procedure.
 
Usage:
     do calrep_calopt_unix cclname [-np] [-dprinter] [-nc] [-l[file_name]]
                                   [-iseconds]
 
     Parameter cclname is a calendar name.  The calendar name may
     optionally be followed by a colon and a version number.  The version
     defaults to 1.  (Example 001787AD:01)
 
     By default, the ASCII graphics will be generated and sent to the
     printer. When the -np option is given, the ASCII graphics will not be
     generated.
 
     The -d option specifies the destination queue for the print job. By
     default, the print job will be sent to the queue specified in the
     PRINTER environment variable. (Example: -dlw5)
 
     By default, CALOPT is run on all the SUs in the .report file (a
     .report file will be generated, if it does not already exist).  The
     -nc option will suppress the execution of the CALOPT jobs.  This is
     useful when you already have the .usr files and only want to generate
     the ASCII graphics.
 
     The -l option will cause a log file to be generated for the calopt runs.
     Otherwise, all output will be sent the standard out.  The file name is
     optional. Without the file name, the output will be sent to
     <ccl_name>_calopt.log
 
     The -i option allows setting of the interval that will be used in the
     calopt commands.  The default for seconds is 3600.

 
Data
        CPU_NODE_FILE = '/data/scheduling/spss_tools/dat/fast_systems.dat'
FHST_1_ROLL_ERROR = 20000.0
FHST_2_ROLL_ERROR = 20000.0
FHST_SLEW_THRESHOLD = 0.0
TGYRO_MAG_ANGLE_LIMIT = 0.001
TGYRO_MAG_RECOVERY_B = 1.0
TGYRO_PRESLEW_MAG_LIMIT = 0.001
__version__ = '15.08.20'