Commit ee90ef56 authored by Caillat Michel's avatar Caillat Michel
Browse files

Header normalization : JY/BEAM is systematically transformed into Jy/beam in BUNIT

parent b28f2442
......@@ -298,6 +298,9 @@ class DataBlock:
#
# Header "normalization"
#
if "BUNIT" in self.__header and self.__header["BUNIT"] == "JY/BEAM":
self.__header["BUNIT"] = "Jy/beam"
if "TELESCOP" not in self.__header:
self.__header["TELESCOP"] = "Unknown"
......@@ -1169,8 +1172,9 @@ class DataBlock:
accum = np.asarray(accum)
result = {}
bunit = self.__header["BUNIT"]
if bunit == "Jy/beam":
if bunit == "Jy/beam" :
sumunit = "Jy"
bunit = "Jy/beam"
else:
sumunit = bunit
result["sum"] = {"value": np.sum(accum).item() / self.__convert * self.__cdelt , "unit" : sumunit}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment