Electron microscopy
 
Python Automation and Machine Learning for ICs: Chapter W
- Python Automation and Machine Learning for ICs -
- An Online Book: Python Automation and Machine Learning for ICs by Yougui Liao -
Python Automation and Machine Learning for ICs                                                                                  http://www.globalsino.com/ICs/        


Table of Contents/Index 
Chapter/Index: Introduction | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | Appendix

=================================================================================

 

 
                                                       
Comparison btween data lake and data warehouse  Introduction
Data warehousing Introduction
Word representation Introduction
Sentence, text, word and document embeddings Introduction
Plot with letters/words as x-/y-axis Introduction
Likelihood weighting Introduction
Grid world navigation Introduction
Weighted accuracy in ML Introduction
Weight initialization Introduction
Weight and weight space Introduction
Locally Weighted Regression (LWR) Introduction
Convert/change the case of all letters/word into uppercase (capital) or lowercase in a list of strings Introduction
Continue script execution no matter whether some try fails or not (finally)
Introduction
Calculating the area fraction of each circle overlapped by a square grid and build wafer map Introduction
Common Words for Classification of Groups of Texts Introduction
Execute a command on Command Prompt of Windows Introduction
Last n days/weeks/months (.to_datetime(x), .set_index(y), .last(z), .reset_index(), and .max() in pandas) Introduction
Check if Windows/PC screen is locked Introduction
Analyzing the impact of fabrication conditions on semiconductor wafer fail rates Introduction
Write special/certain rows (row-by-row) of one csv file to another csv file Introduction
Avoid two or multiple plots being wrongly/incorrectly/unnecessarily mixed/overlap Introduction
Feature analysis/feature importance analysis/weight of feature Introduction
PermissionError (E.g. file cannot be written when it is open) Introduction
   
Keywords Introduction
Stopwords/stoplist Introduction
     
Well-specified case Introduction
Well-specified case of "asymptotic approach" Introduction
     
Write Python objects into YAML format file Introduction
Modify HTML webpage Introduction
send_keys() and its uploading images to webpage Introduction
.bat (batch) files for Command Prompt Windows Introduction
Work with WordPad Introduction
Read a frequently updated file periodically (similar to watchdog) Introduction
Box and Whisker plots Introduction
Waterfall plot Introduction
Duplicate/repeat the same words/elements in a string/list Introduction
Word cloud visualization Introduction
Change the width of the cell in ppt Introduction
Generate defect data of a wafer map Introduction
HTTP(Hypertext Transfer Protocol) webpage/URL (Uniform Resource Locator) Introduction
Fail rate generator in wafers Introduction

 

 

Wafer bin map (WBM)
Introduction
Probe data Introduction
  WM-811K semiconductor data sets Introduction
    X Example of wafer identification full flow Introduction
  Public datasets for wafer map analysis Introduction
Yield improvement of of ICs Introduction
  Excursion wafer Introduction
  Wafer map failure pattern recognition (WMFPR)/pattern detection (WFPD)/defect classification Introduction
    X Comparison (of accuracy) with classical wafer map inspection algorithms Introduction
    X Methods of physical failure analysis (PFA)/root cause analysis of ICs Introduction
    X Fault analysis/PFA (Physical Failure Analysis) time and efficiency Introduction
  Root Cause Deconvolution (RCD) Introduction
  Patterns on wafers commonly reflecting specific process failure information Introduction
Feature extraction using radon transform Introduction
Histogram for wafer analysis (e.g. percentage and frequency of grey level in the image) Introduction
Wafer map similarity ranking (WMSR) Introduction
Euclidean distance and Euclidian similarity for images Introduction
Defects and analysis in integrated circuit (IC) manufacturing Introduction
  Global defects and local defects identified by defect denoising Introduction
    X Local clustering Introduction
      Fuzzy C means with HCM  
      Similarity-based clustering  
      Infinite warped mixture model  
      Density-based spatial clustering  
    X Spatial filter for wafer map analysis Introduction
    X Few-shot learning Introduction
    X Self-supervised machine learning Introduction
  Unsupervised learning Introduction
    X Clustering Introduction
      Model-based clustering Introduction
        Support-vector clustering (SVC) Introduction
        K-Means clustering for images Introduction
      Nearest-neighbor (NN) cluster removal Introduction
    X Convolutional Autoencoder (CAE) Introduction
  Human/manual inspection of defects in wafer map Introduction
  Automated defect scanning in wafer map Introduction
    X (Deep) Convolutional neural networks (CNN) Introduction
  Detection and classification of defective dies/chips in wafer map Introduction
