Preheat the oven to 375°F (180°C or 170°C for a fan oven).
Lightly grease a 9 x 13 inch rectangular tart pan. I like to use one with a loose bottom.
Roll the pastry out to fit the pan or unroll the pastry sheet and fit the pastry into the pan, making sure it goes up the sides a little bit. Prick the bottom of the pastry with a fork several times.
Bake for 8 to 10 minutes until the pastry is just beginning to cook. It shouldn't be taking on any colour yet.
Remove the pastry from the oven and set aside to cool while you get on with making the sponge cake part of the recipe.
Mix the ground almonds, flour, baking powder and salt together in a medium bowl. Set aside.
Cream the butter and sugar in an electric mixer.
Add the eggs to the creamed butter and sugar one at a time, beating after each addition and scraping down the bowl as necessary.
Beat in the almond extract.
With the electric mixer on low, add the ground almond and flour mixture spoonful by spoonful. Beat the mixture for a minute or so, until smooth.
To assemble the tart, spread the raspberry jam over the bottom of the pastry using a pastry brush.
Scatter the raspberries over top. I like to make sure the tops are all pointing up because I'm obsessive like that - but you don't have to be. They often get knocked over when the cake mixture is spread over top anyway!
Dollop the cake mixture in medium size spoonfuls over top of the raspberries and spread it gently to cover the raspberries.
Scatter with the flaked almonds.
Bake in the oven for 25 to 35 minutes (watching carefully after 25 minutes) or until the cake mixture is cooked and bounces back when pressed lightly with your finger.
Remove from the oven and cool completely before cutting in squares to serve.