1
2
3
4 """
5 Fills the ppErrBits attribute of the detection tables.
6
7 @author: R.S. Collins
8 @org: WFAU, IfA, University of Edinburgh
9 """
10
11 from wsatools.CLI import CLI
12 from wsatools.Logger import Logger
13 from wsatools.SourceMerger import TilePawPrintMerger
14
15
16
17
18 if __name__ == "__main__":
19
20
21
22 CLI.progArgs += [
23 CLI.Argument("begin_date", "P85", isValOK=CLI.isDateOK),
24 CLI.Argument("end_date", "P85", isValOK=CLI.isDateOK)]
25
26 CLI.progOpts += [
27 CLI.Option('d', "deepOnly", "just do deep tiles only"),
28 CLI.Option('r', "reCreate", "Drop and create tables"),
29 CLI.Option('a', "addDefaults", "Add defaults to the tables only"),
30 CLI.Option('l', "mfIDList", "List of tile multiframeIDs to update","LIST")]
31
32
33 CLI.progArgs["comment"] = "Merging tile and pawprint detections"
34
35 cli = CLI(TilePawPrintMerger, "$Revision: 8533 $")
36 Logger.isVerbose = False
37 Logger.addMessage(cli.getProgDetails())
38
39 cu = TilePawPrintMerger(cli.getArg("programmeID"), cli=cli)
40
41 if cu.sysc.isVSA() and not cu.programme.getAttr("sourceProdType")=='stack':
42 cu.recreate = cli.getOpt("reCreate")
43 if cli.getOpt("deepOnly"):
44 cu.deepOnly = cli.getOpt("deepOnly")
45 else:
46 cu.dateRange = cu.sysc.obsCal.dateRange(cli.getArg("begin_date"),
47 cli.getArg("end_date"))
48 cu.addDefaults = cli.getOpt("addDefaults")
49 if cli.getOpt("mfIDList"):
50 cu.newTileList=cli.getOpt("mfIDList").split(',')
51 cu.run()
52