Excursion wafer Introduction
Convert images between Cartesian and Polar forms Introduction
Draw circles/lines on images Introduction
List of notations for machine learning application to wafers Introduction
Stack/overlap wafer bin map Introduction
Outlier of feature (code)
Output the web links obtained by Google Search Introduction
Save the webpages obtained by Google search into a text file Introduction
Methods of data and information visualization Introduction
Automatically review, scroll, click webpage and its link Introduction
Open an application window through search at start Introduction
Find nearest white pixel to a given pixel location on an binary image Introduction
Open a new tab in an application window Introduction
Table of PC/computer/Windows shortcut hotkeys Introduction
Table of Word shortcut hotkeys Introduction
Copy and apply formatting in Word and PowerPoint Introduction
Copy and apply formatting in Word and PowerPoint Introduction
Move the active window to make space for other apps Introduction
Work (read and write) on Excel sheets Introduction
Minimize/maximize/restore/activate/resize/move/close Window objects Introduction
Get the name of the current/most front window Introduction
Notepad window Introduction
Bring/activate an application/window to most front/foreground Introduction
Bind/link multiple commands to buttons in a window Introduction
Check to see if or get a window with a name containing specific titles or texts Introduction
(Single and multiple enter/input) box for pop-up window Introduction
Bag-of-words model Introduction
Find the best word/text similarity Introduction
Pop-up windows/messages tkinter, ctypes, easygui
Option/selection/choice methods ("pop-up windows of Yes and No ") Introduction
Set default programs by file extensions and by file types and programs on Windows Introduction
Wheatstone bridge and its simulation Introduction. code
Popup windows with inputs Introduction
Popup windows with frames Introduction
Copy text into clipboard and then you can paste it a webpage, text/txt, word or powerpoint file automatically (code)
Keyword search function/check whether or not a string is within another string (a space is included as a string character) Introduction
Open webpages in internet browsers (Chrome, Microsoft edge, IE browser) Introduction
Open an image to file from URL (webpage), then it can be saved in PC code, code. open with color changed.
Upload files to webpages Introduction
Automatically fill contexts into or select options on webpage Introduction
Selenium and pop-up windows Introduction
Check if a popup dialog is a window or not for Selenium app Introduction
Find elements on a webpage Introduction
Write to a specific cell in a csv file Introduction
Find a specific word in a webpage and count occurrences Introduction
Web Scraping (save contents from a webpage) Introduction
cv2.warpAffine() (code)
             
Web mining Introduction
except win32gui.error Introduction
Machine learning example step-by-step (wafer fail analysis) Introduction
Word vectors Introduction
Machine learning workflow/procedure Introduction
watchdog  
Simple watchdog to monitor file/folder changes (monitor file creation and then write the file paths into the text file) Introduction
Monitor specific new files, and execute the file or another file (e.g. with Watchdog) Introduction
Watchdog for monitoring specific file or files with specific extension and/or file names Introduction
Watchdog for monitoring specific file or files with specific extension, and then run another file from watchdog Introduction
Watchdog ignore/skip and take pattern in directory/path Introduction
watchdog with conditioning break Introduction
watchdog to look for filesystem changes: Sort/move files, which was pasted to desktop, to specific folders; trace, check file changes in specific folders in real time. Introduction
watchdog.observers (code)
watchdog.events (code)
Simple ways to execute another python file when a new file has been uploaded Introduction
Monitor multiple changed of folder and files Introduction
class watchdog.events.FileSystemEvent(src_path) Immutable type that represents a file system event that is triggered when a change occurs on the monitored file system. event_type = None :: The type of the event as a string. is_directory = False :: True if event was emitted for a directory; False otherwise. src_path :: Source path of the file system object that triggered this event.
class watchdog.events.FileSystemMovedEvent(src_path, dest_path)

