| Home | Trees | Indices | Help |
|
|---|
|
|
1 #! /usr/bin/env python
2 #------------------------------------------------------------------------------
3 #$Id: UpdateQC.py 7012 2010-05-27 19:08:14Z RossCollins $
4 """
5 Performs quality control on surveys not covered by NonSurveyRelease nor own
6 QC scripts.
7
8 @author: R.S. Collins
9 @org: WFAU, IfA, University of Edinburgh
10 """
11 #------------------------------------------------------------------------------
12 from wsatools.CLI import CLI
13 from wsatools.Logger import Logger
14 from wsatools.QualityControl import NonSurveyDeprecator
15 #------------------------------------------------------------------------------
16 # Entry point for script.
17
18 # Allow module to be imported as well as executed from the command line
19 if __name__ == "__main__":
20 # Define additional command-line interface options for NonSurveyDeprecator
21 CLI.progArgs.append(CLI.Argument("programmeID", "CAL"))
22 CLI.progArgs.append(CLI.Argument("end_date", "07A", isValOK=CLI.isDateOK))
23
24 # Reset the default comment
25 CLI.progArgs["comment"] = "Deprecating frames for quality control"
26 cli = CLI(NonSurveyDeprecator, "$Revision: 7012 $")
27
28 Logger.isVerbose = False
29 Logger.addMessage(cli.getProgDetails())
30
31 cu = NonSurveyDeprecator(cli=cli)
32 try:
33 cu.endDate = cu.sysc.obsCal.dateRange(end=cli.getArg("end_date")).end
34
35 except Exception as error:
36 eType = "Invalid Option"
37 Logger.addExceptionMessage(error, eType)
38 raise SystemExit(eType + ": see log " + cu._log.pathName)
39
40 # Perform date-delimited frame deprecations
41 cu.run()
42 del cu
43
44 # Propagate deprecations to detections
45 NonSurveyDeprecator(cli.getArg("programmeID"), cli=cli).run()
46
47 #------------------------------------------------------------------------------
48 # Change log:
49 #
50 # 23-Nov-2009, NJC: Original version.
51
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Sep 8 15:47:03 2014 | http://epydoc.sourceforge.net |