Reserve 100g of the custard. Put the rest in a big bowl with the butter and sugar, and beat with an electric whisk until pale and fluffy. Beat in the eggs one by one, followed by the vanilla, then fold through the flour, ground almonds and baking powder. Spoon the batter into the tin, leaving it rough on top. Scatter over the raspberries, dot over dollops of the reserved custard and scatter with the flaked almonds. Bake for 30-35 minutes or until a skewer poked into the middle of the sponge comes out clean.