Skip to content

Python programs & the command line interface

Michael A. Cianfrocco edited this page Jun 7, 2018 · 1 revision

Home > Getting started > Python programs & the command line interface

###Python programs and the command line interface

As a user-driven software developer, TEM | pro strives to develop computing tools that are user friendly. To this end, we write and develop code that employs Python, an open source language that provides developers with a multitude of tools to interface with its users.

This means that you will see many programs that have the .py suffix attached to their name. When you see this, you can type the filename (with the .py suffix) on the command line and the program will automatically provide you with the input options expected.

For instance, the program EM-processing/Estimating_CTF/estimateCTF_CTFFIND3.py is a Python program used for estimating parameters of your EM micrographs. To see what input options it expected, run the program by typing:

$ EM-processing/Estimating_CTF/estimateCTF_CTFFIND3.py 

This will output the following to the command line:

Usage: estimateCTF_CTFFIND3.py --input= --apix= --mag= --cs=

Options:
  -h, --help           show this help message and exit
  --input=FILE         Wild card containing absolute path to .mrc micrographs
                       ('/path/micro/*.mrc')
  --apix=FLOAT         Pixel size of micrographs
  --mag=INT            Magnification of micrographs
  --cs=float           Cs of microscope (mm)
  --kev=INT            Accelerating voltage (keV)
  --ampContrast=FLOAT  Amplitude contrast (0.07 - cryo; 0.15 - neg. stain)
  -d                   debug

Then, to run the command, you will use the same script name along with with input options:

$ EM-processing/Estimating_CTF/estimateCTF_CTFFIND3.py --input='micros/*.mrc' --apix=1.23 --mag=49000 --cs=2.2 --kev=120 --ampContrast=0.15
Clone this wiki locally