-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
115 additions
and
402 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
pyinstaller -F --version-file=v.txt --icon=1.ico ../FETAnal.py | ||
set PATH=C:\mingw64\bin;%PATH% | ||
nuitka --mingw64 --show-progress --show-memory --show-modules --standalone --recurse-all --recurse-not-to=numpy,matplotlib --windows-icon="%~dp0\1.ico" ../FETAnal |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
DIELECTRIC = -1 # 0=SiOx, 1=Parylene, 2=BCB+SiOx, -1=Other | ||
W, L = 20, 1 # Channel length/width in [um], or leave 0 as default | ||
# To automatically get W, L from filenames, please name the files this way: ... 50um ... 20um ..., where the first number refers to W, the second L. | ||
|
||
EPS = [3.9, 3, 2.65] # Permittivity of the dielectric | ||
TD = [300, 706, 25] # Thickness of the dielectric in [nm] | ||
DCP = 3.7e-9 # If DIELECTRIC=-1, then designate capacitance here in [F/cm^2] | ||
|
||
ColGateV = 0 # Col # of "GateV", counting from 1 rather than 0, or leave 0 as default | ||
ColIDrain = 0 # Col # of "IDrain", ibid. | ||
# To automatically get ColGateV & ColIDrain from spreadsheets, please make sure that the column headers are named exactly as "GateV" & "IDRAIN"/"IDLIN", respectively. | ||
|
||
PICEXT = '.png' # Desired extension name for saved picture files (eg. png, svg, eps ...) | ||
|
||
# Please do not change these parameters for the Savitzky-Golay filter if you don't know what they are. | ||
WINDOWLEN = 5 # The length of the filter window (i.e. the number of coefficients); must be a positive odd integer; if the signal is rough, use 7 or more points to smooth | ||
POLYORDER = 1 # The order of the polynomial used to fit the samples | ||
|
||
|
||
# This file is in nature python script, which will be executed before the main function runs | ||
# So you can monkey patch the main program here. Below are examples | ||
# This section is experimental and may be unstable. In the future, it may be moved into the main program. Please comment these lines out if they cause trouble | ||
FIGURE_SIZE = (8, 5) # the default size of the figure window (in inches) | ||
CONSOLE_WINDOW_AT_BOTTOM = False # For Windows only: Whether to place the console window below the figure window or on the right side of it | ||
|
||
# Change default backend | ||
from matplotlib import use, get_backend | ||
if get_backend() == 'MacOSX': use('TkAgg') # Use preferentially TkAgg over MacOSX | ||
backend = get_backend() | ||
from matplotlib.pyplot import * | ||
try: switch_backend('Qt5Agg') # Use preferentially Qt5Agg over TkAgg | ||
except: switch_backend(backend) | ||
|
||
# Change default figure window title, size and position | ||
oriFig = figure # alias of the original func | ||
def newFig(**k): | ||
fig = oriFig(figsize=FIGURE_SIZE) # define default window size here | ||
if get_backend() not in ('TkAgg', 'Qt5Agg', 'Qt4Agg', 'WXAgg'): return fig | ||
win = fig.canvas.manager.window | ||
title = os.path.abspath(path) + ' - FETAnal' | ||
# move the window to the top-left corner of the screen and set figure title | ||
# https://stackoverflow.com/a/37999370/11979352 | ||
if get_backend() == 'TkAgg': | ||
if os.name == 'nt': hwnd = int(win.frame(), 16) | ||
else: win.wm_geometry(win.wm_geometry().split('+')[0]+'+0+0'); win.winfo_toplevel().title(title) | ||
elif get_backend() == 'Qt5Agg' or get_backend() == 'Qt4Agg': | ||
if os.name == 'nt': hwnd = int(win.winId()) | ||
else: win.move(0, 0); win.setWindowTitle(title) | ||
#elif get_backend() == 'WXAgg': | ||
# if os.name == 'nt': hwnd = win.GetHandle() | ||
# else: win.SetPosition(0, 0) | ||
# for windows only: move the console window and set figure title | ||
if os.name == 'nt': | ||
import ctypes | ||
ctypes.windll.user32.SetWindowPos(hwnd, 0, 0, 0, 0, 0, 5) # move the figure window | ||
ctypes.windll.user32.SetWindowTextA(hwnd, title.encode('mbcs')) # set figure title as filename | ||
pause(0.01) | ||
class RECT(ctypes.Structure): | ||
_fields_ = [("left", ctypes.c_long), ("top", ctypes.c_long), ("right", ctypes.c_long), ("bottom", ctypes.c_long)] | ||
rect = RECT() | ||
ctypes.windll.user32.GetWindowRect(hwnd,ctypes.byref(rect)) | ||
hwnd_c = ctypes.windll.kernel32.GetConsoleWindow() | ||
if CONSOLE_WINDOW_AT_BOTTOM: ctypes.windll.user32.SetWindowPos(hwnd_c, 0, 0, rect.bottom, 0, 0, 5) | ||
else: ctypes.windll.user32.SetWindowPos(hwnd_c, 0, rect.right, 0, 0, 0, 5) | ||
return fig | ||
figure = newFig |
Oops, something went wrong.