Ignore:
Timestamp:
12/08/22 00:23:36 (2 years ago)
Author:
jdquinn
Message:

CHG: MATLAB > Python translation; cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/qmu/response_function.py

    r25011 r27458  
    103103        return [rf] # Always return a list, so we have something akin to a MATLAB single row matrix
    104104
    105     def __repr__(rf): #{{{
     105    def __repr__(rf):  # {{{
    106106        # display the object
    107107        string = 'class "response_function" object = \n'
     
    116116
    117117        return string
    118     #}}}
    119 
    120     def __len__(self): #{{{
     118    # }}}
     119
     120    def __len__(self):  # {{{
    121121        return max(len(self.respl), len(self.probl), len(self.rell), len(self.grell))
    122     #}}}
    123 
    124     @staticmethod
    125     def prop_desc(rf, dstr): #{{{
     122    # }}}
     123
     124    @staticmethod
     125    def prop_desc(rf, dstr):  # {{{
    126126        desc = ['' for i in range(np.size(rf))]
    127127        for i in range(np.size(rf)):
     
    135135        desc = allempty(desc)
    136136        return desc
    137     #}}}
    138 
    139     @staticmethod
    140     def prop_stype(rf): #{{{
     137    # }}}
     138
     139    @staticmethod
     140    def prop_stype(rf):  # {{{
    141141        stype = []
    142142        return stype
    143     #}}}
    144 
    145     @staticmethod
    146     def prop_scale(rf): #{{{
     143    # }}}
     144
     145    @staticmethod
     146    def prop_scale(rf):  # {{{
    147147        scale = []
    148148        return scale
    149     #}}}
    150 
    151     @staticmethod
    152     def prop_weight(rf): #{{{
     149    # }}}
     150
     151    @staticmethod
     152    def prop_weight(rf):  # {{{
    153153        weight = []
    154154        return weight
    155     #}}}
    156 
    157     @staticmethod
    158     def prop_lower(rf): #{{{
     155    # }}}
     156
     157    @staticmethod
     158    def prop_lower(rf):  # {{{
    159159        lower = []
    160160        return lower
    161     #}}}
    162 
    163     @staticmethod
    164     def prop_upper(rf): #{{{
     161    # }}}
     162
     163    @staticmethod
     164    def prop_upper(rf):  # {{{
    165165        upper = []
    166166        return upper
    167     #}}}
    168 
    169     @staticmethod
    170     def prop_target(rf): #{{{
     167    # }}}
     168
     169    @staticmethod
     170    def prop_target(rf):  # {{{
    171171        target = []
    172172        return target
    173     #}}}
     173    # }}}
    174174
    175175    @staticmethod
     
    191191
    192192    #new methods:
    193     def isscaled(self): #{{{
     193    def isscaled(self):  # {{{
    194194        if strncmpi(self.descriptor, 'scaled_', 7):
    195195            return True
    196196        else:
    197197            return False
    198     #}}}
     198    # }}}
    199199
    200200    @staticmethod
Note: See TracChangeset for help on using the changeset viewer.