Commit 7d72fb76 authored by Caillat Michel's avatar Caillat Michel
Browse files

Added boundingRect to the result returned by measureBox

parent 9ae49b93
...@@ -1229,6 +1229,7 @@ class DataBlock: ...@@ -1229,6 +1229,7 @@ class DataBlock:
result["stdev"] = {"value": np.nanstd(box).item() , "unit": bunit} result["stdev"] = {"value": np.nanstd(box).item() , "unit": bunit}
result["numpix"] = {"value": np.count_nonzero(~np.isnan(box)), "unit" : "pixels (!=Nan)"} result["numpix"] = {"value": np.count_nonzero(~np.isnan(box)), "unit" : "pixels (!=Nan)"}
result["percentage of total number of pixels"] = {"value": (box.shape[0]*box.shape[1]) / (self.__header["NAXIS1"]*self.__header["NAXIS2"]) * 100, "unit": "%"} result["percentage of total number of pixels"] = {"value": (box.shape[0]*box.shape[1]) / (self.__header["NAXIS1"]*self.__header["NAXIS2"]) * 100, "unit": "%"}
result["boundingRect"] = {"value":[iRA0, iDEC0, iRA1-iRA0, iDEC1-iDEC0], "unit":"pixels"}
result = {"status":True, "message":"", "result":result} result = {"status":True, "message":"", "result":result}
self.__logger.debug("measureBox : exiting") self.__logger.debug("measureBox : exiting")
......
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