Automated roughness and step height analysis of atomic force mircroscope (AFM) measurements of Through Silicon Via (TSV) surfaces.
- Generate 2D, 3D plot
- Generate roughness(RA) for Cu and polymer
- Generate step height
- Generate roll-off
- Automatically generate Excel sheet containing above values
- Download the entire AFMTOOL folder onto Desktop. If you're downloading from Github, click the green
Code
button on top of the list of files, and clickDownload Zip
. Move the downloaded folder onto your Desktop - You need to have Python version>=3.9 to run the script.
- Check if Python is installed in your computer:
- Open command line. In Windows, press Windows logo + S to launch search window, and search
cmd
. - In command line, type:
python --version
- If Python has been installed, the version that is in your computer will be returned.
- If an error message is returned, Python has not been installed. You can download it here: https://www.python.org/downloads/
- Open command line. In Windows, press Windows logo + S to launch search window, and search
- If Python has been installed in your computer, you need to proceed to install the required Python libraries that is needed to run the script. In the command line, type
cd %HOMEPATH%/Desktop/AFMTOOL-main/AFMTOOL
and press Enter. After that, typepip install -r requirements.txt
and wait for installation to be completed. - If no error messages appeared on the terminal, you have successfully installed the packages needed to run the script, please refer to Usage section below on how to run the script.
- Open the main
AFMTOOL-main
folder, and click into theAFMTOOL
folder inside. - Double click the
AFMTool.vbs
file. - User interface pops up. Click the
Browse
button.
- File Explorer window pops up. Drag and select files to be analyzed, and click
Open
. - Click the
Optional inputs
tab to customize output. SeeAdditional Functions
section below for more details, or click theHelp
button in the user interface.
- After selecting additional functions needed, go back to the main tab and click
Submit
button. - Scripts starts to process files. You can see in the progress bar how many files it has processed. Time needed is approximately 12s per file.
- After all scripts has been processed, the window below pops up. You can select either to view the file in File Explorer, open the Excel file directly, or just close the windows. Alternatively, you can find the Excel file generated by clicking into the
AFMTOOL
folder in your Desktop, click intoresults
folder and then intoxlSheets
folder. The Excel file name is of the timestamped formatDDMMYYYYHHMM_AFMResults
, where the timestamp is the time when you started running the script (after you clickOpen
in step 4).
- The script may not be able to detect the copper contact points perfectly, especialy for noisy data. It is recommended to do a quick check of the results produced by going to the
ML_identified_contacts
folder underresults
folder to check the copper metal contacts detected by the algorithm. If your Excel file isDDMMYYYYHHMM_AFMResults
, then the corresponding folder to check underML_identified_contacts
has nameDDMMYYYYHHMM
with the same timestamp. As well as the center of the cirlces detected are not close to the edge of the actual contact, and the radius is not off by more than 20% the script should be able to obtain the corect regions for calculations. For a more accurate check, you can also check the folderref_regions_imgs
underresults
to see the exact regions used by the algorithm for calculations of the roughness, plotting line profile, and finding step height.
Latest.video.mp4
One can customize the output of the script in several ways by going to the Optional inputs
tab of the user interface. Below is a non-exhaustive list of options included. For a complete list, click the Help
button under the same Optional inputs
tab.
Options:
- Use all circles: Evaluate roughness over all detected circles
- Minimum radius: Specify minimum radius of circles to be evaluated. Should be followed by a decimal/integer.
python3 AFMTOOL.py -mr 3
specifies a minimum radius of 3um. - Maximum radius: Specify maximum radius of circles to be evaluated.
- Pitch: Specify pitch (um). This will set the minimum distance between detected circles.
- Exclude: Exclude circles from calculation. If by looking at the reference images we find a small number of contacts are identified wrongly and we want to exclude them, we can use the
-E
flag followed by the list of indexes (Displayed at the bottom left of each green square) of circles to be excluded, separated by commas and not spaces. The listed circles will then be excluded from roughness calculations and will not be chosen for generation of line profile. E.g. If we want to exclude the first, third and fourth circles, type1,3,4
into the input box. Note: Theexclude
option should only be used if you're only selected one file to analyse, as it will be applied for all files selected. i.e The above code will exclude the first, third and fourth circles for all files selected.
.spm
,.001
,.000
,.00
- If after entering
python3 AFMtool.py
, the File Explorer windows does not pop up after a long time (~20s), try pressing Ctrl+C to terminate the process. If the process terminates successfully, there should be a prompt message stating so. Then type inpython3 AFMtool.py
again to restart the process. If the terminal doesn't respond to Ctrl+C also, close the terminal and restart from step 1. - If after entering
pip install -r requirements.txt
there's an error message'pip' is not recognized as an internal or external command
, try the following:- Download Python again (or clicking the existing installation exe file which has been used to download Python and then clicking “Customize installation”), and checking that the “pip” checkbox is ticked to set the path for pip.
- If the above doesn't work, you can set the PATH element from Window's cmd line: enter
setx PATH "%PATH%;C:\Python34\Scripts”
. After hitting enter, close the current terminal. Open a new terminal and try runningpip install -r requirements.txt
again.
- x,y axis have range 20um (Hardcoded to eliminate user's need of entering range. If need to change, open root AFMTOOL folder in VSCode or other text editors and search '20' to see the places being hardcoded.)
- Diameter:Pitch ratio is at least 1:2 (Used in choosing area to calculate polymer roughness. If need to change, go to util/roughness/roughness.py and change the section on getting polymer roughness.)
- Contacts are either circles or squares. (Used in identifying copper contacts.)
AFMTOOL/
├── /AFMTOOL/
│ ├── /util/ # Folder containing scripts grouped by their general functions (Draw 2D/3D plots, find roughness, find step height, etc)
│ ├── main.py # Script that will be ran, it'll call other scripts in the process of running when needed
├── /results/
├── /ref_regions_imgs/ # Place to store images indicating regions which are used for calculation of copper/polymer roughness and step height. └── /xlSheets # Folder storing final Excel reports
Open GUI (util/gui
), read user's selected files and optional inputs --> Parse AFM raw data into Numpy arrays, using scripts in /util/file_reader/
(adapted from pySPM as cited in paper) --> Flatten data array using pySPM function --> Generate 2D, 3D plots using util/draw_2d_3d_images
--> Automatically identify location of circular/square Cu pads using Hough transform algorithm in OpenCV. (util/mlScripts
) --> Calclate roughness at identified regions (util/roughness/
) --> Generate line profile around the best circle identified (util/line_profile/
), automatically identifying the regions of polymer and Cu, to calculate step height and roll-off --> Using identified regions of Cu pads and polymers, plot reference images indicating the areas used for calculations, so that user can check for program's accuracy quickly (util.ref_imgs
) --> Create new Excel file and fill in with all the calculated values (util/excel_utils/
)