Sky Transmission#
The sky transmission map, sky_trans.fits, is the simplest part of a yield input package. It models the coronagraph’s performance when observing an infinitely extended source. This is represented as a unitless 2d array \(T_\text{sky}(x,y)\).
from pathlib import Path
import astropy.io.fits as pyfits
import matplotlib.pyplot as plt
import numpy as np
############################################
# Path to the yield input package directory
############################################
yip_path = Path("../../input/ApodSol_APLC")
############################################
# Loading the stellar_intens files directly
############################################
sky_trans = pyfits.getdata(Path(yip_path, "sky_trans.fits"))
fig, (ax_raw, ax_ln) = plt.subplots(ncols=2, figsize=(12, 5))
img_raw = ax_raw.imshow(sky_trans, origin="lower")
img_ln = ax_ln.imshow(np.log(sky_trans), origin="lower")
ax_raw.set_xlabel("x(pixel)")
ax_raw.set_ylabel("y(pixel)")
ax_ln.set_xlabel("x(pixel)")
ax_raw.set_title("Raw sky_trans")
ax_ln.set_title("Natural log sky_trans")
plt.colorbar(img_raw, ax=ax_raw)
plt.colorbar(img_ln, ax=ax_ln)
plt.show()