Taavi accomplished this task very well and produced an excellent result. He also learned a lot in the process, not just about KAIRA and our geophysics, but also about programming and software engineering techniques. (He also taught us a thing or two!).
Today was Taavi's last day at the observatory. Before departing, he wrote this small report, in addition to the rest of the software documentation, which we are including as today's KAIRA web log post.
Taavi writes about his software:
This program combines two BST files into a single one, the program can also be used to plot an image from a single file. Data taken from the two files is controlled by user input, giving the program time from last N seconds as variable. The program then detects the relevant files and takes copies the data, amount specified by the given time from the chronologically first file, if it doesn't have enough data, the program then continues to second file and copies the remainder from there. If there is no file from the day specified, the program will use file filled with 'scrap data' to create empty data in its place, the scrap data is one hour of information copied from a random BST file repeated 24 times to get 24 hours amount of data. If neither of the two files is found, the program will still plot an image, but it will be fully black graph representing that there is no data from given period.
Sample plots... click to enlarge. (Image: T. Vierinen)
After the temporary file is created, the code made by Derek kicks in and uses the data to create a graph. Only changes I made there were few lines of code that would draw a black box on the scrap data and one that draws a line to position where the data from different files meet, so it is easier to see from which day the data originally came.
In the screenshot there are images which were drawn by the program: reference (1), (2) and (3).
- In reference(1) you can see what is drawn when both of the relevant files are found, if data from only a single file is used, the image will be similar, but it won't have the white line as there is only a single file as its source.
- In reference(2) you can see what the image looks like when the latest file doesn't exist. The program draws black box in its place, for 24 hours worth of samples.
- In reference(3) the situation is reversed from reference(2), this time the oldest of the two wanted files doesn't exist, note that in both reference(2) and reference(3), the white line separating the data from different source can be seen.
The program was created using python 2.7.5, by both me, Taavi Vierinen, and Derek McKay-Bukowski. I enjoyed this project, because I managed to learn a lot of skills from it, from using python to managing what I did on my spare time. The project was good to me in many ways and it wasn't too easy either, nor too difficult!
Thanks for all your efforts Taavi and well done on the project. Have a safe trip back down south and we wish you all the best.
To you, and all our readers, have a nice weekend!