Example #1
0
    def update_fGHz(self):
        if self.Wstd_Enum != 'None':
            W=std.Wstandard(self.Wstd_Enum)
            # DL.fGHz = W.chan[eval(self.chann)].fghz
            Wchan = W.chan[eval(self.chann)]
            fcGHz = Wchan['fcGHz']
            BWGHz = Wchan['BMHz']
            GMHz = Wchan['GMHz']
            fGHz = Wchan.fghz

            DL.fGHz = np.array([fcGHz])

            self.BWGHz = BWGHz
            self.fmin = float(fGHz[0])
            self.fmax = float(fGHz[-1])
            self.fstep = float(fGHz[1]-fGHz[0])

        else:
            if self.fmin < self.fmax:
                DL.fGHz = np.arange(self.fmin,
                                    self.fmax,
                                    self.fstep
                                    )
            elif self.fmin == self.fmax:
                DL.fGHz=np.array([self.fmin])
            self.BWGHz = 5
Example #2
0
    exit_msg = '*** Back in main IPython ***'

# First import the embed function
from IPython.frontend.terminal.embed import InteractiveShellEmbed

## INIT DLink object

DL = DLink()

filename = pyu.getlong('wstd.json', pstruc['DIRSIMUL'])
fp = open(filename)
stds = json.load(fp)
av_wstds = ['None'] + list(stds.keys())

dchann = {
    w: [str(i) for i in std.Wstandard(w).chan.keys()]
    for w in av_wstds if w != 'None'
}
dchann.update({'None': ['None']})

from qtconsole.rich_ipython_widget import RichJupyterWidget
from qtconsole.inprocess import QtInProcessKernelManager
from IPython.lib import guisupport


class QIPythonWidget(RichJupyterWidget):
    """ Convenience class for a live IPython console widget. We can replace the standard banner using the customBanner argument"""
    def __init__(self, customBanner=None, *args, **kwargs):
        if not customBanner is None: self.banner = customBanner
        super(QIPythonWidget, self).__init__(*args, **kwargs)
        self.kernel_manager = kernel_manager = QtInProcessKernelManager()
Example #3
0
# First import the embed function
from IPython.frontend.terminal.embed import InteractiveShellEmbed

## INIT DLink object

DL=DLink()

filename=pyu.getlong('wstd.json',pstruc['DIRSIMUL'])
fp = open(filename)
stds = json.load(fp)
av_wstds = ['None']+ list(stds.keys())



dchann = {w:[str(i) for i in std.Wstandard(w).chan.keys()] for w in av_wstds if w !='None'}
dchann.update({'None':['None']})




from qtconsole.rich_ipython_widget import RichJupyterWidget
from qtconsole.inprocess import QtInProcessKernelManager
from IPython.lib import guisupport

class QIPythonWidget(RichJupyterWidget):
    """ Convenience class for a live IPython console widget. We can replace the standard banner using the customBanner argument"""
    def __init__(self,customBanner=None,*args,**kwargs):
        if not customBanner is None: self.banner=customBanner
        super(QIPythonWidget, self).__init__(*args,**kwargs)
        self.kernel_manager = kernel_manager = QtInProcessKernelManager()