Seems like you sorted already, but just adding in that the current simc model doesn't try to game when it casts at all - it has a couple extra conditions on moonfire, but basically it applies them in order sunfire>stellar>moonfire, clip each of them at pandemic and sun/moon at the peaks. Overall the dot component is worth too much to try to get higher initial damage via downtime.
Code:
actions.single_target+=/sunfire,if=remains<7|buff.solar_peak.up
actions.single_target+=/stellar_flare,if=remains<7
actions.single_target+=/moonfire,if=buff.lunar_peak.up&remains<eclipse_change+20|remains<4|(buff.celestial_alignment.up&buff.celestial_alignment.remains<=2&remains<eclipse_change+20)