watchdog.events.FileSystemEvent :: File system event representing any kind of file system movement. dest_path :: The destination path of the move event.

class watchdog.events.FileMovedEvent(src_path, dest_path)

Bases: watchdog.events.FileSystemMovedEvent :: File system event representing file movement on the file system.

class watchdog.events.DirMovedEvent(src_path, dest_path) Bases: watchdog.events.FileSystemMovedEvent :: File system event representing directory movement on the file system.
class watchdog.events.FileModifiedEvent(src_path)

Bases: watchdog.events.FileSystemEvent :: File system event representing file modification on the file system.

class watchdog.events.DirModifiedEvent(src_path) Bases: watchdog.events.FileSystemEvent :: File system event representing directory modification on the file system.
class watchdog.events.FileCreatedEvent(src_path) Bases: watchdog.events.FileSystemEvent :: File system event representing file creation on the file system.
class watchdog.events.DirCreatedEvent(src_path) Bases: watchdog.events.FileSystemEvent :: File system event representing directory creation on the file system.
class watchdog.events.FileDeletedEvent(src_path) Bases: watchdog.events.FileSystemEvent :: File system event representing file deletion on the file system.
class watchdog.events.DirDeletedEvent(src_path) Bases: watchdog.events.FileSystemEvent :: File system event representing directory deletion on the file system.
class watchdog.events.FileSystemEventHandler Base file system event handler that you can override methods from.
class watchdog.events.PatternMatchingEventHandler(patterns=None, ignore_patterns=None, ignore_directories=False, case_sensitive=False)
watchdog.events.FileSystemEventHandler Matches given patterns with file paths associated with occurring events.
case_sensitive (Read-only) True if path names should be matched sensitive to case; False otherwise.
dispatch(event)

Dispatches events to the appropriate methods.
event (FileSystemEvent) – The event object representing the file system event.

ignore_directories (Read-only) True if directories should be ignored; False otherwise.
ignore_patterns (Read-only) Patterns to ignore matching event paths.
patterns (Read-only) Patterns to allow matching event paths.
class watchdog.events.RegexMatchingEventHandler(regexes=['.*'], ignore_regexes=[], ignore_directories=False, case_sensitive=False)
watchdog.events.FileSystemEventHandler Matches given regexes with file paths associated with occurring events.
case_sensitive (Read-only) True if path names should be matched sensitive to case; False otherwise.
dispatch(event) Dispatches events to the appropriate methods.
Parameters: event (FileSystemEvent) – The event object representing the file system event.
ignore_directories (Read-only) True if directories should be ignored; False otherwise.
ignore_regexes

(Read-only) Regexes to ignore matching event paths.

regexes (Read-only) Regexes to allow matching event paths.
class watchdog.events.LoggingEventHandler Bases: watchdog.events.FileSystemEventHandler
Logs all the events captured.
class watchdog.events.LoggingEventHandler

Bases: watchdog.events.FileSystemEventHandler
Logs all the events captured.

watchdog.observers.api: Immutables  
class watchdog.observers.api.ObservedWatch(path, recursive)

Parameters: path – Path string. recursive – True if watch is recursive; False otherwise.

is_recursive Determines whether subdirectories are watched for the path.
path The path that this watch monitors.
class watchdog.observers.api.EventQueue(maxsize=0)
watchdog.utils.bricks.SkipRepeatsQueue Thread-safe event queue based on a special queue that skips adding the same event (FileSystemEvent) multiple times consecutively. Thus avoiding dispatching multiple event handling calls when multiple identical events are produced quicker than an observer can consume them.

class watchdog.observers.api.EventEmitter(event_queue, watch, timeout=1)

