Merge.

Thu, 14 Dec 2017 13:24:52 +0200

author
Victor Nicolae <victor.nicolae@inoe.ro>
date
Thu, 14 Dec 2017 13:24:52 +0200
changeset 107
2f3f75e5b99e
parent 106
6511136e6937 (diff)
parent 105
ef3b6f838da1 (current diff)
child 108
b5a0a2d2ce81

Merge.

atmospheric_lidar/scripts/licel2scc_depol.py file | annotate | diff | comparison | revisions
--- a/atmospheric_lidar/scripts/licel2scc_depol.py	Wed Dec 13 14:19:38 2017 +0200
+++ b/atmospheric_lidar/scripts/licel2scc_depol.py	Thu Dec 14 13:24:52 2017 +0200
@@ -104,6 +104,9 @@
     parser.add_argument('-s', '--silent', help="Show only warning and error messages.", action="store_const",
                         dest="loglevel", const=logging.WARNING
                         )
+    parser.add_argument('-D', '--dark_measurements', help="Location of files containing dark measurements. Use relative path and filename wildcars, see 'files' parameter for example.",
+                        default="", dest="dark_files"
+                        )
     parser.add_argument('--version', help="Show current version.", action='store_true')
 
     args = parser.parse_args()
@@ -134,6 +137,16 @@
                                                  args.pressure, args.licel_timezone)
 
     measurement = CustomLidarMeasurement(plus45_files, minus45_files)
+    
+    # Get a list of files containing dark measurements
+    if args.dark_files != "":
+        dark_files = glob.glob(args.dark_files)
+
+        if dark_files:
+            logger.debug("Using %s as dark measurements files!" % ', '.join(dark_files))
+            measurement.dark_measurement = CustomLidarMeasurement(dark_files, dark_files)
+        else:
+            logger.warning('No dark measurement files found when searching for %s. Will not use any dark measurements.' % args.dark_files)
 
     try:
         measurement = measurement.subset_by_scc_channels()

mercurial