It is a general rule whether it is a solar or lunar eclipse, vimocana snanam must be done only after looking at the sun or moon respectively at the end of eclipse.
At times, they might set at the end of eclipse which makes it impossible to look at them. One must wait until the next time they are visible to partake food.
At other times, when they are about to rise, they might not be visible due to cloudy skies. With the help of panchangam and the surrounding brightness caused by them, it appears we can do the vimocana snanam.