add overplot_chandra and capabilities to overplot classes

This commit is contained in:
2023-12-06 16:31:29 +01:00
parent b75d159c39
commit 824c63d0bc
2 changed files with 136 additions and 29 deletions

View File

@@ -54,10 +54,10 @@ def get_obs_data(infiles, data_folder="", compute_flux=False):
# force WCS to convention PCi_ja unitary, cdelt in deg
for header in headers:
new_wcs = WCS(header).deepcopy()
if new_wcs.wcs.has_cd() or (new_wcs.wcs.cdelt == np.array([1., 1.])).all():
if new_wcs.wcs.has_cd() or (new_wcs.wcs.cdelt[:2] == np.array([1., 1.])).all():
# Update WCS with relevant information
if new_wcs.wcs.has_cd():
old_cd = new_wcs.wcs.cd
old_cd = new_wcs.wcs.cd[:2,:2]
del new_wcs.wcs.cd
keys = list(new_wcs.to_header().keys())+['CD1_1','CD1_2','CD2_1','CD2_2']
for key in keys: