Example #1
0
    def stage1(self):
        '''
    Run stage 1 processing
    '''
        from albedo_pix import processArgs, insensitive_glob, albedo_pix

        # -clean
        args = [sys.argv[0],'--logfile=%s.log'%self.tile,'--dontclean',\
                '--shrink=%d'%int(self.shrink),\
                '--tile=%s'%self.tile,'--srcdir=%s'%self.srcdir]

        # pass through any from the cmd line, which can override these
        [args.append(i) for i in sys.argv[1:]]
        # use the cmd line parser from albedo_pix
        try:
            args.remove('--pylab')
        except:
            pass
        try:
            args.remove('--pylab=inline')
        except:
            pass
        try:
            args.remove('notebook')
        except:
            pass
        opts, args = processArgs(args=args)
        opts.backupscale = self.scale
        opts.sdims = self.sdims
        opts.bands = self.bands
        opts.years = self.years
        opts.focus = self.focus
        opts.type = np.atleast_1d(self.type)
        opts.dontwithsnow = opts.dontnosnow = opts.dontsnow = True
        if 'SnowAndNoSnow' in opts.type:
            opts.dontwithsnow = False
        if 'Snow' in opts.type:
            opts.dontsnow = False
        if 'NoSnow' in opts.type:
            opts.dontnosnow = False

        print opts.type

        opts.doyList = np.array(self.doyList)
        #np.array(ast.literal_eval(opts.doyList))

        #class call
        self.albedo = albedo_pix(opts)

        self.albedo.runAll()
Example #2
0
  def stage1(self):
    '''
    Run stage 1 processing
    '''
    from albedo_pix import processArgs,insensitive_glob,albedo_pix

    # -clean 
    args = [sys.argv[0],'--logfile=%s.log'%self.tile,'--dontclean',\
            '--shrink=%d'%int(self.shrink),\
            '--tile=%s'%self.tile,'--srcdir=%s'%self.srcdir] 

    # pass through any from the cmd line, which can override these
    [args.append(i) for i in sys.argv[1:]]
    # use the cmd line parser from albedo_pix 
    try:
      args.remove('--pylab')
    except: pass
    try:
      args.remove('--pylab=inline')
    except: pass
    try:
      args.remove('notebook')
    except: pass
    opts, args = processArgs(args=args)
    opts.backupscale = self.scale
    opts.sdims       = self.sdims
    opts.bands       = self.bands
    opts.years       = self.years
    opts.focus       = self.focus
    opts.type        = np.atleast_1d(self.type)
    opts.dontwithsnow = opts.dontnosnow = opts.dontsnow = True
    if 'SnowAndNoSnow' in opts.type:
      opts.dontwithsnow = False
    if 'Snow' in opts.type:
      opts.dontsnow = False
    if 'NoSnow' in opts.type:
      opts.dontnosnow = False

    print opts.type

    opts.doyList = np.array(self.doyList)
    #np.array(ast.literal_eval(opts.doyList))

    #class call
    self.albedo = albedo_pix(opts)

    self.albedo.runAll()
Example #3
0
    def stage2(self):
        '''
    Run stage 2 processing
    '''
        from prior2Fast import prior2, processArgs

        #sys.argv = [self.snowtype(i) for i in sys.argv]

        args = [sys.argv[0],'--tmp=tmp','--opdir=results','--srcdir=results','--clean','--tile=%s'%self.tile,\
                '--logfile=%s.log'%self.tile]
        [args.append(i) for i in sys.argv[1:]]
        # pass through any from the cmd line, which can override these
        [args.append(i) for i in sys.argv[1:]]
        # use the cmd line parser from albedo_pix
        try:
            args.remove('--pylab')
        except:
            pass
        try:
            args.remove('--pylab=inline')
        except:
            pass
        try:
            args.remove('notebook')
        except:
            pass
        opts, args = processArgs(args=args)
        opts.backupscale = self.scale
        opts.sdims = self.sdims
        opts.bands = self.bands
        opts.years = self.years
        opts.focus = self.focus
        opts.type = np.atleast_1d(self.type)
        opts.dontwithsnow = opts.dontnosnow = opts.dontsnow = True
        if 'SnowAndNoSnow' in opts.type:
            opts.dontwithsnow = False
        if 'Snow' in opts.type:
            opts.dontsnow = False
        if 'NoSnow' in opts.type:
            opts.dontnosnow = False

        print opts.type

        self.prior2 = prior2(opts)
        self.prior2.processAll()
Example #4
0
  def stage2(self):
    '''
    Run stage 2 processing
    '''
    from prior2Fast import prior2,processArgs

    #sys.argv = [self.snowtype(i) for i in sys.argv]

    args = [sys.argv[0],'--tmp=tmp','--opdir=results','--srcdir=results','--clean','--tile=%s'%self.tile,\
            '--logfile=%s.log'%self.tile]
    [args.append(i) for i in sys.argv[1:]]
    # pass through any from the cmd line, which can override these
    [args.append(i) for i in sys.argv[1:]]
    # use the cmd line parser from albedo_pix 
    try:
      args.remove('--pylab')
    except: pass
    try:
      args.remove('--pylab=inline')
    except: pass
    try:
      args.remove('notebook')
    except: pass
    opts, args = processArgs(args=args)
    opts.backupscale = self.scale
    opts.sdims       = self.sdims
    opts.bands       = self.bands
    opts.years       = self.years
    opts.focus       = self.focus
    opts.type        = np.atleast_1d(self.type)
    opts.dontwithsnow = opts.dontnosnow = opts.dontsnow = True
    if 'SnowAndNoSnow' in opts.type:
      opts.dontwithsnow = False
    if 'Snow' in opts.type:
      opts.dontsnow = False
    if 'NoSnow' in opts.type:
      opts.dontnosnow = False

    print opts.type

    self.prior2 = prior2(opts)
    self.prior2.processAll()