some Words about Physics, Python, Apple and everything else

Making (very good) Salmon Burger

This is very much inspired by Finland: Salmon, dill and beetroot.


The Buns


So credit where it‘s due, here is the recepie - in German. So what do you need for about 6 buns:

The important trick is to preheat butter and milk in a water bath to about handwarm. Then you mix everything dry. Afterwards you add the wet stuff and mix until it seems to be a dough.


And now what these things need to become is really nice and fluffy, is a lot of time for the yeast to do its thing. About 1 hour everything together. Then another 45 minutes after you formed the buns. Finally you bake them for 15 minutes at 175°C.

The Salmon


This is the center peace of the burger, but still quite easy to make. As with most fish and meat, quality of raw material makes the biggest difference. The nice thing about this kind of salmon burger is that you do not need a lot of things other than salmon:

Thats about it. You then half the salmon and cut one half in rough pieces which you use to produce a very fine salmon paste. The other half you slice in very fine pices. Then you mix both together and spice them. Do not forget to clean your knive and board after you cut the fish and sprinkle a layer of breadcumps on it, this will prevent the paddies from sticking on the wood.


There are a lot of possible spice combinations for salmon, I prefer to just use some dill, salt, pepper and a little bit if chilli. But you could also go the Asian route and use some sesame, soy souce, teriyaki and spring onions or the English version with some mustard. Either way, after you mix everything, you can form the paddies as you would with any miced meat and store them on the breadcrump covered board. Then you sprinkle some more breadcumps on top and the salmon and it is ready for the pan. If you have the feeling that everything holds really badly together and you would need some more salmon paste then just take a handful of the fracmented mix and put it in the mixer again, but not to much since the chunks of salmon are what makes these great.

If you like to you can add some cheese on top at the end. I think blue cheese would also fit very well if you are in to it.


The Cauliflower


I think this makes it all come together.

Cut the florets from the stem of the cauliflower until you have small pieces. Cook them in saltwater for about 5 minutes and let them cool a bit. Then they will get crumped in the usual way. Finally you backe them in the oven spinkeled with some oil until they are golden. This is much better than french fries as a company for the salmon burger.

All the rest

You can certainly vary here but I prefer it this way:

Also everyone seems to tell you otherwise but making mayo is quite simple, you need:

One of the things everyone tells you is that the ingredients have to be the same temperature, but my eggs and mustard are usually in the fridge while the oil is not. So what I do is I put the egg yolk and the mustard in bowel together with a pinch of salt and mix them for some time so they can heat up a bit. Then I start to add the oil by literally drizzling it in until I think it is enough mayonnaise. Add some pepper and dill, done.

The beetroot. I like them – well at least nowadays – and they are a big thing here in Finland. Just peel them, cut into slices and cook them in the water after the cauliflower is done. For some reason gherkins are also a big thing here.

And then you put it all together.


mpi4py Allgatherv Example

My current work involves some agent based simulation written in Python. I now wanted teach it some new tricks including running on multiple cores. While my normal approch for multithreading in Python is to just run several simulations in parallel to get some average, I decided it would now make sense to also have single simulations run on multiple cores. One reason for that was to make it scale more easily on the computing cluster, the other was that I assumed it would be quite easy with the agent based stucture.

For the same reasons I decided to use MPI (mpi4py): it seamed like a good fit for an agent based model (agents sending messages around) and it was available on the computing cluster. It turned out that in the end I did not use any mpi code in the agents to keep them more flexible.

Anyway, the simulations is structured in the following way: on each core/process a controller is initalized which handels not only the communication but is also in charge of the agents. This is a good fit because the simulations involves global state as base of the agents decisions.

I decide in the beginning which controller controlls which agents. This might lead to some unused processing time during the sync between the controllers because they might have to wait to get the globals state. But since each agent has a lot of data attatched, I assumed it would not make sense to depatch the agents to a different process every timestep. This would mean to shuffle around big python objects and therefore presumeably slow.

Instead only the global state is shared between the controllers. I am not sure if this is the best solutions since I did not try any other but it turned out to have a nice structure and work quite well.

One problem I sumbled upon was the that I could not gurante that each group of agents would be the same size, because when you want to simulate 100 agents on 16 cores it does not add up. This meant I could not use the normal allgather methods of MPI to collect the state but had to use allgatherv which can deal with the different sizes. Sadly there is no documentation about allgatherv in MPI4PY. With some googling I worked out an example of how it works I wanted to share so here it is:

from mpi4py import MPI
import numpy as np

rank = comm.Get_rank()
mpi_size = comm.Get_size()

# work_size = 127  # arbitrary prime number
work_size = 100  
work = np.zeros(work_size)

base = work_size / mpi_size
leftover = work_size%mpi_size

sizes = np.ones(mpi_size)*base
offsets = np.zeros(mpi_size)

start = offsets[rank]
local_size = sizes[rank]
work_local = np.arange(start,start+local_size,dtype=np.float64)

print "local work: {} in rank {}".format(work_local,rank)

summe = np.empty(1,dtype=np.float64)


print "work {} vs {} in rank {}".format(np.sum(work),summe,rank)    

Hiking Day with Family

Mom and Caro

So during the visit of my mom and my "little" brother we did some more hiking. (At this point there is no denying we like to go hiking). The first day was in a swampland near Oulu and it was a nice trip through the autumn colored forest. The only thing were we had some bad luck was the barbecuing because the wilderness hut we chose hat no wood left. Any way here are some pictures from the trip.

Wilderniss Hut These are acually quite similar to the ones we have in Germany


The Path This is how you comfortably hike through the swamp.


For the next trip we travelled to a national park "near" by: Syöte. In other words we travelled to winter land. Where we also finally hat the chance to grill some makkara. By the way, in my memories from holidays we had quite a bad memory of the sausages here (makkara), but the ones we had tried during the visit of my family were quite good although a little bit exotic. The most normal ones were some chorizos made here in Finland. Next up: some more typical short "sauna sausages" filled with chili cheese, which we ate during the hiking trip. We were hungry so maybe our taste was a bit of from normal, but we all liked them. The last ones were Frankfurter filled with blue cheese! The blue cheese was very mild and overall it was a good sausage (even my mother said so!). Another thing you would not imagine is, how many different sausages for barbecuing you can find here… Anyway here are some images from our snowy hike.

Little Brother

The Hobbits

Syöte I

Syöte II

Syöte III

Syöte IV

Syöte V

It is also worth to note that we were never the only ones hiking nor barbecuing.

 page 1 / 7  older