## Scatterplot with marginal histograms

Here’s a code snippet that created a scatterplot and adds marginal histograms. Here’s the output:

Here’s a code snippet that created a scatterplot and adds marginal histograms. Here’s the output:

Posted in array, Histograms, Julia, Plots.jl, Plotting
Tagged Histogram, Julia, Plots.jl
Leave a comment

When performing a simulation of a complex system, one often uses a small time step, resulting in large resulting solution arrays. Given Julia’s excellent speed, creating these arrays is often not terribly time consuming, but one does run into trouble … Continue reading

It’s often the case in physics that one deals with a vector (i.e. a 1d array or list), where each entry is also a vector. Here’s some code which takes a list of vectors and converts them into an array … Continue reading

Posted in Array, Julia
Leave a comment

Every experimental measurement in physics includes sources of noise. Of course, we try to minimize the sources of noise, but there is a limit to this ability (thermal noise, for instance, can be minimized, but not eliminated). Consequently, it often … Continue reading

Posted in data analysis, Interactive, Julia, Smoothing
Tagged Data, Julia, Julia 1.6.3, Noise Removal, Smoothing
Leave a comment

A standard problem in introductory quantum mechanics is to solve for the allowed bound state energies for a particle in a finite potential well. In the attached Jupyter Notebook, I describe this problem, and work out the numerical solutions, and … Continue reading

Posted in Uncategorized
Leave a comment

For many small coding tasks, we simply use the computer to analyze a small amount of data, or simulate a simple system and speed is not really an issue. However, there are certainly many circumstances where speed is important. This … Continue reading

Posted in Jupyter Notebook, Numba, Timing Code
2 Comments

I’m teaching Statistical and Thermal Physics this semester using Gould and Tobochnik’s text of the same name. The text comes with Java programs to run simulations to help students (and me!) gain understanding about how systems with large numbers of … Continue reading

Posted in Ideal Gas, iPython, iPython Notebook, Matplotlib, Plotting, Statistical Physics
Leave a comment

(Updated 11-Jan-2022; fixed broken links and updated notebook) This started out as a way to make sure I understood the numpy array slicing methods, and builds on my previous post about using scipy to fit data. I define a 3 parameter … Continue reading

Posted in curve fitting, data analysis, error bars, iPython, Matplotlib, Plotting
4 Comments

Here’s a common thing scientists need to do, and it’s easy to accomplish in python. Suppose that you have a data set consisting of temperature vs time data for the cooling of a cup of coffee. We’ll start by importing … Continue reading

Posted in curve fitting, data analysis, error bars, Matplotlib, Plotting
Tagged curve fitting, error bars, scipy
4 Comments

I’m working on a text on computational physics whose primary goal is to create something useful for a one semester introductory course that all our physics majors (and now chemistry majors too) will be required to take. I want students … Continue reading

Posted in data analysis, Interesting Links, iPython, Pandas, Plotting
Tagged csv, data file, Pandas, reading, stats
Leave a comment