Soak the tamarind to extract the water and cook the toor dal first.
If you’re using the fresh rasam powder, prepare it now while tamarind is soaking and dal is cooking.
Roast all the dry spices for the rasam powder just barely a touch of oil to keep them from burning. Then add the freshly grated coconut and roast it for barely a minute. Do not allow it to brown or burn. Cool this mixture and pulse it into a wet powder. Careful not to over grind the spices or the fats in the coconut will start to separate and then the coconut will not exude its milk in the simmering as it ought, effectively destroying the rasam. So pulse and leave this a little coarse if you must. You will need 4-5 teaspoons of this mix; save (refrigerate or freeze) any remainder for future use -- and bring to room temperature or very lightly toast before that future use.
In a vessel of a minimum of 1L capacity, add the tamarind water, turmeric (if using), and the tomatoes. Cook until the raw smell/taste of the tamarind disappears and the tomatoes are cooked.
Now add the cooked dal along with its cooking water. Adjust the water in the pan to come to about ¾ litre (ie, about ¾ full, assuming 1litre capacity). Heat on medium flame.
If using a pre-made Mysuru rasam powder: add 3 teaspoons now
If using the fresh rasam powder: add the turmeric now along with the rasam powder.
Add jaggery to taste (about a teaspoon or so works well for me), and salt.
This mixture will start to rise and froth in a few minutes, and as soon as it does—turn off the flame, wait for a minute for any bubbling to subside, and add the coconut milk, if you’re using it.