# HG changeset patch # User Victor Nicolae # Date 1513250692 -7200 # Node ID 2f3f75e5b99e93adc7db9e0d03e1a7ef424d901e # Parent 6511136e69375302d1934b8532857af282c75398# Parent ef3b6f838da1d5d83d16c1fe0c55fe62865dbef5 Merge. diff -r ef3b6f838da1 -r 2f3f75e5b99e atmospheric_lidar/scripts/licel2scc_depol.py --- 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()