Skip to content
Snippets Groups Projects
Select Git revision
  • d4bcaa97b55525972c4d043ebb93fab358d9448f
  • master default protected
  • develop-GA
  • timeFstatmap
  • add-higher-spindown-components
  • develop-DK
  • adds-header-to-grid-search
  • v1.2
  • v1.1.2
  • v1.1.0
  • v1.0.1
11 results

glitch_robust_search.py

Blame
  • Forked from Gregory Ashton / PyFstat
    Source project has a limited visibility.
    • Gregory Ashton's avatar
      89f200ed
      Renames sftfilepath -> sftfilepattern · 89f200ed
      Gregory Ashton authored
      This renames the input sftfilepath to sftfilepattern and adds
      documentation on how that should be used, i.e. a colon separated list of
      wildstring or exact matches. In globbing for all matches, the colon
      split is added in. sftfilepath is still used by `Writer` since
      an exact path is known.
      89f200ed
      History
      Renames sftfilepath -> sftfilepattern
      Gregory Ashton authored
      This renames the input sftfilepath to sftfilepattern and adds
      documentation on how that should be used, i.e. a colon separated list of
      wildstring or exact matches. In globbing for all matches, the colon
      split is added in. sftfilepath is still used by `Writer` since
      an exact path is known.
    test_property.py 699 B
    class Param(float):
        def __new__(self,name,value):
            return float.__new__(self,value)
             
        def __init__(self,name,value):
            self.__name = name
            
        name = property(lambda self: self.__name)
        
        
    class Beer(object):
        def __init__(self, temp):
            self.__T = temp
            
        @property
        def temp(self):
            return Param('Beer Temperature', self.__T)
        
        @temp.setter
        def temp(self,value):
            self.__T = float(value) 
            
    
    b = Beer(100)
    
    print b.temp.name, b.temp.__class__
    
    print b.temp * 4.5
    
    print b.temp.name, b.temp.__class__
    
    b.temp = 101
    
    print b.temp.name, b.temp.__class__
    
    print b.temp