Thu, 14 Dec 2017 13:24:15 +0200
Add initial support for licel2scc_depol dark measurements command line option.
atmospheric_lidar/scripts/licel2scc_depol.py | file | annotate | diff | comparison | revisions |
--- 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()