Hello all. Last week I was assigned an IDl task from Silvina Guidoni as follows.
1) Generate a random array of flux
2) From this, generate a normally distributed array of flux
3) Calculate the first two moments (the mean and the standard deviation, as far as I understand)
4) Check that these moments are theoretically correct
5) Plot a histogram of this array of flux
After a somewhat extensive (although i'm sure in a few weeks time i'll laugh at that descriptor) period of fiddling around with IDL, Silvina and I came to the conclusion that generating a random array of flux and then converting this to a normal distribution was not as efficient as using the rather nifty tool on IDL that generates normally distributed gaussians, with a mean of 0 and standard deviation of 1.
So, here is a randomly generated 3000x3000 array with a normal distribution
Since the point of the whole exercise was to learn IDL, I than ran a couple of for lops to determine the mean and standard deviation of this array. Lo and behold, the mean was roughly zero and the standard deviation was roughly 1. Good job normally distributed random number generator.
So with that done, all that is left is to plot the histogram of this array of flux. Since there is a reasonably large number of elements (9 million to be exact - don't accidentally tell IDL to print an array like this) I thought a relatively small bin size would be appropriate.
Here is my beautiful gaussian curve in histogram form. A bin is just a certain predefined interval, and the plot is the result of counting how many elements of the array fall into that specific interval.
This task might seem a bit contrived but a common assumption in solar physics is that on a magnetogram, the flux is distributed like a gaussian. So this task should prove to be quite a useful one in the long run.
So that was last week. Met with my advisor, Dana Longcope, today to get an overview of what i'm supposed to be doing for the rest of the 10 weeks i'm here. Had quite a lengthy discussion about magnetic null point densities and various tricks to make calculating them possible. I might be wrong, but I think i'm going to be trying to find a null point density that takes freqency of waves propagating through the magnetic field into account. Below a certain cutoff frequency, null points reflect certain waves. My head is still spinning with the effort of trying to take this all in though... Task for now is to try and understand how gaussians behave in general and a paper Dana wrote from 2003 about calculating null point densities.
Wedneaday 8th of June
Ok, so I understand things a little better now. Sp½ent the last couple of days trying to replicate some of the results from Dana's 2003 paper "on the distribution of magnetic null points above the solar photosphere". In essence, i've been trying to find a probably distribution for null points neglecting a factor of scale height in the solar photosphere. And by find, I mean get the result that is in the paper. This involved evaluating the determinant of the Jacobian matrix of the magnetic field.
Having worked this out, in order to get some conception of what this function was behaves like, I plotted it with respect to one of it's variables (keeping the other constant) Due to the intrinsically random nature of the field however, I got a very spiky graph. What I had done wrong was I had not plotted the expectation value of this function. So a few for loops here and programs there I had it. Also, asking IDL to calculate 10 million realisations of five different distributions, and then calculate 500 points of a function comprising of them takes a while! On the plus side, I learnt why
this is funny...
Here is the
beast function in question