Skip to content

Commit 3860e5f

Browse files
authored
Add check for BUNIT (#117)
1 parent 1e9e6bf commit 3860e5f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

RMtools_3D/do_RMsynth_3D.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,8 @@ def writefits(
615615

616616
maxPI, peakRM = create_peak_maps(FDFcube, phiArr_radm2, Ndim - freq_axis)
617617
# Save a maximum polarised intensity map
618-
header["BUNIT"] = headtemplate["BUNIT"]
618+
if "BUNIT" in headtemplate:
619+
header["BUNIT"] = headtemplate["BUNIT"]
619620
header["NAXIS" + str(freq_axis)] = 1
620621
header["CTYPE" + str(freq_axis)] = (
621622
"DEGENERATE",

0 commit comments

Comments
 (0)