To make the pastry: Place the flour, cornmeal, sugar, salt and butter in a food processor and blitz until it resembles breadcrumbs, alternatively, rub the butter into the dry ingredients with your fingertips. Add the egg and mix until the pastry comes together. Form into a disc, wrap in clingfilm and refrigerate for at least half an hour.
Preheat the oven to 200C/400F/gas mark 6. Line a baking sheet with parchment paper.
Mix together the flour, ground almonds, sugar and cornmeal and set aside.
To make the marzipan topping: Place the marzipan, ground almonds, flour, sugar and butter in a food processor and blitz until it forms crumbs.
Stone the nectarines and cut into thin slices, place in a large bowl, sprinkle over the cornflour and sugar and gently toss together.
Roll out the pastry on a lightly floured surface into a large (approx 32cm/12.5in) circle, slide it onto the prepared baking sheet. Scatter the flour, almond, sugar and cornmeal mix over the pastry, leaving a 5cm/2in border around the edge. Spread the nectarines over the top, discarding any liquid. Scatter the marzipan topping over the nectarines.
Fold the pastry border over the topping, brush with beaten egg and scatter over some demarera sugar. Bake for 45-50 minutes until crisp; you may need to cover the galette with foil after 20 minutes or so to stop it colouring too much, but remove the foil for the final five minutes of baking to allow any liquid to evaporate. Leave to cool for about 15 minutes before serving.