When creating an astronomy stacked picture the layer opacity is normally set to 100, 50, 33, 25, 20, 17, 14 etc.
100/N where N is which layer you’re on and N=1 is the base/background
Here is a script that will set the opacity to the correct value for each layer.