def unit(self, unit):
"""
This function ...
:param unit:
:return:
"""
# Convert string units to Astropy unit objects
if isinstance(unit, basestring): unit = Unit(unit)
# Loop over all frames
for frame_name in self.frames:
# Inform the user
log.debug("Setting the unit of the " + frame_name + " frame to " + str(unit) + " ...")
# Set the unit for this frame
self.frames[frame_name].unit = unit
# -----------------------------------------------------------------
评论列表
文章目录