Esempio n. 1
0
    sensors = args.sensor
    minimum_response = args.minimum_response
    xlimits = args.xlimits
    ylimits = args.ylimits
    title = args.title
    if not title:
        title = 'Relative Spectral Responses'
    filename = args.filename
    no_platform_name_in_legend = args.no_platform_name_in_legend
    wavel_res = args.wavelength_resolution
    verbose = args.verbose

    if verbose:
        logging_on()
    else:
        logging_off()

    req_wvl = None
    band = None
    wvlmin, wvlmax = args.range
    if args.bandname:
        band = args.bandname
    elif args.wavelength:
        req_wvl = args.wavelength

    figscale = 1.0
    if wvlmin:
        figscale = (wvlmax - wvlmin) / 4.
    figsize = (figscale * 1. + 10, figscale * 0.5 + 5)

    plt.figure(figsize=figsize)
import argparse
from pyspectral.utils import AEROSOL_TYPES
from pyspectral.utils import logging_on, logging_off
from pyspectral.rayleigh import check_and_download

LOG = logging.getLogger(__name__)

if __name__ == "__main__":
    parser = argparse.ArgumentParser(
        description='Download the atm correction LUT files')
    parser.add_argument("--aerosol_types", '-a', nargs='*',
                        help="Aerosol types",
                        type=str, default=AEROSOL_TYPES)
    parser.add_argument(
        "-d", '--dry_run', help=("Dry run - no action"), action='store_true',
        default=False)
    parser.add_argument(
        "-v", '--verbose', help=("Turn logging on"), action='store_true')

    args = parser.parse_args()
    verbose = args.verbose
    dry_run = args.dry_run
    aerosol_types = args.aerosol_types

    if verbose:
        logging_on(logging.DEBUG)
    else:
        logging_off()

    check_and_download(aerosol_type=aerosol_types, dry_run=dry_run)