WARP – Week 4

Captain’s log, stardate: -303860.

The Theoreticians

After analysing the error horde’s level of infiltration into the data, a shocking revelation occurred among the crew. It wasn’t the errors the team could see that was the nightmarish thought but rather the ones they could not… La Forge saw fit to limit his ship’s exposure to error-infested space. 

By plotting a histogram of the original dataset’s magnitudes in the NB392 filter (shown below), we chose a limiting magnitude to the data of 24.71 which is the peak magnitude. This meant that the volumes of the sky we are observing for each spectral type had to be recalculated and that the data that has a larger magnitude than this can be excluded as this data is incomplete, containing stars too faint to observe. This then meant a new subset had to be created to further reduce the number of potential metal-poor stars by only including data points with a magnitude in NB392 lower than the limiting magnitude.

A histogram of the NB392 values from the original dataset used to find a limiting magnitude.

The entire crew gazed proudly upon the vast celestial abyss they had spent so long examining. They had all come so very far.

We also plotted all of the original data on a graph of RA and DEC overlaid with our reduced catalogue of potentially metal-poor stars. This showed how much data reduction we have done over the previous weeks to try and find potentially metal-poor stars in a section of the sky containing over 120,000 bodies.

A plot showing the position of all bodies from the original dataset in the sky overlaid with bodies that are potentially metal-poor stars.

Guinan strode confidently into the room. She seated herself at a terminal and got to work, eager to show the crew just how much this humble bartender was capable of.

The rest of the lab session was spent organising and obtaining data to create a plot of stellar number density against spectral type for a variety of metallicity brackets. To create this histogram, we have to classify all of the data points in the reduced catalogue as a star type. As we have been using g-i the past few weeks, we plotted a graph of data from the Coding Wizards of temperature against g-i. By plotting a line of best fit on this graph, we can find its equation which can be used to determine the temperature of all of the data points we have. We plotted the graph below, but this does not contain any B stars. We will plot these on the graph next week as this will increase reliability of the line of best fit for all stars.

A graph of T against g-i created using data provided by the coding team to generate a line of best fit which can then be used to find the temperatures of our potentially metal-poor stars.

When we have the temperature of all of the stars in our reduced catalogue, we can then classify all of them using the temperature ranges below.

The temperature ranges used to classify the stars. Taken from Dr. Sobral’s PHYS263 lecture notes.

The Coding Wizards

Almost as if some divine creator itself were tormenting them in some kind of sick irony, a new, very different kind of error reared its ugly head before Picard and Data’s eyes.

We began working on being able to calculate the metallicities for any stars placed onto the heat map. The first included some issues with using the data that had blank spaces. As TOPCAT and Windows read blank spaces differently, it caused the code to crash every time a blank appeared, as such we placed a mask on the data to ignore any point that included a blank. The next task was to ensure that all the data fitted within the scale of the heatmap. If the point did not lie inside the grid we created, it would result in an out of bounds error. Originally, if this was the case, the metallicity was set to -99 which would easily show that the point was not valid.

Using information obtained by Riker and the away team, Picard and Data once again harnessed the power of their enemy against it – the only way to defeat a foe as formidable as this.

Next the errors on the metallicity were calculated. By taking the error for the magnitude in each filter (which is specific to each data point) a random variation on that point was generated from a gaussian distribution. 1000 randomly gaussian distributed points were created and then the mean and standard deviation were calculated from the metallicities found at these points. This gives one metallicity and one respective error for each of the original data points.

However, this caused problems as the points could go out of bounds for some of the errors and not others. As such, the metallicities could end up around -50 with an error of +/-50. Realising that this was an error, the out of bounds metallicity was set to not calculate anything and ignore the point. As such, the stars that did not fit had no metallicity calculated and those whose errors fell outside the plot had more accurate metallicities calculated.

We are now able to calculate and output the metallicities for many different types of stars with correct errors.

Real sources with error bars placed on a metallicity heat map to visualise their metallicity.

Data tirelessly (tiring was merely a human flaw) worked his way through more data than any human could hope to handle in their lifetime. His objective was to do in a matter of hours what no human could ever hope to accomplish. A task so monumental in magnitude that its sheer size made even him unsure of its outcome…   

We also attempted to improve the accuracy and quantity of the theoretical points that allowed us to generate the heatmap in the first place. By doing so, we could hopefully have a larger scale and thus calculate the metallicities for more stars. This proved to be a much larger challenge than initially predicted.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s