Phys 512 Problem Set 4

Original price was: $35.00.Current price is: $30.00.

Rate this product

Phys 512 Problem Set 4
In preparation for next week, I also suggest you try to run
in the mcmc directory. You will need to install CAMB (pip3 install camb may
work for you, but it also may not), and your life will be easier next week if you
already have the dependencies sorted out.
1) We will do a non-linear least-squares problem. Look at the file sidebands.npz in the mcmc directory. This file contains data from one of your TA’s
who is trying to measure the width of a resonance in an optical cavity. To do
this, they send in a laser with sidebands (so, most of the laser power is at a
central frequency ν plus a bit of power at ν + dν and ν − dν). They use a piezo
to mechanically push on the cavity, which in turn alters the resonant frequency
of the cavity. You can assume that over the stretch of data we use, the piezo
shifts the cavity resonant frequency linearly in time. You can load the data with
a) To start, model the data as a single Lorentzian and use analytic derivatives.
Please use Newton’s method (or Levenberg-Marquardt if you prefer) to carry
out the fit. What are your best-fit parameters for the amplitude, width, and
center? Please parameterize the Lorentzian as
d =
1 + (t − t0)
b) Estimate the noise in the data, and use that to estimate the errors in
your parameters.
c) Repeat part a), but use numerical derivatives. I suggest you use a helper
function that accepts an input function (and any ancillary data/arguments you
want to pass it) and returns the derivatives of that function with respect to the
model parameters. Are your answers statistically significantly different from
your answers in a)?
d) Repeat part c), but now model the data as the sum of three Lorentzians.
The width of all three Lorentzians should be the same, and the separation of
the side peaks from the main peak should be equal, i.e.:
d =
1 + (t − t0)
1 + (t − t0 + dt)
1 + (t − t0 − dt)
You should have sensible guesses for a, t0, w from earlier, so you should try to
estimate reasonable initial guesses for b, c, dt. What are your errors on these
e) Look at the residuals from subtracting your best-fit model from the data.
Do you believe the error bars you got by assuming the data are independent
with uniform variance, and that the model is a complete description of the data?
f) Generate some some realizations for the parameter errors using the full
covariance matrix AT N−1A from part d). Plot the models you get from adding
these parameters to the parameter errors. What is the typical difference in χ
for the perturbed parameters compared to the best-fit χ
? Is this reasonable?
g) Redo the fit from part d), using an MCMC. IMPORTANT – please use
your parameter covariance estimate from d) to generate your trial MCMC samples, though you can introduce an overall scaling (the overall scaling should be
order unity, but you may find faster convergence if it isn’t exactly 1). Show at
least one plot that explains why you think your chain is converged. Did your
error bars change?
h) The laser sidebands are separated from the main peak by 9 GHz (so dx
maps to 9 GHz). What is the actual width of the cavity resonance, in GHz?


There are no reviews yet.

Be the first to review “Phys 512 Problem Set 4”

Your email address will not be published. Required fields are marked *

Scroll to Top