Пример #1
0
    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)
Пример #2
0
    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)
Пример #3
0
 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)
Пример #4
0
 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)
Пример #5
0
 def abs_sys(self):
     lst = self._abs_sys
     return xarray.lst_to_array(lst, mask=self.mask)
Пример #6
0
 def abs_sys(self):
     lst = self._abs_sys
     return xarray.lst_to_array(lst,mask=self.mask)