watchdog.utils.BaseThread Producer thread base class subclassed by event emitters that generate events and populate a queue with them.
Parameters: event_queue (watchdog.events.EventQueue) – The event queue to populate with generated events.
watch (ObservedWatch) – The watch to observe and produce events for.
timeout (float) – Timeout (in seconds) between successive attempts at reading events.
queue_event(event) Queues a single event.
Parameters: event (An instance of watchdog.events.FileSystemEvent or a subclass.) – Event to be queued.
queue_events(timeout) Override this method to populate the event queue with events per interval period.
Parameters: timeout (float) – Timeout (in seconds) between successive attempts at reading events.
timeout Blocking timeout for reading events.
watch

The watch associated with this emitter.

class watchdog.observers.api.EventDispatcher(timeout=1)

watchdog.utils.BaseThread Consumer thread base class subclassed by event observer threads that dispatch events from an event queue to appropriate event handlers.
Parameters: timeout (float) – Event queue blocking timeout (in seconds).
dispatch_events(event_queue, timeout) Override this method to consume events from an event queue, blocking on the queue for the specified timeout before raising queue.Empty.
Parameters: event_queue (EventQueue) – Event queue to populate with one set of events.
timeout (float) – Interval period (in seconds) to wait before timing out on the event queue.
Raises: queue.Empty
event_queue The event queue which is populated with file system events by emitters and from which events are dispatched by a dispatcher thread.
timeout

Event queue block timeout.

class watchdog.observers.api.BaseObserver(emitter_class, timeout=1)

watchdog.observers.api.EventDispatcher

Base observer.
add_handler_for_watch(event_handler, watch) Adds a handler for the given watch.
Parameters: event_handler (watchdog.events.FileSystemEventHandler or a subclass) – An event handler instance that has appropriate event handling methods which will be called by the observer in response to file system events.
watch (An instance of ObservedWatch or a subclass of ObservedWatch) – The watch to add a handler for.
emitters Returns event emitter created by this observer.
remove_handler_for_watch(event_handler, watch)

Removes a handler for the given watch.
Parameters: event_handler (watchdog.events.FileSystemEventHandler or a subclass) – An event handler instance that has appropriate event handling methods which will be called by the observer in response to file system events.
watch (An instance of ObservedWatch or a subclass of ObservedWatch) – The watch to remove a handler for.

schedule(event_handler, path, recursive=False) Schedules watching a path and calls appropriate methods specified in the given event handler in response to file system events.
Parameters: event_handler (watchdog.events.FileSystemEventHandler or a subclass) – An event handler instance that has appropriate event handling methods which will be called by the observer in response to file system events.
path (str) – Directory path that will be monitored.
recursive (bool) – True if events will be emitted for sub-directories traversed recursively; False otherwise.
Returns: An ObservedWatch object instance representing a watch.

unschedule(watch)

Unschedules a watch.
Parameters: watch (An instance of ObservedWatch or a subclass of ObservedWatch) – The watch to unschedule.
unschedule_all() Unschedules all watches and detaches all associated event handlers.
watchdog.observers.Observer alias of InotifyObserver
class watchdog.observers.polling.PollingObserver(timeout=1)
watchdog.observers.api.BaseObserver Platform-independent observer that polls a directory to detect file system changes.
class watchdog.observers.polling.PollingObserverVFS(stat, listdir, polling_interval=1)
watchdog.observers.api.BaseObserver File system independent observer that polls a directory to detect changes.
__init__(stat, listdir, polling_interval=1) Parameters: stat – stat function. See os.stat for details.
listdir – listdir function. See os.listdir for details.
polling_interval (float) – interval in seconds between polling the file system.

class watchdog.utils.BaseThread

threading.Thread Convenience class for creating stoppable threads.
daemon A boolean value indicating whether this thread is a daemon thread (True) or not (False).
This must be set before start() is called, otherwise RuntimeError is raised. Its initial value is inherited from the creating thread; the main thread is not a daemon thread and therefore all threads created in the main thread default to daemon = False.
The entire Python program exits when no alive non-daemon threads are left.
ident Thread identifier of this thread or None if it has not been started.
This is a nonzero integer. See the thread.get_ident() function. Thread identifiers may be recycled when a thread exits and another thread is created. The identifier is available even after the thread has exited.
isAlive() Return whether the thread is alive.
This method returns True just before the run() method starts until just after the run() method terminates. The module function enumerate() returns a list of all alive threads.

