Add the onion slices into the pan with the residual oil and fry them until almost golden. Next add the chopped tomatoes, salt and all the powdered spices (including the ground ones) except for the garam masala. Mix everything well, then turn the heat down and allow the tomato-onion mixture to cook and thicken up. Once the oil begins to get released from the sides, whisk the yoghurt and mix it in well until fully incorporated.