def __init__(self, application, **kwargs): Object.__init__(self, **kwargs) self.application = application self.enabled = None
def __init__(self, **kwargs): Object.__init__(self, **kwargs) self.configuration_directory = os.path.join(os.path.expanduser('~'), '.cfgui') self.plugins = {}
if options.variables is None: parser.error('Missing variables parameter') if options.time is None: parser.error('Missing time parameter') if options.coords is None: parser.error('Missing coords parameter') if options.bbox: bbox = options.bbox.split(',') if len(bbox) != 4: parser.error('Invalid bbox parameter: %s', options.bbox) lonmin, latmin, lonmax, latmax = map(float, bbox) if options.operations is None: options.operations = ops #parser.error('You must specify at least one operation command') if options.plots is None: #parser.error('You must specify at least one plot command') options.plots = plots if options.cfgfile: Object.load_default_config(options.cfgfile, nested=True) MARS3D.load_default_config(Object.get_default_config()) Satellite.load_default_config(Object.get_default_config()) variables = map(lambda v:v.split(','), options.variables) time = options.time.split(',') if len(time) == 4: tmin, tmax, tstep, ustep = time; tbb = 'co' elif len(time) == 5: tmin, tmax, tbb, tstep, ustep = time else: parser.error('Invalid time parameter') tstep = int(tstep) coords = options.coords.split(',') if len(coords) != 3: parser.error('Invalid coords parameter: %s', options.coords) xymin, xymax, xy = map(float, coords) dtfmt = '%Y%m%dT%H%M%S' mars = MARS3D()
parser.add_option("--show", action="store_true", dest="show", default=None, help="Show figures") options, args = parser.parse_args() if options.variables is None: parser.error("Missing variables parameter") if options.time is None: parser.error("Missing time parameter") if options.coords is None: parser.error("Missing coords parameter") if options.bbox: bbox = options.bbox.split(",") if len(bbox) != 4: parser.error("Invalid bbox parameter: %s", options.bbox) lonmin, latmin, lonmax, latmax = map(float, bbox) if options.cfgfile: Object.load_default_config(options.cfgfile, nested=True) MARS3D.load_default_config(Object.get_default_config()) variables = map(lambda v: v.split(","), options.variables) time = options.time.split(",") if len(time) == 4: tmin, tmax, tstep, ustep = time tbb = "co" elif len(time) == 5: tmin, tmax, tbb, tstep, ustep = time else: parser.error("Invalid time parameter") tstep = int(tstep) coords = options.coords.split(",") if len(coords) != 4: parser.error("Invalid coords parameter: %s", options.coords)
action='store_true', dest='show', default=None, help='Show figures') options, args = parser.parse_args() if options.variables is None: parser.error('Missing variables parameter') if options.time is None: parser.error('Missing time parameter') if options.depth is None: parser.error('Missing depth parameter') if options.bbox: bbox = options.bbox.split(',') if len(bbox) != 4: parser.error('Invalid bbox parameter: %s', options.bbox) lonmin, latmin, lonmax, latmax = map(float, bbox) if options.cfgfile: Object.load_default_config(options.cfgfile, nested=True) MARS3D.load_default_config(Object.get_default_config()) ProfilesDataset.load_default_config(Object.get_default_config()) variables = map(lambda v: v.split(','), options.variables) depths = [] for d in options.depth: depths.extend(d.split(',')) time = options.time.split(',') if len(time) == 4: tmin, tmax, tstep, ustep = time tbb = 'co' elif len(time) == 5: tmin, tmax, tbb, tstep, ustep = time else: parser.error('Invalid time parameter')
def __init__(self): Object.__init__(self)
action='store_true', dest='show', default=None, help='Show figures') options, args = parser.parse_args() if options.variables is None: parser.error('Missing variables parameter') if options.time is None: parser.error('Missing time parameter') if options.coords is None: parser.error('Missing coords parameter') if options.bbox: bbox = options.bbox.split(',') if len(bbox) != 4: parser.error('Invalid bbox parameter: %s', options.bbox) lonmin, latmin, lonmax, latmax = map(float, bbox) if options.cfgfile: Object.load_default_config(options.cfgfile, nested=True) Mars3D.load_default_config(Object.get_default_config()) variables = map(lambda v: v.split(','), options.variables) time = options.time.split(',') if len(time) == 4: tmin, tmax, tstep, ustep = time tbb = 'co' elif len(time) == 5: tmin, tmax, tbb, tstep, ustep = time else: parser.error('Invalid time parameter') tstep = int(tstep) coords = options.coords.split(',') if len(coords) != 3: parser.error('Invalid coords parameter: %s', options.coords)
def __init__(self, *args, **kwargs): _Object.__init__(self, *args, **kwargs) self.logger.set_format( '[%(asctime)s %(name)s.%(funcName)s %(levelname)-8s] %(message)s')