is_alive()

Return whether the thread is alive.
This method returns True just before the run() method starts until just after the run() method terminates. The module function enumerate() returns a list of all alive threads.

join(timeout=None) Wait until the thread terminates.
This blocks the calling thread until the thread whose join() method is called terminates – either normally or through an unhandled exception or until the optional timeout occurs.
When the timeout argument is present and not None, it should be a floating point number specifying a timeout for the operation in seconds (or fractions thereof). As join() always returns None, you must call isAlive() after join() to decide whether a timeout happened – if the thread is still alive, the join() call timed out.
When the timeout argument is not present or None, the operation will block until the thread terminates.
A thread can be join()ed many times.
join() raises a RuntimeError if an attempt is made to join the current thread as that would cause a deadlock. It is also an error to join() a thread before it has been started and attempts to do so raises the same exception.
name A string used for identification purposes only.
It has no semantics. Multiple threads may be given the same name. The initial name is set by the constructor.
on_thread_start() Override this method instead of start(). start() calls this method.
This method is called right before this thread is started and this object’s run() method is invoked.
on_thread_stop() Override this method instead of stop(). stop() calls this method.
This method is called immediately after the thread is signaled to stop.

run()

Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

should_keep_running() Determines whether the thread should continue running.
stop()

Signals the thread to stop.

class watchdog.utils.dirsnapshot.DirectorySnapshot(path, recursive=True, walker_callback=<function <lambda> at 0x7f78fbeed500>, stat=<built-in function stat>, listdir=<built-in function listdir>) A snapshot of stat information of files in a directory.
Parameters:
path (str) – The directory path for which a snapshot should be taken.
recursive (bool) – True if the entire directory tree should be included in the snapshot; False otherwise.
walker_callback –
Deprecated since version 0.7.2.
stat –
Use custom stat function that returns a stat structure for path. Currently only st_dev, st_ino, st_mode and st_mtime are needed.
A function with the signature walker_callback(path, stat_info) which will be called for every entry in the directory tree.
listdir – Use custom listdir function. See os.listdir for details.
inode(path) Returns an id for path.

path(id)

Returns path for id. None if id is unknown to this snapshot.

paths

Set of file/directory paths in the snapshot.

stat_info(path)

Returns a stat information object for the specified path from the snapshot.
Attached information is subject to change. Do not use unless you specify stat in constructor. Use inode(), mtime(), isdir() instead.
Parameters: path – The path for which stat information should be obtained from a snapshot.

class watchdog.utils.dirsnapshot.DirectorySnapshotDiff(ref, snapshot)

Compares two directory snapshots and creates an object that represents the difference between the two snapshots.
Parameters:
ref (DirectorySnapshot) – The reference directory snapshot.
snapshot (DirectorySnapshot) – The directory snapshot which will be compared with the reference snapshot.

dirs_created

List of directories that were created.

dirs_deleted

List of directories that were deleted.

dirs_modified

List of directories that were modified.

dirs_moved

List of directories that were moved.
Each event is a two-tuple the first item of which is the path that has been renamed to the second item in the tuple.

files_created

List of files that were created.

files_deleted

List of files that were deleted.

files_modified

List of files that were modified.

files_moved

List of files that were moved.
Each event is a two-tuple the first item of which is the path that has been renamed to the second item in the tuple.

