def __getattr__(self, k): try: lst = [getattr(abs_sys, k) for abs_sys in self._abs_sys] except ValueError: raise ValueError return xarray.lst_to_array(lst, mask=self.mask)
def __getattr__(self, k): try: lst = [getattr(abs_sys,k) for abs_sys in self._abs_sys] except ValueError: raise ValueError return xarray.lst_to_array(lst,mask=self.mask)
def __getattr__(self, k): # Try Self first try: lst = [getattr(cgm_abs,k) for cgm_abs in self.cgm_abs] except AttributeError: # Try AbsLine_Sys next try: lst = [getattr(cgm_abs.abs_sys,k) for cgm_abs in self.cgm_abs] except AttributeError: # Galaxy? try: lst = [getattr(cgm_abs.galaxy,k) for cgm_abs in self.cgm_abs] except AttributeError: print('cgm.core: Attribute not found!') xdb.set_trace() # Return array return xu_array.lst_to_array(lst,mask=self.mask)
def abs_sys(self): lst = self._abs_sys return xarray.lst_to_array(lst, mask=self.mask)
def abs_sys(self): lst = self._abs_sys return xarray.lst_to_array(lst,mask=self.mask)