That is an excellent question for others to see "when is that scale used?" My answer may surprise you; whenever you hear that it fit in. I know you were asking for a magical formula, but if you are looking to create a gypsy or dark sounding solo you can jump between the Minor (Aeolian) and Harmonic Minor by simply changing the 7th note. The 1, b3 and 5 notes are the main notes of the chord structure, both of the Minor (1, 2, b3, 4, 5, b6, b7) and Harmonic Minor (1, 2, b3, 4, 5, b6, 7) share those main notes, everything else is "color" or creating a "mood". "Modes" are actually considered "moods," that's the beauty of scales! If you hear a direction or sound you would like to create when improvising you have the freedom to make subtle adjustments to the scale formula to create that mood. For instance, you have the option of using other Modes as well in this context to change the sound, try recording a minor rhythm and playing each of the scale over to compare the sounds:
Minor (Aeolian) (1), 2, (b3), 4, (5), b6, b7
Harmonic Minor (1), 2, (b3), 4, (5), b6, 7
Dorian (1), 2, (b3), 4, (5), 6, b7
Phrygian (1), b2, (b3), 4, (5), b6, b7
The European composer Paganni visualized how the Harmonic Minor/Minor would create illusions of darkness, evil and fear in the mind of the listener. In fact this scale was actually considered by some as the devils music. That illustrates how powerful music can be. I hope this gives you a better understanding on using scales.