Previously, I posted about the enormous performance gain when using NumPy for repeated calculations – especially when the calculations are repeated within a for loop. There is a great blog here that profiles the benefits of native Python vs. Numpy vs. Cython. Really good read. And similarly, an experiment here that compares Python, NumPy, Fortran … Continue reading

# Monthly Archives: August 2013

# Optimising UTCI Algorithm in Python

The UTCI algorithm (in Python) is shown below: and is equivalent to the polynomial for calculating UTCI. In a previous post I profiled the running time of various implementations, and found the the algorithm above was massively faster than the current implementation, but significantly slower than simply evaluating the polynomial. However, in the interests of … Continue reading

# Run time analysis of UTCI algorithms

Previously, I posted an algorithm for UTCI (see here). This algorithm takes advantage of the polynomial nature of the UTCI formula, to simplify the expression to 28 terms (compared to 84 terms). Here, I examine the performance of 4 variations of the UTCI algorithm. To simplify the tests, we use a generalised case which closely … Continue reading

# C# iterators and generators (UTCI algorithm)

Iterators / generator expressions are an ideal way to represent the UTCI algorithm. The Python expression previously posted generates the UTCI terms using a generator, then iterates through these to sum them. This can also be done in C# (reference for this: here) NOTE: I am not 100 % sure of the accuracy of this … Continue reading

# UTCI algorithm

I have been battling with the formula for UTCI. It has such an interesting, regular pattern; I was certain it could be coded into an algorithm more succinctly than coding the full 84-term (1.5 pages worth of page) expression. 22:27, Wednesday August 21st, I have my first (untested) draft of the algorithm: By working term-by-term … Continue reading

# UTCI Calculation

Wow, this calculation is a little outrageous. The formula is a 6th order polynomial, that includes 84 terms and crosses that many lines of code! I am wondering if it is possible to simplify this somewhat. Luckily there is a regular pattern, and we can make an assumption to simplify this further (based on knowledge … Continue reading

# Baby steps forwards

Summer 2004, I was lucky to get a Summer Research Scholarship to ANU in Canberra. It was my first time in a proper research lab. The train arrived in Canberra and I was picked up by their lab tech who was a real motherly type of lady who had been with the group for 10 … Continue reading