# HG changeset patch # User Victor Nicolae # Date 1513250655 -7200 # Node ID 6511136e69375302d1934b8532857af282c75398 # Parent b20b59b350d52668b54c8c131c8f60938d066692 Add initial support for licel2scc_depol dark measurements command line option. diff -r b20b59b350d5 -r 6511136e6937 atmospheric_lidar/scripts/licel2scc_depol.py --- a/atmospheric_lidar/scripts/licel2scc_depol.py Thu Dec 07 18:16:24 2017 +0200 +++ b/atmospheric_lidar/scripts/licel2scc_depol.py Thu Dec 14 13:24:15 2017 +0200 @@ -96,6 +96,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() @@ -126,6 +129,16 @@ args.pressure) 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()