Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(81)  |  Call(61)  |  Derive(6)  |  Import(14)
A class to store parameters as a dictionary, but to being able to retrieve
them using point notation.

src/e/o/eoldas-1.1.0/eoldas/eoldas_ConfFile.py   eoldas(Download)
import numpy as np
import os
from eoldas_ParamStorage import ParamStorage   
 
def type_convert(info,this):
    '''
    lent = len(text)
    intoken = ParamStorage()
    qtoken = ParamStorage()
    for i in ["'",'"']:
        # first, check if its already there
        if not hasattr(info,thiss[0]):
            info[thiss[0]] = ParamStorage()
            info[thiss[0]].helper = []
        # load up the info
                for i in xrange(len(options)-1):
                    if not hasattr(this_info,options[i]):
                        this_info[options[i]] = ParamStorage()
                        this_info[options[i]].helper = []
                    this_info = this_info[options[i]]

src/e/o/eoldas-1.1.0/eoldas/eoldas_Parser.py   eoldas(Download)
from eoldas_Lib import sortlog
from eoldas_ConfFile import ConfFile
from eoldas_ParamStorage import ParamStorage
 
class Parser():
        logfile = None
        logdir = "."
        self.top = ParamStorage ()
        self.top.general = ParamStorage ()
        self.top.general.__helper__ = ParamStorage ()
        self.top.general.__default__ = ParamStorage ()

src/e/o/eoldas-1.1.0/eoldas/eoldas_Lib.py   eoldas(Download)
import os
 
from eoldas_ParamStorage import ParamStorage
#from eoldas_conf import ConfFile
 
        except:
            if self.options.preload != []:
                self.brfinit_files = ParamStorage ()
                self.brfinit_files['override'] = self.options.preload
                # this is a hack to get the same structure
 
    if logfile == None or name == None:
        logger = ParamStorage()
        logger.info  = lambda x:dummyprint( "Info: %s"%x)
        logger.debug = lambda x:dummyprint( "Debug: %s"%x)
        # Define a configuration container. Makes everything look like Java
        # Containers can then be useful for quickly listing all variables :)
        self.config = ParamStorage ()
        self.config.spectral = ParamStorage ()
        self.config.rt_model = ParamStorage ()

src/e/o/eoldas-1.1.0/eoldas/eoldas_State.py   eoldas(Download)
#!/usr/bin/env python
from eoldas_ParamStorage import ParamStorage
from eoldas_SpecialVariable import SpecialVariable
import pdb
import numpy as np
from eoldas_Files import writer
from eoldas_Lib import sortlog
 
class State(ParamStorage):
            sddefault = list(np.array(default)*0.)
 
        self.ungridder = ParamStorage()
 
 
 
        wheregrid = np.where(ngrid>0)
        self.Name.gridder = ParamStorage()
        self.Name.gridder.nd = len(self.Name.qlocation)
        self.Data.gridder = ParamStorage()

src/e/o/eoldas-1.1.0/eoldas/eoldas_SpecialVariable.py   eoldas(Download)
#!/usr/bin/env python
from eoldas_ParamStorage import ParamStorage
import pdb
import numpy as np
from eoldas_Files import writer,reader,init_read_write
from eoldas_Lib import sortlog
 
class SpecialVariable(ParamStorage):
 
        # this is where we will put any data     
        self.data = ParamStorage()
        self.name = ParamStorage()
 
class DemoClass(ParamStorage):
    ''' 
        A demonstration class using SpecialVariable
 
        The behaviour we desire is that a SpecialVariable

src/e/o/eoldas-1.1.0/eoldas/eoldas_Files.py   eoldas(Download)
#!/usr/bin/env python
from eoldas_ParamStorage import ParamStorage
 
import pdb
import numpy as np
    l = len(np.atleast_1d(this).shape)
    if this.size > 0:
        retval = ParamStorage()
        retval.name = ParamStorage()
        retval.data = ParamStorage()
        nsamps = grid.shape[1]
        sd = sd.repeat(nsamps).reshape(grid.shape).T
        datasets = ParamStorage()
        datasets.data  = ParamStorage()
        datasets.name  = ParamStorage()

src/e/o/eoldas-1.1.0/eoldas/eoldas_Solver.py   eoldas(Download)
#!/usr/bin/env python
import pdb
import numpy as np
from eoldas_State import State
from eoldas_ParamStorage import ParamStorage
from eoldas_Operator import *
from eoldas_Lib import sort_non_spectral_model,sortlog
 
class eoldas_Solver(ParamStorage):
 
        self.confs = confs
        self.top = sortopt(self,'top',ParamStorage())
        self.top.general = sortopt(self.top,'general',ParamStorage())
        thisname = sortopt(self.top.general,'name',thisname or self.thisname)
        self.sortMask()
 
        self.op = sortopt(root.general,'optimisation',ParamStorage())
        self.op.plot = sortopt(self.op,'plot',0)
        self.op.name = sortopt(self.op,'name','solver')

src/e/o/eoldas-1.1.0/eoldas/eoldas_Operator.py   eoldas(Download)
from eoldas_State import State
from eoldas_Lib import sortopt,sortlog
from eoldas_ParamStorage import ParamStorage
import resource
from eoldas_Spectral import Spectral
from eoldas_Files import writer
import os
from os.path import dirname
 
class Operator ( ParamStorage ):
            if t == 'y':
                self.y_meta.spectral = Spectral(self,name=self.thisname)                
	self.linear = ParamStorage()
        self.linear = ParamStorage()
        if 'y' in self.dict():
            return True
        if not 'x_meta' in self.dict():
            self.x_meta = ParamStorage()
            self.x_meta.state = self.x_state._state.name.state
            self.x_meta.location = self.x_state._state.name.location

src/e/o/eoldas-1.1.0/eoldas/eoldas_Spectral.py   eoldas(Download)
#from eoldas_model import subset_vector_matrix
from eoldas_State import State
from eoldas_ParamStorage import ParamStorage
#from eoldas_Operator import *
import logging
 
class Spectral ( ParamStorage ):

src/e/o/eoldas-1.1.0/eoldas/eoldas_Observation_Operator.py   eoldas(Download)
#from eoldas_model import subset_vector_matrix
from eoldas_State import State
from eoldas_ParamStorage import ParamStorage
from eoldas_Operator import *
 
        """
        if not 'linear' in self.dict():
            self.linear = ParamStorage()
        if 'y' in self.dict():
            self.linear.H = np.zeros(self.y.state.shape)
        self.logger.debug ("Using %s..." % rt_library )
 
        self.rt_library = sortopt(self,'rt_library',ParamStorage())
        # 1. Import main functionality
        try:

  1 | 2  Next