コード例 #1
0
def test_interact_options():
    def f(x):
        return x
    w = interact.options(manual=False).options(manual=True)(f, x=21).widget
    nt.assert_equal(w.manual, True)

    w = interact_manual.options(manual=False).options()(x=21).widget(f)
    nt.assert_equal(w.manual, False)

    w = interact(x=21)().options(manual=True)(f).widget
    nt.assert_equal(w.manual, True)
コード例 #2
0
def test_interact_options():
    def f(x):
        return x
    w = interact.options(manual=False).options(manual=True)(f, x=21).widget
    assert w.manual == True

    w = interact_manual.options(manual=False).options()(x=21).widget(f)
    assert w.manual == False

    w = interact(x=21)().options(manual=True)(f).widget
    assert w.manual == True
コード例 #3
0
def test_interact_options():
    def f(x):
        return x

    w = interact.options(manual=False).options(manual=True)(f, x=21).widget
    assert w.manual == True

    w = interact_manual.options(manual=False).options()(x=21).widget(f)
    assert w.manual == False

    w = interact(x=21)().options(manual=True)(f).widget
    assert w.manual == True
コード例 #4
0
import sys
b = sys.path
sys.path = ['/home/jovyan/analysis'] + b
import osiris
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import LogNorm
from osh5vis import new_fig, osplot
from osh5io import read_h5
from osh5utils import fft
import glob
from ipywidgets import interact_manual, fixed, Layout, interact, FloatSlider
import ipywidgets as widgets
interact_calc = interact_manual.options(manual_name="Make New Input and Run")
import os
from osiris import tajima
from h5_utilities import *
from analysis import *
import matplotlib.colors as colors


def newifile(iname='case0.txt',
             oname='case1.txt',
             uth=1e-6,
             a0=1.0,
             omega0=2.0,
             t_flat=3.14,
             t_rise=0,
             t_fall=0,
             nx_p=1024,
             xmax=102.4,