-
Notifications
You must be signed in to change notification settings - Fork 2
/
stack.py
28 lines (25 loc) · 1.3 KB
/
stack.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"""
Script to align and stack images.
"""
from fits_utils import *
def main():
for target in ["bd25", "bd62"]:
for band in ["r", "g", "u"]:
unaligned_images = load_fits(path="sci/", target=target, band=band)
aligned_images = align(unaligned_images, centroid=hybrid_centroid, filter="combined")
stacked_image = stack(aligned_images, correct_exposure=False)
write_out_fits_2(stacked_image, "sta/{}_{}_stacked.fits".format(target, band))
for target in ["m52"]:
for band in ["r", "g"]:
unaligned_images = load_fits(path="sci/", target=target, band=band)
aligned_images = align(unaligned_images, centroid=hybrid_centroid, filter="none")
stacked_image = stack(aligned_images, correct_exposure=False)
write_out_fits_2(stacked_image, "sta/{}_{}_stacked.fits".format(target, band))
for target in ["m52"]:
for band in ["u"]:
unaligned_images = load_fits(path="sci/", target=target, band=band)
aligned_images = align(unaligned_images, centroid=hybrid_centroid, filter="combined")
stacked_image = stack(aligned_images, correct_exposure=False)
write_out_fits_2(stacked_image, "sta/{}_{}_stacked.fits".format(target, band))
if __name__ == '__main__':
main()