Skip to content

get/set_N() for WG/Circ #84

@demisjohn

Description

@demisjohn

Added get/set_N() for Devices - for consistency should add the same for WG/Circ nodes.

Here's the code from Device.py:

def get_N(self,):
    '''Get max number of modes solved for in this Device.

    Returns
    -------
    N : int
        Number of modes, set as 'maxnmodes' in MOLAB parameters.
    '''
    return fimm.Exec( self.nodestring + ".mlp.maxnmodes")

def set_N(self, N):
    '''Set max number of modes to solve for in this Device.

    Parameters
    ----------
    N : int
        Max number of modes to solve for, set by `maxnmodes` in MOLAB parameters.
    '''
    fimm.Exec(   self.nodestring + ".mlp.maxnmodes " + str(int(N))   )

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions