Calculate SNR per frame, stacked SNR, and optimal sub-exposure time for astrophotography by Bortle class and camera noise.