For engineers who need to analyze shock and vibration data, Python can be a very powerful tool. But getting started with Python and understanding its relationship with libraries and IDEs can be a little intimidating (especially for a novice like me), which is why I've put together this short video infographic and corresponding blog post.
I initially created this to help me understand how these different components can work together to help engineers analyze data more confidently and efficiently. I hope it can also provide a few options to help you get up and running with Python as quickly as possible.
In this post, I'll cover:
- Getting Started with Python Video Infographic
- Downloading Python to Your Computer & Installing Libraries
- Executing Code Through a Browser or All-in-One Distribution of Python
- Resources & Conclusion
Getting Started with Python Video Infographic
This post is based on an animated graphic we created to help our readers visualize the Python environment. You can check it out below.
Downloading Python to Your Computer & Installing Libraries
The first way to get started with Python is to go directly to python.org and download Python to your computer. After you've downloaded Python, the next step is to install the libraries. There are hundreds of thousands of libraries available to help perform a variety of tasks. This is what makes Python so versatile. Once installed, Python and these libraries form the engine you use for processing.
The next step is to download an IDE, or an integrated development environment. An IDE is essentially a GUI. There are various types of IDEs like Spyder, Jupyter, PyCharm, or any simple text editor (like Notepad). You'll want to make a choice based on your needs. The code editor is then linked to Python and now you can start getting results.
The first step to conducting your analysis is to input your code -- or to write your code. Your code would call all these various libraries to perform very specific functions. Once you have written your code you then run and execute it. The code is sent to Python to be processed and then Python, in conjunction with the libraries, processes the code and returns the results to the IDE. Once this process is done, you can view the output.
For more on downloading Python and installing libraries, including more on what we recommend, you can see our blog post Get Started with Python: How & Why Mechanical Engineers Should Make the Switch and our corresponding on-demand webinar on the same topic.
Executing Code Through a Browser or All-in-One Distribution of Python
Downloading Python, the many libraries that you need, the IDE, and then linking them all together can be a difficult task, so there are a couple of simpler ways.
The first is using Anaconda, which is a distribution of Python. Anaconda includes Python, many different libraries, and several IDEs (including Spyder and JupyterLab). In this single installer you'll have everything you need for engineering and data science work.
Another option is Google Colab, which offers a similar package. With Colab, anyone can write and execute Python code through a browser. Additionally, Colab notebooks are easy to copy and share.
Both Anaconda and Colab make life a lot simpler when getting started with Python. For an extremely thorough overview of setting up your environment for Python and an excellent overview of Anaconda, you can check out Real Python's article on MATLAB vs Python.
Resources & Conclusion
Unless you are a programmer familiar with the intricacies and pros and cons of each element of python, my suggestion would be to go with either the Anaconda all-in-one downloadable package, or the online package provided by Google Colab.
For a more in-depth overview of why mechanical engineers should start using Python, you can check out our blog post Get Started with Python: Why & How Mechanical Engineers Should Make the Switch. There you'll find a ton of resources (like links to Google Colab notebooks) to get you started.
If you'd like to learn more about Python and how it can help you with your shock and vibration data analysis, you can check out our Python for Mechanical Engineers webinar series that includes topics such as:
- Get Started with Python for Mechanical Engineers
- Get Started with Pandas & NumPy
- Generate Beautiful & Interactive Plots Using Plotly
- Simplifying Vibration & Shock Analysis with the enDAQ Python Library
We host quite a few live webinars and Q&A sessions on this topic, so please feel free to join us. We'd love to answer your questions and help you with using Python for your analysis. You can sign up for webinar notifications, too, if you'd like.
Good luck with your analysis!
Related Posts
- Getting Started with Python: Why & How Mechanical Engineers Should Make the Switch
- MATLAB vs Python: Speed Test for Vibration Analysis
- Top 12 Vibration Metrics to Monitor & How to Calculate Them