pysat / pysatNASA

pysat support for NASA Instruments
BSD 3-Clause "New" or "Revised" License
21 stars 6 forks source link

ENH: generalized init routine #118

Closed jklenzing closed 2 years ago

jklenzing commented 2 years ago

Is your feature request related to a problem? Please describe. Many of the files use a fairly standard init routine, importing references and acknowledgements from a standard module.

Describe the solution you'd like Create a generalized init routine with a module input, e.g,

def init(self, module, name):
    """Initialize the Instrument object with instrument specific values.

    Parameters 
    -----------
    module : python module
        module from general methods, eg, icon, de2, cnofs, etc
    name : str 
        name of instrument of interest, eg, 'ivm'

    Runs once upon instantiation.

    """

    pysat.logger.info(module.ackn_str)
    self.acknowledgements = module.ackn_str
    self.references = module.refs[name]
    return

Describe alternatives you've considered

Additional context The module structure is mostly standardized for how references and acknowledgements are stored. Some slight differences for how icon is stored, which could be updated.