Skip to content
Snippets Groups Projects
Commit 9f133754 authored by Alexandros Asonitis's avatar Alexandros Asonitis
Browse files

first version of the interface

parent 992cbc9a
No related branches found
No related tags found
No related merge requests found
%% Cell type:code id:6defdb49-06c2-469d-beb5-bc2e147e3f79 tags:
``` python
%run ADU.py
```
%% Output
%% Cell type:code id:6e60266b-666c-4118-9ead-7ca8ceea7bb6 tags:
%% Cell type:code id:a4bb888c-4d77-4f1e-8722-601c15e0bb6d tags:
``` python
```
......
import ipywidgets as widgets
from ipywidgets import GridspecLayout,Layout
from interface import *
# Create the grids
#some layout and sampling configurations
......@@ -35,36 +35,22 @@ test_contacts=widgets.Checkbox(description = "Test of the Contacts",value = True
display(test_contacts)
print()
options_integration=["SHORt","MEDium","LONG"]
hysteresis =["SINGLE","DOUBLE"]
transfer_curve=widgets.Checkbox(description = "Transfer Curve",value = True,indent = False)
integration_transfer = widgets.Dropdown(layout=Layout(height='auto', width='auto'),options=options_integration,value="MEDium",description='Integration Time',style =style)#integration time
display(widgets.HBox([transfer_curve,integration_transfer]))
#transfer
transfer_check,integration_transfer = header('Transfer Curve')
Vds_transfer = secondary('Vds',1,1,5,0.1)
Vgs_transfer = primary('Vgs',2,-0.05,-8,0.01)
print()
#output
output_check,integration_output = header('Output Curve')
Vds_output = primary('Vds',0,0.1,15,0.1)
Vgs_output = primary('Vgs',2,-1,-8,0.01)
print()
secondary_grid = GridspecLayout(4,4)
secondary_grid[:,0]=widgets.Label("Vds",layout=Layout(height='auto', width='auto'))
#first line
secondary_grid[0,1]=widgets.Label("Start(V)",layout=Layout(height='auto', width='auto'))
secondary_grid[0,2]=widgets.Label("Step(V)",layout=Layout(height='auto', width='auto'))
secondary_grid[0,3]=widgets.Label("Stop(V)",layout=Layout(height='auto', width='auto'))
#second line
secondary_grid[1,1]=widgets.BoundedFloatText(value=0,min=-100,max=100,step=1,layout=Layout(height='auto', width='auto'))
secondary_grid[1,2]=widgets.BoundedFloatText(value=1,min=-100,max=100,step=1,layout=Layout(height='auto', width='auto'))
secondary_grid[1,3]=widgets.BoundedFloatText(value=5,min=-100,max=100,step=1,layout=Layout(height='auto', width='auto'))
#third line
secondary_grid[2,1]=widgets.Label("Compliance(A)",layout=Layout(height='auto', width='auto'))
secondary_grid[2,3] =widgets.Label("Power Compliance(W) (0=OFF)",layout=Layout(height='auto', width='auto'))#mind the gap
#fourth line
secondary_grid[3,1]=widgets.BoundedFloatText(value=0.1,min=-0.1,max=0.1,step=0.01,layout=Layout(height='auto', width='auto'))
secondary_grid[3,3]=widgets.BoundedFloatText(value=1,min=-100,max=100,step=1,layout=Layout(height='auto', width='auto'))#mind the gap
#GateDiodde
gatediode_check,integration_gatediode=header('Gatediode')
Vgs_gatediode=primary('Vgs',-8,0.05,2,0.02)
print()
display(secondary_grid)
import ipywidgets as widgets
from ipywidgets import GridspecLayout,Layout
def header(name):
style = {'description_width': 'initial'}
options_integration=["SHORt","MEDium","LONG"]
check=widgets.Checkbox(description = name,value = True,indent = False)
integration = widgets.Dropdown(layout=Layout(height='auto', width='auto'),options=options_integration,value="MEDium",description='Integration Time',style =style)#integration time
display(widgets.HBox([check,integration]))
return check, integration
def primary(name,start,step,stop,comp):
primary_grid = GridspecLayout(4,4)
primary_grid[:,0]=widgets.Label(name,layout=Layout(height='auto', width='auto'))
#first line
primary_grid[0,1]=widgets.Label("Start(V)",layout=Layout(height='auto', width='auto'))
primary_grid[0,2]=widgets.Label("Step(V)",layout=Layout(height='auto', width='auto'))
primary_grid[0,3]=widgets.Label("Stop(V)",layout=Layout(height='auto', width='auto'))
#second line
primary_grid[1,1]=widgets.BoundedFloatText(value=start,min=-100,max=100,step=1,layout=Layout(height='auto', width='auto'))
primary_grid[1,2]=widgets.BoundedFloatText(value=step,min=-100,max=100,step=1,layout=Layout(height='auto', width='auto'))
primary_grid[1,3]=widgets.BoundedFloatText(value=stop,min=-100,max=100,step=1,layout=Layout(height='auto', width='auto'))
#third line
primary_grid[2,1]=widgets.Label("Compliance(A)",layout=Layout(height='auto', width='auto'))
primary_grid[2,3] =widgets.Label("Hysterisis",layout=Layout(height='auto', width='auto'))#mind the gap
#fourth line
primary_grid[3,1]=widgets.BoundedFloatText(value=comp,min=-0.1,max=0.1,step=0.01,layout=Layout(height='auto', width='auto'))
primary_grid[3,3]=widgets.Dropdown(options=['SINGle','DOUBle'],value='SINGle',layout=Layout(height='auto', width='auto'))#mind the gap
display(primary_grid)
return primary_grid
def secondary(name,start,step,stop,comp):
secondary_grid = GridspecLayout(4,4)
secondary_grid[:,0]=widgets.Label(name,layout=Layout(height='auto', width='auto'))
#first line
secondary_grid[0,1]=widgets.Label("Start(V)",layout=Layout(height='auto', width='auto'))
secondary_grid[0,2]=widgets.Label("Step(V)",layout=Layout(height='auto', width='auto'))
secondary_grid[0,3]=widgets.Label("Stop(V)",layout=Layout(height='auto', width='auto'))
#second line
secondary_grid[1,1]=widgets.BoundedFloatText(value=start,min=-100,max=100,step=1,layout=Layout(height='auto', width='auto'))
secondary_grid[1,2]=widgets.BoundedFloatText(value=step,min=-100,max=100,step=1,layout=Layout(height='auto', width='auto'))
secondary_grid[1,3]=widgets.BoundedFloatText(value=stop,min=-100,max=100,step=1,layout=Layout(height='auto', width='auto'))
#third line
secondary_grid[2,1]=widgets.Label("Compliance(A)",layout=Layout(height='auto', width='auto'))
secondary_grid[2,3] =widgets.Label("Power Compliance(W) (0=OFF)",layout=Layout(height='auto', width='auto'))#mind the gap
#fourth line
secondary_grid[3,1]=widgets.BoundedFloatText(value=comp,min=-0.1,max=0.1,step=0.01,layout=Layout(height='auto', width='auto'))
secondary_grid[3,3]=widgets.BoundedFloatText(value=0,min=0,max=100,step=0.1,layout=Layout(height='auto', width='auto'))#mind the gap
display(secondary_grid)
return secondary
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment