cytoflow.utility.custom_traits¶
Custom traits for cytoflow
-
class
cytoflow.utility.custom_traits.
PositiveInt
(default_value=<traits.trait_type._NoDefaultSpecifiedType object>, **metadata)[source]¶ Bases:
traits.trait_types.BaseInt
Defines a trait whose value must be a positive integer
-
info_text
= 'a positive integer'¶
-
-
class
cytoflow.utility.custom_traits.
PositiveCInt
(default_value=<traits.trait_type._NoDefaultSpecifiedType object>, **metadata)[source]¶ Bases:
traits.trait_types.BaseCInt
Defines a trait whose value must be a positive integer
-
info_text
= 'a positive integer'¶
-
-
class
cytoflow.utility.custom_traits.
PositiveFloat
(default_value=<traits.trait_type._NoDefaultSpecifiedType object>, **metadata)[source]¶ Bases:
traits.trait_types.BaseFloat
Defines a trait whose value must be a positive float
-
info_text
= 'a positive float'¶
-
-
class
cytoflow.utility.custom_traits.
PositiveCFloat
(default_value=<traits.trait_type._NoDefaultSpecifiedType object>, **metadata)[source]¶ Bases:
traits.trait_types.BaseCFloat
Defines a trait whose value must be a positive float
-
info_text
= 'a positive float'¶
-
-
class
cytoflow.utility.custom_traits.
FloatOrNone
(default_value=<traits.trait_type._NoDefaultSpecifiedType object>, **metadata)[source]¶ Bases:
traits.trait_types.BaseFloat
-
info_text
= 'a float or None'¶
-
-
class
cytoflow.utility.custom_traits.
CFloatOrNone
(default_value=<traits.trait_type._NoDefaultSpecifiedType object>, **metadata)[source]¶ Bases:
traits.trait_types.BaseCFloat
-
info_text
= 'a float or None'¶
-
-
class
cytoflow.utility.custom_traits.
IntOrNone
(default_value=<traits.trait_type._NoDefaultSpecifiedType object>, **metadata)[source]¶ Bases:
traits.trait_types.BaseInt
-
info_text
= 'an int or None'¶
-
-
class
cytoflow.utility.custom_traits.
CIntOrNone
(default_value=<traits.trait_type._NoDefaultSpecifiedType object>, **metadata)[source]¶ Bases:
traits.trait_types.BaseCInt
-
info_text
= 'an int or None'¶
-
-
class
cytoflow.utility.custom_traits.
ScaleEnum
(*args, **metadata)[source]¶ Bases:
traits.trait_types.BaseEnum
Defines an enumeration that contains one of the registered data scales
-
info_text
= 'an enum containing one of the registered scales'¶
-
get_default_value
()[source]¶ Get information about the default value.
The default implementation analyzes the value of the trait’s
default_value
attribute and determines an appropriatedefault_value_type
for thedefault_value
. If you need to override this method to provide a different result tuple, the following values are valid values fordefault_value_type
:- 0, 1: The
default_value
item of the tuple is the default value. - 2: The object containing the trait is the default value.
- 3: A new copy of the list specified by
default_value
is the default value. - 4: A new copy of the dictionary specified by
default_value
is the default value. - 5: A new instance of TraitListObject constructed using the
default_value
list is the default value. - 6: A new instance of TraitDictObject constructed using the
default_value
dictionary is the default value. - 7:
default_value
is a tuple of the form:(callable, args, kw)
, wherecallable
is a callable,args
is a tuple, andkw
is either a dictionary or None. The default value is the result obtained by invokingcallable(\*args, \*\*kw)
. - 8:
default_value
is a callable. The default value is the result obtained by invokingdefault_value(object)
, whereobject
is the object containing the trait. If the trait has avalidate()
method, thevalidate()
method is also called to validate the result. - 9: A new instance of
TraitSetObject
constructed using thedefault_value
set is the default value.
Returns: default_value_type, default_value – The default value information, consisting of an integer, giving the type of default value, and the corresponding default value as described above. Return type: int, any - 0, 1: The
-
-
class
cytoflow.utility.custom_traits.
Removed
(**metadata)[source]¶ Bases:
traits.trait_type.TraitType
Names a trait that was present in a previous version but was removed.
Trait metadata:
err_string : the error string in the error
gui : if
True
, don’t return a backtrace (because it’s very slow)- warning : if
True
, raise a warning when the trait is referenced. Otherwise, raise an exception.
- warning : if
-
class
cytoflow.utility.custom_traits.
Deprecated
(**metadata)[source]¶ Bases:
traits.trait_type.TraitType
Names a trait that was present in a previous version but was renamed in this version. When the trait is accessed, a warning is raised, and the access is passed through to the new trait.
- Trait metadata:
- new : the name of the new trait
- err_string : the error string in the error
- gui : if
True
, don’t return a backtrace (because it’s very slow)