.schedule() (code)
Observer() (code)
top and left, width and height for pptx (e.g. align the top-left corner of the image to the center of the slide no matter how the size of the images changes) Introduction
Invert the contrasts of black and white images (Code)
Split a sentence/string into list of words, remove all special characters/space from a sentence Introduction
Merge/combine two pptx files into one, including merging the pptx files with the words in a sentence as file names (not all words has pptx files) Introduction
Count occurrence/nubmer of words/phrase in a text file Introduction
Write/save content to a text file Introduction
Generate text file with the bank of collecting all words, characters and strings from news Introduction
Extract a table from a webpage Introduction
Convert DataFrame to a HTML Table and save as a HTML webpage Introduction
Detection procedures/processes of spatial defect patterns (bins) in wafers Introduction
   

 

   
.to_csv()/.writerow() CSV: Instruction
write() Save as a text file. Instruction
write() (Code)
csv.writer() CSV: Return a writer object responsible for converting the user’s data into delimited strings on the given file-like object. csvfile can be any object with a write() method. Instruction. code. delete all items.
.writerow()/.writerows() CSV: Introduction. code. delete all items.
sys.stderr.write() (code)
while Instruction
while True Introduction
while 1
width code, code. code, (code) (code)
.withdraw() code
with ... as ... code. code.
with mss.mss() as sct (code)
with open() Introduction. code.
ctypes.windll.user32.MessageBoxW Code. Code.
win32clipboard.OpenClipboard() code.
win32clipboard.GetClipboardData() code.
win32clipboard.CloseClipboard() code.
v2.rectangle(image, start_point, end_point, color of border line, border thickness) border. Compute the bounding box of the contour and then draw the bounding box on an image to represent where the ROI is. code. code. code.
Get dimensions (sizes) of image:
dimensions = img.shape
Get height, width, number of channels in image
height = img.shape[0]
width = img.shape[1]
channels = img.shape[2]
Introduction. General, code. code. code. code. code. code.
cv2.waitKey(0) Will display the window infinitely until any keypress (it is suitable for image display). Therefore, if you use waitKey(0) you see a still image until you actually press something. code. code. code. code.
cv2.waitKey(1)

Will display a frame for 1 ms, after which display will be automatically closed. Since the OS has a minimum time between switching threads, the function will not wait exactly 1 ms, it will wait at least 1 ms, depending on what else is running on your computer at that time.

wxPython Is a wrapper around wxWidgets for Python.
.where() Stores coordinates in a numpy array. code
winfo_height() Contain the dimensions of the current turtle graphics window. (code)
webdriver.Chrome() (code). (code).
.set_window_position() (code)
.maximize_window() (code)
execute_script("window.scrollBy(0, 250)") (code)
win32api.SetCursorPos() (code)
win32api.GetCursorPos() (code)
winleft and winright

Introduction

hotkey('w') Introduction
hotkey('win') Introduction
.getAllTitles() Get all the Python program windows, *IDLE Shell window, e.g. *IDLE Shell 3.9.5, the most front window on Dreamweaver, the most front webpage on each Chrome window, the name of each opened applications, e.g. DigitalMicrograph. Introduction
.getWindowsWithTitle() Introduction
.getAllWindows() (code)
.getActiveWindow() (code)
.getActiveWindow() (code)
.getWindowsAt() (code)
.width (code)
.activate() Activate a window: with the active cursor in the window and the window is brought to the most front on the monitor. (code)
FindWindow()

FindWindow(className, windowName ): Searches for the specified top-level window. Parameters: className is a string, which is the window class name to find, else None; The windowName is also a string, which is the window name (ie, title) to find, else None. Introduction.

.GetForegroundWindow() (code)
.GetWindowText() (code)
(cv2 or win32gui).moveWindow Set the position (coordinates) of the opened window. code. (code)
Widget in Tkinter Introduction
Word2Vec models
Word2Vec with Gensim Introduction
word embeddings Introduction
vector_size= The number of dimensions of the embeddings, namely the dimensionality of the word vectors, and the default is 100. (code)
window= The maximum distance between a target word and words around the target word, namely, maximum distance between the current and predicted word within a sentence. The default window is 5. (code). (code).
min_count= The minimum count of words to consider when training the model; words with occurrence less than this count will be ignored. The default for min_count is 5. (code)
sg= The training algorithm, either CBOW(0) or skip gram (1). The default training alogrithm is CBOW. (code)
workers= The number of partitions during training, namely, number of threads to train the model (faster training with multicore machines), and the default workers is 3. (code). (code).
driver.window_handles <Instruction>
driver.current_window_handle <Instruction>
iframe in webpage <Introduction>
.slide_width (code).
os.walk() (code).
warnings (code).
warnings.filterwarnings (code).

 

=================================================================================