core
The core directory includes infrastructural components of the software: file IO, python bindings, basic containers for plain data, the definition of G3Pipeline, etc.
API Documentation
Frame Objects
Serializable objects that may be stored as entries in G3Frame objects.
- class spt3g.core.G3Bool(*args, **kwargs)
Bases:
G3FrameObjectSerializable boolean type
Overloaded function.
__init__(self: spt3g.core.G3Bool, arg0: spt3g.core.G3Bool) -> None
Copy constructor
__init__(self: spt3g.core.G3Bool, arg0: bool) -> None
- property value
- class spt3g.core.G3Double(*args, **kwargs)
Bases:
G3FrameObjectSerializable double
Overloaded function.
__init__(self: spt3g.core.G3Double, arg0: spt3g.core.G3Double) -> None
Copy constructor
__init__(self: spt3g.core.G3Double, arg0: float) -> None
- property value
- class spt3g.core.G3FrameObject
Bases:
Base class for objects that can be added to a frame. All such must inherit from G3FrameObject in C++. Pickle hooks are overridden to use the fast internal serialization
- Description(self: G3FrameObject) str
Long-form human-readable description of the object
- Summary(self: G3FrameObject) str
Short (one-line) description of the object
- property hash
Return the serialized representation of the object
- class spt3g.core.G3Int(*args, **kwargs)
Bases:
G3FrameObjectSerializable integer type
Overloaded function.
__init__(self: spt3g.core.G3Int, arg0: spt3g.core.G3Int) -> None
Copy constructor
__init__(self: spt3g.core.G3Int, arg0: int) -> None
- property value
- class spt3g.core.G3MapDouble(*args, **kwargs)
Bases:
_G3MapDoubleBaseMap,G3FrameObjectMapping from strings to floats
Overloaded function.
__init__(self: spt3g.core.G3MapDouble) -> None
__init__(self: spt3g.core.G3MapDouble, arg0: spt3g.core.G3MapDouble) -> None
Copy constructor
__init__(self: spt3g.core.G3MapDouble, arg0: Iterable) -> None
Iterable constructor
- Description(self: G3MapDouble) str
Long-form human-readable description of the object
- Summary(self: G3MapDouble) str
Short (one-line) description of the object
- clear(self: G3MapDouble) None
Remove all items from the mapping.
- copy(self: G3MapDouble) G3MapDouble
Return a shallow copy of the mapping.
- get(
- self: G3MapDouble,
- key: str,
- default: object = None,
Return the value for key if key is in the mapping, else default.
- items(self: G3MapDouble) ItemsView
Return an object providing a view on the mappings’s items.
- keys(self: G3MapDouble) KeysView
Return an object providing a view on the mappings’s keys.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3MapDouble, key: str) -> float
Remove specified key and return the corresponding value. If the key is not found, raise a KeyError
pop(self: spt3g.core.G3MapDouble, key: str, default: object) -> object
Remove specified key and return the corresponding value. If the key is not found, return the default
- values(self: G3MapDouble) ValuesView
Return an object providing a view on the mappings’s values.
- class spt3g.core.G3MapFrameObject(*args, **kwargs)
Bases:
_G3MapFrameObjectBaseMap,G3FrameObjectMapping strings to generic frame objects. Can lead to a variety of paradoxes; please avoid general use of this class.
Overloaded function.
__init__(self: spt3g.core.G3MapFrameObject) -> None
__init__(self: spt3g.core.G3MapFrameObject, arg0: spt3g.core.G3MapFrameObject) -> None
Copy constructor
__init__(self: spt3g.core.G3MapFrameObject, arg0: Iterable) -> None
Iterable constructor
- Description(self: G3MapFrameObject) str
Long-form human-readable description of the object
- Summary(self: G3MapFrameObject) str
Short (one-line) description of the object
- clear(self: G3MapFrameObject) None
Remove all items from the mapping.
- copy(
- self: G3MapFrameObject,
Return a shallow copy of the mapping.
- get(
- self: G3MapFrameObject,
- key: str,
- default: object = None,
Return the value for key if key is in the mapping, else default.
- items(self: G3MapFrameObject) ItemsView
Return an object providing a view on the mappings’s items.
- keys(self: G3MapFrameObject) KeysView
Return an object providing a view on the mappings’s keys.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3MapFrameObject, key: str) -> spt3g.core.G3FrameObject
Remove specified key and return the corresponding value. If the key is not found, raise a KeyError
pop(self: spt3g.core.G3MapFrameObject, key: str, default: object) -> object
Remove specified key and return the corresponding value. If the key is not found, return the default
- values(self: G3MapFrameObject) ValuesView
Return an object providing a view on the mappings’s values.
- class spt3g.core.G3MapInt(*args, **kwargs)
Bases:
_G3MapIntBaseMap,G3FrameObjectMapping from strings to ints.
Overloaded function.
__init__(self: spt3g.core.G3MapInt) -> None
__init__(self: spt3g.core.G3MapInt, arg0: spt3g.core.G3MapInt) -> None
Copy constructor
__init__(self: spt3g.core.G3MapInt, arg0: Iterable) -> None
Iterable constructor
- get(self: G3MapInt, key: str, default: object = None) object
Return the value for key if key is in the mapping, else default.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3MapInt, key: str) -> int
Remove specified key and return the corresponding value. If the key is not found, raise a KeyError
pop(self: spt3g.core.G3MapInt, key: str, default: object) -> object
Remove specified key and return the corresponding value. If the key is not found, return the default
- values(self: G3MapInt) ValuesView
Return an object providing a view on the mappings’s values.
- class spt3g.core.G3MapMapDouble(*args, **kwargs)
Bases:
_G3MapMapDoubleBaseMap,G3FrameObjectMapping from strings to maps of strings to floats. For example, m[‘Det1’][‘Det2’] = 5.3
Overloaded function.
__init__(self: spt3g.core.G3MapMapDouble) -> None
__init__(self: spt3g.core.G3MapMapDouble, arg0: spt3g.core.G3MapMapDouble) -> None
Copy constructor
__init__(self: spt3g.core.G3MapMapDouble, arg0: Iterable) -> None
Iterable constructor
- Description(self: G3MapMapDouble) str
Long-form human-readable description of the object
- Summary(self: G3MapMapDouble) str
Short (one-line) description of the object
- clear(self: G3MapMapDouble) None
Remove all items from the mapping.
- copy(self: G3MapMapDouble) G3MapMapDouble
Return a shallow copy of the mapping.
- get(
- self: G3MapMapDouble,
- key: str,
- default: object = None,
Return the value for key if key is in the mapping, else default.
- items(self: G3MapMapDouble) ItemsView
Return an object providing a view on the mappings’s items.
- keys(self: G3MapMapDouble) KeysView
Return an object providing a view on the mappings’s keys.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3MapMapDouble, key: str) -> spt3g.core.G3MapDouble
Remove specified key and return the corresponding value. If the key is not found, raise a KeyError
pop(self: spt3g.core.G3MapMapDouble, key: str, default: object) -> object
Remove specified key and return the corresponding value. If the key is not found, return the default
- values(self: G3MapMapDouble) ValuesView
Return an object providing a view on the mappings’s values.
- class spt3g.core.G3MapQuat(*args, **kwargs)
Bases:
_G3MapQuatBaseMap,G3FrameObjectMapping from strings to quaternions.
Overloaded function.
__init__(self: spt3g.core.G3MapQuat) -> None
__init__(self: spt3g.core.G3MapQuat, arg0: spt3g.core.G3MapQuat) -> None
Copy constructor
__init__(self: spt3g.core.G3MapQuat, arg0: Iterable) -> None
Iterable constructor
- get(self: G3MapQuat, key: str, default: object = None) object
Return the value for key if key is in the mapping, else default.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3MapQuat, key: str) -> spt3g.core.Quat
Remove specified key and return the corresponding value. If the key is not found, raise a KeyError
pop(self: spt3g.core.G3MapQuat, key: str, default: object) -> object
Remove specified key and return the corresponding value. If the key is not found, return the default
- values(self: G3MapQuat) ValuesView
Return an object providing a view on the mappings’s values.
- class spt3g.core.G3MapString(*args, **kwargs)
Bases:
_G3MapStringBaseMap,G3FrameObjectMapping from strings to strings.
Overloaded function.
__init__(self: spt3g.core.G3MapString) -> None
__init__(self: spt3g.core.G3MapString, arg0: spt3g.core.G3MapString) -> None
Copy constructor
__init__(self: spt3g.core.G3MapString, arg0: Iterable) -> None
Iterable constructor
- Description(self: G3MapString) str
Long-form human-readable description of the object
- Summary(self: G3MapString) str
Short (one-line) description of the object
- clear(self: G3MapString) None
Remove all items from the mapping.
- copy(self: G3MapString) G3MapString
Return a shallow copy of the mapping.
- get(
- self: G3MapString,
- key: str,
- default: object = None,
Return the value for key if key is in the mapping, else default.
- items(self: G3MapString) ItemsView
Return an object providing a view on the mappings’s items.
- keys(self: G3MapString) KeysView
Return an object providing a view on the mappings’s keys.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3MapString, key: str) -> str
Remove specified key and return the corresponding value. If the key is not found, raise a KeyError
pop(self: spt3g.core.G3MapString, key: str, default: object) -> object
Remove specified key and return the corresponding value. If the key is not found, return the default
- values(self: G3MapString) ValuesView
Return an object providing a view on the mappings’s values.
- class spt3g.core.G3MapTime(*args, **kwargs)
Bases:
_G3MapTimeBaseMap,G3FrameObjectMapping from strings to G3Times.
Overloaded function.
__init__(self: spt3g.core.G3MapTime) -> None
__init__(self: spt3g.core.G3MapTime, arg0: spt3g.core.G3MapTime) -> None
Copy constructor
__init__(self: spt3g.core.G3MapTime, arg0: Iterable) -> None
Iterable constructor
- get(self: G3MapTime, key: str, default: object = None) object
Return the value for key if key is in the mapping, else default.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3MapTime, key: str) -> spt3g.core.G3Time
Remove specified key and return the corresponding value. If the key is not found, raise a KeyError
pop(self: spt3g.core.G3MapTime, key: str, default: object) -> object
Remove specified key and return the corresponding value. If the key is not found, return the default
- values(self: G3MapTime) ValuesView
Return an object providing a view on the mappings’s values.
- class spt3g.core.G3MapVectorBool(*args, **kwargs)
Bases:
_G3MapVectorBoolBaseMap,G3FrameObjectMapping from strings to arrays of booleans.
Overloaded function.
__init__(self: spt3g.core.G3MapVectorBool) -> None
__init__(self: spt3g.core.G3MapVectorBool, arg0: spt3g.core.G3MapVectorBool) -> None
Copy constructor
__init__(self: spt3g.core.G3MapVectorBool, arg0: Iterable) -> None
Iterable constructor
- Description(self: G3MapVectorBool) str
Long-form human-readable description of the object
- Summary(self: G3MapVectorBool) str
Short (one-line) description of the object
- clear(self: G3MapVectorBool) None
Remove all items from the mapping.
- copy(self: G3MapVectorBool) G3MapVectorBool
Return a shallow copy of the mapping.
- get(
- self: G3MapVectorBool,
- key: str,
- default: object = None,
Return the value for key if key is in the mapping, else default.
- items(self: G3MapVectorBool) ItemsView
Return an object providing a view on the mappings’s items.
- keys(self: G3MapVectorBool) KeysView
Return an object providing a view on the mappings’s keys.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3MapVectorBool, key: str) -> spt3g.core.BoolVector
Remove specified key and return the corresponding value. If the key is not found, raise a KeyError
pop(self: spt3g.core.G3MapVectorBool, key: str, default: object) -> object
Remove specified key and return the corresponding value. If the key is not found, return the default
- values(self: G3MapVectorBool) ValuesView
Return an object providing a view on the mappings’s values.
- class spt3g.core.G3MapVectorComplexDouble(*args, **kwargs)
Bases:
_G3MapVectorComplexDoubleBaseMap,G3FrameObjectMapping from strings to arrays of complex numbers.
Overloaded function.
__init__(self: spt3g.core.G3MapVectorComplexDouble) -> None
__init__(self: spt3g.core.G3MapVectorComplexDouble, arg0: spt3g.core.G3MapVectorComplexDouble) -> None
Copy constructor
__init__(self: spt3g.core.G3MapVectorComplexDouble, arg0: Iterable) -> None
Iterable constructor
- Description(
- self: G3MapVectorComplexDouble,
Long-form human-readable description of the object
- Summary(self: G3MapVectorComplexDouble) str
Short (one-line) description of the object
- clear(self: G3MapVectorComplexDouble) None
Remove all items from the mapping.
- copy(
- self: G3MapVectorComplexDouble,
Return a shallow copy of the mapping.
- get(
- self: G3MapVectorComplexDouble,
- key: str,
- default: object = None,
Return the value for key if key is in the mapping, else default.
- items(
- self: G3MapVectorComplexDouble,
Return an object providing a view on the mappings’s items.
- keys(
- self: G3MapVectorComplexDouble,
Return an object providing a view on the mappings’s keys.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3MapVectorComplexDouble, key: str) -> spt3g.core.ComplexDoubleVector
Remove specified key and return the corresponding value. If the key is not found, raise a KeyError
pop(self: spt3g.core.G3MapVectorComplexDouble, key: str, default: object) -> object
Remove specified key and return the corresponding value. If the key is not found, return the default
- values(
- self: G3MapVectorComplexDouble,
Return an object providing a view on the mappings’s values.
- class spt3g.core.G3MapVectorDouble(*args, **kwargs)
Bases:
_G3MapVectorDoubleBaseMap,G3FrameObjectMapping from strings to arrays of floats.
Overloaded function.
__init__(self: spt3g.core.G3MapVectorDouble) -> None
__init__(self: spt3g.core.G3MapVectorDouble, arg0: spt3g.core.G3MapVectorDouble) -> None
Copy constructor
__init__(self: spt3g.core.G3MapVectorDouble, arg0: Iterable) -> None
Iterable constructor
- Description(self: G3MapVectorDouble) str
Long-form human-readable description of the object
- Summary(self: G3MapVectorDouble) str
Short (one-line) description of the object
- clear(self: G3MapVectorDouble) None
Remove all items from the mapping.
- copy(
- self: G3MapVectorDouble,
Return a shallow copy of the mapping.
- get(
- self: G3MapVectorDouble,
- key: str,
- default: object = None,
Return the value for key if key is in the mapping, else default.
- items(self: G3MapVectorDouble) ItemsView
Return an object providing a view on the mappings’s items.
- keys(self: G3MapVectorDouble) KeysView
Return an object providing a view on the mappings’s keys.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3MapVectorDouble, key: str) -> spt3g.core.DoubleVector
Remove specified key and return the corresponding value. If the key is not found, raise a KeyError
pop(self: spt3g.core.G3MapVectorDouble, key: str, default: object) -> object
Remove specified key and return the corresponding value. If the key is not found, return the default
- values(self: G3MapVectorDouble) ValuesView
Return an object providing a view on the mappings’s values.
- class spt3g.core.G3MapVectorInt(*args, **kwargs)
Bases:
_G3MapVectorIntBaseMap,G3FrameObjectMapping from strings to arrays of integers.
Overloaded function.
__init__(self: spt3g.core.G3MapVectorInt) -> None
__init__(self: spt3g.core.G3MapVectorInt, arg0: spt3g.core.G3MapVectorInt) -> None
Copy constructor
__init__(self: spt3g.core.G3MapVectorInt, arg0: Iterable) -> None
Iterable constructor
- Description(self: G3MapVectorInt) str
Long-form human-readable description of the object
- Summary(self: G3MapVectorInt) str
Short (one-line) description of the object
- clear(self: G3MapVectorInt) None
Remove all items from the mapping.
- copy(self: G3MapVectorInt) G3MapVectorInt
Return a shallow copy of the mapping.
- get(
- self: G3MapVectorInt,
- key: str,
- default: object = None,
Return the value for key if key is in the mapping, else default.
- items(self: G3MapVectorInt) ItemsView
Return an object providing a view on the mappings’s items.
- keys(self: G3MapVectorInt) KeysView
Return an object providing a view on the mappings’s keys.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3MapVectorInt, key: str) -> spt3g.core.Int64Vector
Remove specified key and return the corresponding value. If the key is not found, raise a KeyError
pop(self: spt3g.core.G3MapVectorInt, key: str, default: object) -> object
Remove specified key and return the corresponding value. If the key is not found, return the default
- values(self: G3MapVectorInt) ValuesView
Return an object providing a view on the mappings’s values.
- class spt3g.core.G3MapVectorQuat(*args, **kwargs)
Bases:
_G3MapVectorQuatBaseMap,G3FrameObjectMapping from strings to lists of quaternions.
Overloaded function.
__init__(self: spt3g.core.G3MapVectorQuat) -> None
__init__(self: spt3g.core.G3MapVectorQuat, arg0: spt3g.core.G3MapVectorQuat) -> None
Copy constructor
__init__(self: spt3g.core.G3MapVectorQuat, arg0: Iterable) -> None
Iterable constructor
- Description(self: G3MapVectorQuat) str
Long-form human-readable description of the object
- Summary(self: G3MapVectorQuat) str
Short (one-line) description of the object
- clear(self: G3MapVectorQuat) None
Remove all items from the mapping.
- copy(self: G3MapVectorQuat) G3MapVectorQuat
Return a shallow copy of the mapping.
- get(
- self: G3MapVectorQuat,
- key: str,
- default: object = None,
Return the value for key if key is in the mapping, else default.
- items(self: G3MapVectorQuat) ItemsView
Return an object providing a view on the mappings’s items.
- keys(self: G3MapVectorQuat) KeysView
Return an object providing a view on the mappings’s keys.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3MapVectorQuat, key: str) -> spt3g.core.G3VectorQuat
Remove specified key and return the corresponding value. If the key is not found, raise a KeyError
pop(self: spt3g.core.G3MapVectorQuat, key: str, default: object) -> object
Remove specified key and return the corresponding value. If the key is not found, return the default
- values(self: G3MapVectorQuat) ValuesView
Return an object providing a view on the mappings’s values.
- class spt3g.core.G3MapVectorString(*args, **kwargs)
Bases:
_G3MapVectorStringBaseMap,G3FrameObjectMapping from strings to lists of strings.
Overloaded function.
__init__(self: spt3g.core.G3MapVectorString) -> None
__init__(self: spt3g.core.G3MapVectorString, arg0: spt3g.core.G3MapVectorString) -> None
Copy constructor
__init__(self: spt3g.core.G3MapVectorString, arg0: Iterable) -> None
Iterable constructor
- Description(self: G3MapVectorString) str
Long-form human-readable description of the object
- Summary(self: G3MapVectorString) str
Short (one-line) description of the object
- clear(self: G3MapVectorString) None
Remove all items from the mapping.
- copy(
- self: G3MapVectorString,
Return a shallow copy of the mapping.
- get(
- self: G3MapVectorString,
- key: str,
- default: object = None,
Return the value for key if key is in the mapping, else default.
- items(self: G3MapVectorString) ItemsView
Return an object providing a view on the mappings’s items.
- keys(self: G3MapVectorString) KeysView
Return an object providing a view on the mappings’s keys.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3MapVectorString, key: str) -> spt3g.core.StringVector
Remove specified key and return the corresponding value. If the key is not found, raise a KeyError
pop(self: spt3g.core.G3MapVectorString, key: str, default: object) -> object
Remove specified key and return the corresponding value. If the key is not found, return the default
- values(self: G3MapVectorString) ValuesView
Return an object providing a view on the mappings’s values.
- class spt3g.core.G3MapVectorTime(*args, **kwargs)
Bases:
_G3MapVectorTimeBaseMap,G3FrameObjectMapping from strings to lists of G3 time objects.
Overloaded function.
__init__(self: spt3g.core.G3MapVectorTime) -> None
__init__(self: spt3g.core.G3MapVectorTime, arg0: spt3g.core.G3MapVectorTime) -> None
Copy constructor
__init__(self: spt3g.core.G3MapVectorTime, arg0: Iterable) -> None
Iterable constructor
- Description(self: G3MapVectorTime) str
Long-form human-readable description of the object
- Summary(self: G3MapVectorTime) str
Short (one-line) description of the object
- clear(self: G3MapVectorTime) None
Remove all items from the mapping.
- copy(self: G3MapVectorTime) G3MapVectorTime
Return a shallow copy of the mapping.
- get(
- self: G3MapVectorTime,
- key: str,
- default: object = None,
Return the value for key if key is in the mapping, else default.
- items(self: G3MapVectorTime) ItemsView
Return an object providing a view on the mappings’s items.
- keys(self: G3MapVectorTime) KeysView
Return an object providing a view on the mappings’s keys.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3MapVectorTime, key: str) -> spt3g.core.G3VectorTime
Remove specified key and return the corresponding value. If the key is not found, raise a KeyError
pop(self: spt3g.core.G3MapVectorTime, key: str, default: object) -> object
Remove specified key and return the corresponding value. If the key is not found, return the default
- values(self: G3MapVectorTime) ValuesView
Return an object providing a view on the mappings’s values.
- class spt3g.core.G3MapVectorVectorString(*args, **kwargs)
Bases:
_G3MapVectorVectorStringBaseMap,G3FrameObjectMapping from strings to lists of lists of strings.
Overloaded function.
__init__(self: spt3g.core.G3MapVectorVectorString) -> None
__init__(self: spt3g.core.G3MapVectorVectorString, arg0: spt3g.core.G3MapVectorVectorString) -> None
Copy constructor
__init__(self: spt3g.core.G3MapVectorVectorString, arg0: Iterable) -> None
Iterable constructor
- Description(self: G3MapVectorVectorString) str
Long-form human-readable description of the object
- Summary(self: G3MapVectorVectorString) str
Short (one-line) description of the object
- clear(self: G3MapVectorVectorString) None
Remove all items from the mapping.
- copy(
- self: G3MapVectorVectorString,
Return a shallow copy of the mapping.
- get(
- self: G3MapVectorVectorString,
- key: str,
- default: object = None,
Return the value for key if key is in the mapping, else default.
- items(
- self: G3MapVectorVectorString,
Return an object providing a view on the mappings’s items.
- keys(
- self: G3MapVectorVectorString,
Return an object providing a view on the mappings’s keys.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3MapVectorVectorString, key: str) -> spt3g.core.G3VectorVectorString
Remove specified key and return the corresponding value. If the key is not found, raise a KeyError
pop(self: spt3g.core.G3MapVectorVectorString, key: str, default: object) -> object
Remove specified key and return the corresponding value. If the key is not found, return the default
- values(
- self: G3MapVectorVectorString,
Return an object providing a view on the mappings’s values.
- class spt3g.core.G3ModuleConfig(*args, **kwargs)
Bases:
G3FrameObjectStored configuration of a pipeline module or segment
Overloaded function.
__init__(self: spt3g.core.G3ModuleConfig, arg0: spt3g.core.G3ModuleConfig) -> None
Copy constructor
__init__(self: spt3g.core.G3ModuleConfig) -> None
- Description(self: G3ModuleConfig) str
Long-form human-readable description of the object
- Summary(self: G3ModuleConfig) str
Short (one-line) description of the object
- keys(self: G3ModuleConfig) list
- values(self: G3ModuleConfig) list
- property instancename
- property modname
- class spt3g.core.G3PipelineInfo(*args, **kwargs)
Bases:
G3FrameObjectStored configuration of a pipeline, including software version information
Overloaded function.
__init__(self: spt3g.core.G3PipelineInfo, arg0: spt3g.core.G3PipelineInfo) -> None
Copy constructor
__init__(self: spt3g.core.G3PipelineInfo) -> None
- Description(self: G3PipelineInfo) str
Long-form human-readable description of the object
- Summary(self: G3PipelineInfo) str
Short (one-line) description of the object
- property hostname
- property modules
- property user
- property vcs_branch
- property vcs_fullversion
- property vcs_githash
- property vcs_localdiffs
- property vcs_revision
- property vcs_url
- property vcs_versionname
- class spt3g.core.G3Quat(*args, **kwargs)
Bases:
G3FrameObjectSerializable quaternion
Overloaded function.
__init__(self: spt3g.core.G3Quat, arg0: spt3g.core.G3Quat) -> None
Copy constructor
__init__(self: spt3g.core.G3Quat, arg0: spt3g.core.Quat) -> None
- property value
- class spt3g.core.G3String(*args, **kwargs)
Bases:
G3FrameObjectSerializable string
Overloaded function.
__init__(self: spt3g.core.G3String, arg0: spt3g.core.G3String) -> None
Copy constructor
__init__(self: spt3g.core.G3String, arg0: str) -> None
- property value
- class spt3g.core.G3Time(*args, **kwargs)
Bases:
G3FrameObjectUTC Time
Overloaded function.
__init__(self: spt3g.core.G3Time, arg0: spt3g.core.G3Time) -> None
Copy constructor
__init__(self: spt3g.core.G3Time) -> None
__init__(self: spt3g.core.G3Time, y: int, d: int, h: int, m: int, s: int, ss: int) -> None
Create a timestamp object from IRIG B code
__init__(self: spt3g.core.G3Time, arg0: str) -> None
Create a time object from a string representation. Supported formats are: YYYYMMDD_HHMMSS, YYMMDD_HHMMSS, YYMMDD HH:MM:SS, DD-Mon-YYYY:HH:MM:SS, YYYY-MM-DDTHH:MM:SS[+TZ] (ISO 8601). All can have a fraction of second field after a dot.
__init__(self: spt3g.core.G3Time, timestamp: int) -> None
Create a G3Time from an integer timestamp
__init__(self: spt3g.core.G3Time, timestamp: float) -> None
Create a G3Time from a floating point timestamp
- GetFileFormatString(self: G3Time) str
Get a string corresponding to how SPTpol and GCP name files for this time
- property mjd
Time in MJD
- property time
Time relative to the UNIX epoch
- class spt3g.core.G3TimesampleMap(*args, **kwargs)
Bases:
_G3MapFrameObjectBaseMap,G3FrameObjectMapping from string to vectors of data, with an associated vector of timestamps. This object is for storing multiple co-sampled vectors with a single set of (irregular) timestamps.
Overloaded function.
__init__(self: spt3g.core.G3TimesampleMap) -> None
__init__(self: spt3g.core.G3TimesampleMap, arg0: spt3g.core.G3TimesampleMap) -> None
Copy constructor
__init__(self: spt3g.core.G3TimesampleMap, arg0: Iterable) -> None
Iterable constructor
- Description(self: G3TimesampleMap) str
Long-form human-readable description of the object
- Summary(self: G3TimesampleMap) str
Short (one-line) description of the object
- check(self: G3TimesampleMap) bool
Check for internal consistency. Raises ValueError if there are problems.
- clear(self: G3TimesampleMap) None
Remove all items from the mapping.
- concatenate(
- self: G3TimesampleMap,
- arg0: G3TimesampleMap,
Concatenate two compatible G3TimesampleMap.
- copy(self: G3TimesampleMap) G3TimesampleMap
Return a shallow copy of the mapping.
- get(
- self: G3TimesampleMap,
- key: str,
- default: object = None,
Return the value for key if key is in the mapping, else default.
- items(self: G3TimesampleMap) ItemsView
Return an object providing a view on the mappings’s items.
- keys(self: G3TimesampleMap) KeysView
Return an object providing a view on the mappings’s keys.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3TimesampleMap, key: str) -> spt3g.core.G3FrameObject
Remove specified key and return the corresponding value. If the key is not found, raise a KeyError
pop(self: spt3g.core.G3TimesampleMap, key: str, default: object) -> object
Remove specified key and return the corresponding value. If the key is not found, return the default
- sort(self: G3TimesampleMap) None
Sort all element vectors by time, in-place.
- values(self: G3TimesampleMap) ValuesView
Return an object providing a view on the mappings’s values.
- property times
Times vector. Setting this stores a copy, but getting returns a reference.
- class spt3g.core.G3Timestream(*args, **kwargs)
Bases:
G3FrameObjectDetector timestream. Includes a units field and start and stop times. Can otherwise be treated as a numpy array with a float64 dtype. Conversions to and from such arrays (e.g. with numpy.asarray) are fast. Note that a numpy array constructed from a timestream will share a memory buffer: changes to the array affect the timestream and vice versa. Most binary timestream arithmetic operations (+, -) check that the units and start/stop times are congruent.
Overloaded function.
__init__(self: spt3g.core.G3Timestream, arg0: spt3g.core.G3Timestream) -> None
Copy constructor
__init__(self: spt3g.core.G3Timestream) -> None
__init__(self: spt3g.core.G3Timestream, data: Buffer, units: spt3g.core.G3TimestreamUnits = None) -> None
Create a timestream from a numpy array
__init__(self: spt3g.core.G3Timestream, data: Iterable, units: spt3g.core.G3TimestreamUnits = None) -> None
Create a timestream from a numeric python iterable
- classmethod concatenate(ts_lst, ts_rounding_error=0.6, ts_interp_threshold=0)
Concatenate G3Timestream objects together.
- Parameters:
ts_lst (list) – list of G3Timestream objects.
ts_rounding_error (float) – allowed error in timestream separation such that timestreams are contiguous, as a fraction of the sample rate. This should be 0 by default, but is 0.5 to allow for downsampler shifting, and then bumpted again to 0.6 to allow for floating-point errors in what 0.5 is.
ts_interp_threshold (float) – allowed timestream separation below which gaps between timestreams are interpolated to be made continuous
- Returns:
ts – The concatenation of the input list of G3Timestream objects
- Return type:
G3Timestream instance
- Description(self: G3Timestream) str
Long-form human-readable description of the object
- SetFLACBitDepth(self: G3Timestream, arg0: int) None
Change the bit depth for FLAC compression, may be 24 or 32 (default, requires version 1.4+).
- SetFLACCompression(self: G3Timestream, arg0: int) None
Pass True to turn on FLAC compression when serialized. FLAC compression only works if the timestream is in units of counts.
- Summary(self: G3Timestream) str
Short (one-line) description of the object
- all(axis=None, out=None, *, keepdims=<no value>, where=<no value>)
Returns True if all elements evaluate to True.
Refer to numpy.all for full documentation.
See also
numpy.allequivalent function
- any(axis=None, out=None, *, keepdims=<no value>, where=<no value>)
Returns True if any of the elements of a evaluate to True.
Refer to numpy.any for full documentation.
See also
numpy.anyequivalent function
- argmax(axis=None, out=None, *, keepdims=False)
Return indices of the maximum values along the given axis.
Refer to numpy.argmax for full documentation.
See also
numpy.argmaxequivalent function
- argmin(axis=None, out=None, *, keepdims=False)
Return indices of the minimum values along the given axis.
Refer to numpy.argmin for detailed documentation.
See also
numpy.argminequivalent function
- astype(dtype)
Convert timestream to a different data type. See numpy.array.astype()
- max(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the maximum along a given axis.
Refer to numpy.amax for full documentation.
See also
numpy.amaxequivalent function
- mean(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- where=<no value>,
Returns the average of the array elements along given axis.
Refer to numpy.mean for full documentation.
See also
numpy.meanequivalent function
- min(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the minimum along a given axis.
Refer to numpy.amin for full documentation.
See also
numpy.aminequivalent function
- std(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the standard deviation of the array elements along given axis.
Refer to numpy.std for full documentation.
See also
numpy.stdequivalent function
- sum(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the sum of the array elements over the given axis.
Refer to numpy.sum for full documentation.
See also
numpy.sumequivalent function
- var(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the variance of the array elements, along given axis.
Refer to numpy.var for full documentation.
See also
numpy.varequivalent function
- property bit_depth
Bit depth of FLAC compression used for this timestream.
- property compression_level
Level of FLAC compression used for this timestream. This can only be non-zero if the timestream is in units of counts.
- property dtype
Numpy data type of stored data.
- property elapsed
Compute elapsed time array for samples
- property n_samples
Number of samples in the timestream. Equivalent to len(ts)
- property ndim
Numpy-compatible number of dimensions
- property sample_rate
Computed sample rate of the timestream.
- property shape
Numpy-compatible shape of this timestream
- property start
Time of the first sample in the time stream
- property stop
Time of the final sample in the timestream
- property times
Compute time vector for samples
- property units
Units of the data in the timestream, stored as one of the members of core.G3TimestreamUnits.
- class spt3g.core.G3TimestreamMap(*args, **kwargs)
Bases:
G3FrameObjectCollection of timestreams indexed by logical detector ID
Overloaded function.
__init__(self: spt3g.core.G3TimestreamMap) -> None
__init__(self: spt3g.core.G3TimestreamMap, arg0: spt3g.core.G3TimestreamMap) -> None
Copy constructor
__init__(self: spt3g.core.G3TimestreamMap, arg0: Iterable) -> None
Iterable constructor
__init__(self: spt3g.core.G3TimestreamMap, keys: Iterable, data: Buffer, start: spt3g.core.G3Time = spt3g.core.G3Time(0), stop: spt3g.core.G3Time = spt3g.core.G3Time(0), units: spt3g.core.G3TimestreamUnits = None, compression_level: int = 0, copy_data: bool = True, bit_depth: int = 32) -> None
Create a timestream map from a numpy array. Each row of the 2D input array will correspond to a single timestream, with the key set to the correspondingly-indexed entry of <keys>. If <copy_data> is True (default), the data will be copied into the output data structure. If False, the timestream map will provide a view into the given numpy array.
__init__(self: spt3g.core.G3TimestreamMap, keys: Iterable, data: Iterable, start: spt3g.core.G3Time = spt3g.core.G3Time(0), stop: spt3g.core.G3Time = spt3g.core.G3Time(0), units: spt3g.core.G3TimestreamUnits = None, compression_level: int = 0, bit_depth: int = 32) -> None
Create a timestream map from a numeric python iterable. Each row of the 2D input array will correspond to a single timestream, with the key set to the correspondingly-indexed entry of <keys>.
- classmethod concatenate(
- ts_map_lst,
- ts_rounding_error=0.6,
- ts_interp_threshold=0,
- skip_missing=False,
Concatenate G3TimestreamMap objects together.
- Parameters:
ts_map_lst (list) – list of G3TimestreamMap objects.
ts_rounding_error (float) – allowed error in timestream separation such that timestreams are contiguous, as a fraction of the sample rate. This should be 0 by default, but is 0.5 to allow for downsampler shifting, and then bumpted again to 0.6 to allow for floating-point errors in what 0.5 is.
ts_interp_threshold (float) – allowed timestream separation below which gaps between timestreams are interpolated to be made continuous
skip_missing (bool) – If True, include only the channels that are present in all of the input G3TimestreamMap object. Otherwise, raises an error if any map does not have the same keys.
- Returns:
tsm – The concatenation of the input list of G3TimestreamMap objects
- Return type:
G3TimestreamMap instance
- CheckAlignment(self: G3TimestreamMap) bool
- Compactify(self: G3TimestreamMap) None
If member timestreams are stored non-contiguously, repack all data into a contiguous block. Requires timestreams be aligned and the same data type. Done implicitly by numpy.asarray().
- SetFLACBitDepth(self: G3TimestreamMap, arg0: int) None
Change the bit depth for FLAC compression, may be 24 or 32 (default, requires version 1.4+).
- SetFLACCompression(
- self: G3TimestreamMap,
- arg0: int,
Pass True to turn on FLAC compression when serialized. FLAC compression only works if the timestreams are in units of counts.
- astype(dtype)
Convert timestream map to a different data type. See numpy.array.astype()
- clear(self: G3TimestreamMap) None
Remove all items from the mapping.
- copy(self: G3TimestreamMap) G3TimestreamMap
Return a shallow copy of the mapping.
- get(
- self: G3TimestreamMap,
- key: str,
- default: object = None,
Return the value for key if key is in the mapping, else default.
- items(self: G3TimestreamMap) ItemsView
Return an object providing a view on the mappings’s items.
- keys(self: G3TimestreamMap) KeysView
Return an object providing a view on the mappings’s keys.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3TimestreamMap, key: str) -> spt3g.core.G3Timestream
Remove specified key and return the corresponding value. If the key is not found, raise a KeyError
pop(self: spt3g.core.G3TimestreamMap, key: str, default: object) -> object
Remove specified key and return the corresponding value. If the key is not found, return the default
- std(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the standard deviation of the array elements along given axis.
Refer to numpy.std for full documentation.
See also
numpy.stdequivalent function
- values(self: G3TimestreamMap) ValuesView
Return an object providing a view on the mappings’s values.
- var(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the variance of the array elements, along given axis.
Refer to numpy.var for full documentation.
See also
numpy.varequivalent function
- property bit_depth
Bit depth of FLAC compression used for this timestream map.
- property compression_level
Level of FLAC compression used for this timestream map. This can only be non-zero if the timestream is in units of counts.
- property data
Return a numpy array view into the underlying 2D array of the timestream map
- property dtype
Numpy data type of stored data.
- property elapsed
Compute elapsed time array for samples
- property n_samples
Number of samples in the timestream. Equivalent to the length of one of the timestreams.
- property names
Get timestream map channel names.
- property sample_rate
Computed sample rate of the timestream.
- property start
Time of the first sample in the time stream
- property stop
Time of the final sample in the time stream
- property times
Compute time vector for samples
- property units
Units of the data in the timestream, stored as one of the members of core.G3TimestreamUnits.
- class spt3g.core.G3TimestreamQuat(*args, **kwargs)
Bases:
G3VectorQuat,QuatVector,G3FrameObjectTimestream of quaternions. Identical to a G3VectorQuat except for the addition of start and stop times.
Overloaded function.
__init__(self: spt3g.core.G3TimestreamQuat, arg0: Buffer) -> None
Constructor from numpy array
__init__(self: spt3g.core.G3TimestreamQuat) -> None
__init__(self: spt3g.core.G3TimestreamQuat, arg0: spt3g.core.G3TimestreamQuat) -> None
Copy constructor
__init__(self: spt3g.core.G3TimestreamQuat, arg0: Iterable) -> None
- Description(self: G3TimestreamQuat) str
Long-form human-readable description of the object
- Summary(self: G3TimestreamQuat) str
Short (one-line) description of the object
- abs(self: G3TimestreamQuat) G3Timestream
Return the Euclidean norm of each quaternion
- append(
- self: G3TimestreamQuat,
- x: Quat,
Add an item to the end of the list
- clear(self: G3TimestreamQuat) None
Clear the contents
- count(self: G3TimestreamQuat, x: Quat) int
Return the number of times
xappears in the list
- cross3(
- self: G3TimestreamQuat,
- arg0: Quat,
Cross product of last three entries of each quaternion with the input
- dot3(
- self: G3TimestreamQuat,
- arg0: Quat,
Dot product of last three entries of each quaternion with the input
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.G3TimestreamQuat, L: spt3g.core.G3TimestreamQuat) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.G3TimestreamQuat, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(
- self: G3TimestreamQuat,
- i: int,
- x: Quat,
Insert an item at a given position.
- norm(self: G3TimestreamQuat) G3Timestream
Return the Cayley norm of each quaternion
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3TimestreamQuat) -> spt3g.core.Quat
Remove and return the last item
pop(self: spt3g.core.G3TimestreamQuat, i: int) -> spt3g.core.Quat
Remove and return the item at index
i
- remove(
- self: G3TimestreamQuat,
- x: Quat,
Remove the first item from the list whose value is x. It is an error if there is no such item.
- vnorm(self: G3TimestreamQuat) G3Timestream
Return the Cayley norm of the unreal (vector) part of each quaternion
- property n_samples
Number of samples in the timestream. Equivalent to len(ts)
- property real
Return the real (scalar) part of each quaternion
- property sample_rate
Computed sample rate of the timestream.
- property start
Time of the first sample in the time stream
- property stop
Time of the final sample in the timestream
- class spt3g.core.G3VectorBool(*args, **kwargs)
Bases:
BoolVector,G3FrameObjectList of booleans.
Overloaded function.
__init__(self: spt3g.core.G3VectorBool) -> None
__init__(self: spt3g.core.G3VectorBool, arg0: spt3g.core.G3VectorBool) -> None
Copy constructor
__init__(self: spt3g.core.G3VectorBool, arg0: Iterable) -> None
- Description(self: G3VectorBool) str
Long-form human-readable description of the object
- Summary(self: G3VectorBool) str
Short (one-line) description of the object
- all(axis=None, out=None, *, keepdims=<no value>, where=<no value>)
Returns True if all elements evaluate to True.
Refer to numpy.all for full documentation.
See also
numpy.allequivalent function
- any(axis=None, out=None, *, keepdims=<no value>, where=<no value>)
Returns True if any of the elements of a evaluate to True.
Refer to numpy.any for full documentation.
See also
numpy.anyequivalent function
- append(self: G3VectorBool, x: bool) None
Add an item to the end of the list
- argmax(axis=None, out=None, *, keepdims=False)
Return indices of the maximum values along the given axis.
Refer to numpy.argmax for full documentation.
See also
numpy.argmaxequivalent function
- argmin(axis=None, out=None, *, keepdims=False)
Return indices of the minimum values along the given axis.
Refer to numpy.argmin for detailed documentation.
See also
numpy.argminequivalent function
- clear(self: G3VectorBool) None
Clear the contents
- count(self: G3VectorBool, x: bool) int
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.G3VectorBool, L: spt3g.core.G3VectorBool) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.G3VectorBool, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(self: G3VectorBool, i: int, x: bool) None
Insert an item at a given position.
- max(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the maximum along a given axis.
Refer to numpy.amax for full documentation.
See also
numpy.amaxequivalent function
- mean(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- where=<no value>,
Returns the average of the array elements along given axis.
Refer to numpy.mean for full documentation.
See also
numpy.meanequivalent function
- min(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the minimum along a given axis.
Refer to numpy.amin for full documentation.
See also
numpy.aminequivalent function
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3VectorBool) -> bool
Remove and return the last item
pop(self: spt3g.core.G3VectorBool, i: int) -> bool
Remove and return the item at index
i
- remove(self: G3VectorBool, x: bool) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- std(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the standard deviation of the array elements along given axis.
Refer to numpy.std for full documentation.
See also
numpy.stdequivalent function
- sum(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the sum of the array elements over the given axis.
Refer to numpy.sum for full documentation.
See also
numpy.sumequivalent function
- var(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the variance of the array elements, along given axis.
Refer to numpy.var for full documentation.
See also
numpy.varequivalent function
- class spt3g.core.G3VectorComplexDouble(*args, **kwargs)
Bases:
ComplexDoubleVector,G3FrameObjectArray of complex floats. Treat as a serializable version of numpy.array(dtype=complex128). Can be efficiently cast to and from numpy arrays.
Overloaded function.
__init__(self: spt3g.core.G3VectorComplexDouble, arg0: numpy.ndarray) -> None
Constructor from numpy array
__init__(self: spt3g.core.G3VectorComplexDouble) -> None
__init__(self: spt3g.core.G3VectorComplexDouble, arg0: spt3g.core.G3VectorComplexDouble) -> None
Copy constructor
__init__(self: spt3g.core.G3VectorComplexDouble, arg0: Iterable) -> None
- Description(self: G3VectorComplexDouble) str
Long-form human-readable description of the object
- Summary(self: G3VectorComplexDouble) str
Short (one-line) description of the object
- all(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- where=<no value>,
Returns True if all elements evaluate to True.
Refer to numpy.all for full documentation.
See also
numpy.allequivalent function
- any(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- where=<no value>,
Returns True if any of the elements of a evaluate to True.
Refer to numpy.any for full documentation.
See also
numpy.anyequivalent function
- append(
- self: G3VectorComplexDouble,
- x: complex,
Add an item to the end of the list
- argmax(axis=None, out=None, *, keepdims=False)
Return indices of the maximum values along the given axis.
Refer to numpy.argmax for full documentation.
See also
numpy.argmaxequivalent function
- argmin(axis=None, out=None, *, keepdims=False)
Return indices of the minimum values along the given axis.
Refer to numpy.argmin for detailed documentation.
See also
numpy.argminequivalent function
- clear(self: G3VectorComplexDouble) None
Clear the contents
- count(
- self: G3VectorComplexDouble,
- x: complex,
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.G3VectorComplexDouble, L: spt3g.core.G3VectorComplexDouble) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.G3VectorComplexDouble, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(
- self: G3VectorComplexDouble,
- i: int,
- x: complex,
Insert an item at a given position.
- max(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the maximum along a given axis.
Refer to numpy.amax for full documentation.
See also
numpy.amaxequivalent function
- mean(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- where=<no value>,
Returns the average of the array elements along given axis.
Refer to numpy.mean for full documentation.
See also
numpy.meanequivalent function
- min(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the minimum along a given axis.
Refer to numpy.amin for full documentation.
See also
numpy.aminequivalent function
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3VectorComplexDouble) -> complex
Remove and return the last item
pop(self: spt3g.core.G3VectorComplexDouble, i: int) -> complex
Remove and return the item at index
i
- remove(
- self: G3VectorComplexDouble,
- x: complex,
Remove the first item from the list whose value is x. It is an error if there is no such item.
- std(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the standard deviation of the array elements along given axis.
Refer to numpy.std for full documentation.
See also
numpy.stdequivalent function
- sum(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the sum of the array elements over the given axis.
Refer to numpy.sum for full documentation.
See also
numpy.sumequivalent function
- var(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the variance of the array elements, along given axis.
Refer to numpy.var for full documentation.
See also
numpy.varequivalent function
- class spt3g.core.G3VectorDouble(*args, **kwargs)
Bases:
DoubleVector,G3FrameObjectArray of floats. Treat as a serializable version of numpy.array(dtype=float64). Can be efficiently cast to and from numpy arrays.
Overloaded function.
__init__(self: spt3g.core.G3VectorDouble, arg0: numpy.ndarray) -> None
Constructor from numpy array
__init__(self: spt3g.core.G3VectorDouble) -> None
__init__(self: spt3g.core.G3VectorDouble, arg0: spt3g.core.G3VectorDouble) -> None
Copy constructor
__init__(self: spt3g.core.G3VectorDouble, arg0: Iterable) -> None
- Description(self: G3VectorDouble) str
Long-form human-readable description of the object
- Summary(self: G3VectorDouble) str
Short (one-line) description of the object
- all(axis=None, out=None, *, keepdims=<no value>, where=<no value>)
Returns True if all elements evaluate to True.
Refer to numpy.all for full documentation.
See also
numpy.allequivalent function
- any(axis=None, out=None, *, keepdims=<no value>, where=<no value>)
Returns True if any of the elements of a evaluate to True.
Refer to numpy.any for full documentation.
See also
numpy.anyequivalent function
- append(self: G3VectorDouble, x: float) None
Add an item to the end of the list
- argmax(axis=None, out=None, *, keepdims=False)
Return indices of the maximum values along the given axis.
Refer to numpy.argmax for full documentation.
See also
numpy.argmaxequivalent function
- argmin(axis=None, out=None, *, keepdims=False)
Return indices of the minimum values along the given axis.
Refer to numpy.argmin for detailed documentation.
See also
numpy.argminequivalent function
- clear(self: G3VectorDouble) None
Clear the contents
- count(self: G3VectorDouble, x: float) int
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.G3VectorDouble, L: spt3g.core.G3VectorDouble) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.G3VectorDouble, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(self: G3VectorDouble, i: int, x: float) None
Insert an item at a given position.
- max(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the maximum along a given axis.
Refer to numpy.amax for full documentation.
See also
numpy.amaxequivalent function
- mean(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- where=<no value>,
Returns the average of the array elements along given axis.
Refer to numpy.mean for full documentation.
See also
numpy.meanequivalent function
- min(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the minimum along a given axis.
Refer to numpy.amin for full documentation.
See also
numpy.aminequivalent function
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3VectorDouble) -> float
Remove and return the last item
pop(self: spt3g.core.G3VectorDouble, i: int) -> float
Remove and return the item at index
i
- remove(self: G3VectorDouble, x: float) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- std(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the standard deviation of the array elements along given axis.
Refer to numpy.std for full documentation.
See also
numpy.stdequivalent function
- sum(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the sum of the array elements over the given axis.
Refer to numpy.sum for full documentation.
See also
numpy.sumequivalent function
- var(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the variance of the array elements, along given axis.
Refer to numpy.var for full documentation.
See also
numpy.varequivalent function
- class spt3g.core.G3VectorFrameObject(*args, **kwargs)
Bases:
FrameObjectVector,G3FrameObjectList of generic frame objects. Can lead to paradoxes; avoid use of this class unless you are sure you need it.
Overloaded function.
__init__(self: spt3g.core.G3VectorFrameObject) -> None
__init__(self: spt3g.core.G3VectorFrameObject, arg0: spt3g.core.G3VectorFrameObject) -> None
Copy constructor
__init__(self: spt3g.core.G3VectorFrameObject, arg0: Iterable) -> None
Iterable constructor
- Description(self: G3VectorFrameObject) str
Long-form human-readable description of the object
- Summary(self: G3VectorFrameObject) str
Short (one-line) description of the object
- append(
- self: G3VectorFrameObject,
- x: G3FrameObject,
Add an item to the end of the list
- clear(self: G3VectorFrameObject) None
Clear the contents
- count(
- self: G3VectorFrameObject,
- x: G3FrameObject,
Return the number of times
xappears in the list
- extend(
- self: G3VectorFrameObject,
- L: G3VectorFrameObject,
Extend the list by appending all the items in the given list
- insert(
- self: G3VectorFrameObject,
- i: int,
- x: G3FrameObject,
Insert an item at a given position.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3VectorFrameObject) -> spt3g.core.G3FrameObject
Remove and return the last item
pop(self: spt3g.core.G3VectorFrameObject, i: int) -> spt3g.core.G3FrameObject
Remove and return the item at index
i
- remove(
- self: G3VectorFrameObject,
- x: G3FrameObject,
Remove the first item from the list whose value is x. It is an error if there is no such item.
- class spt3g.core.G3VectorInt(*args, **kwargs)
Bases:
Int64Vector,G3FrameObjectArray of integers. Treat as a serializable version of numpy.array(dtype=int64). Can be efficiently cast to and from numpy arrays.
Overloaded function.
__init__(self: spt3g.core.G3VectorInt, arg0: numpy.ndarray) -> None
Constructor from numpy array
__init__(self: spt3g.core.G3VectorInt) -> None
__init__(self: spt3g.core.G3VectorInt, arg0: spt3g.core.G3VectorInt) -> None
Copy constructor
__init__(self: spt3g.core.G3VectorInt, arg0: Iterable) -> None
- Description(self: G3VectorInt) str
Long-form human-readable description of the object
- Summary(self: G3VectorInt) str
Short (one-line) description of the object
- all(axis=None, out=None, *, keepdims=<no value>, where=<no value>)
Returns True if all elements evaluate to True.
Refer to numpy.all for full documentation.
See also
numpy.allequivalent function
- any(axis=None, out=None, *, keepdims=<no value>, where=<no value>)
Returns True if any of the elements of a evaluate to True.
Refer to numpy.any for full documentation.
See also
numpy.anyequivalent function
- append(self: G3VectorInt, x: int) None
Add an item to the end of the list
- argmax(axis=None, out=None, *, keepdims=False)
Return indices of the maximum values along the given axis.
Refer to numpy.argmax for full documentation.
See also
numpy.argmaxequivalent function
- argmin(axis=None, out=None, *, keepdims=False)
Return indices of the minimum values along the given axis.
Refer to numpy.argmin for detailed documentation.
See also
numpy.argminequivalent function
- clear(self: G3VectorInt) None
Clear the contents
- count(self: G3VectorInt, x: int) int
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.G3VectorInt, L: spt3g.core.G3VectorInt) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.G3VectorInt, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(self: G3VectorInt, i: int, x: int) None
Insert an item at a given position.
- max(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the maximum along a given axis.
Refer to numpy.amax for full documentation.
See also
numpy.amaxequivalent function
- mean(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- where=<no value>,
Returns the average of the array elements along given axis.
Refer to numpy.mean for full documentation.
See also
numpy.meanequivalent function
- min(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the minimum along a given axis.
Refer to numpy.amin for full documentation.
See also
numpy.aminequivalent function
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3VectorInt) -> int
Remove and return the last item
pop(self: spt3g.core.G3VectorInt, i: int) -> int
Remove and return the item at index
i
- remove(self: G3VectorInt, x: int) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- std(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the standard deviation of the array elements along given axis.
Refer to numpy.std for full documentation.
See also
numpy.stdequivalent function
- sum(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the sum of the array elements over the given axis.
Refer to numpy.sum for full documentation.
See also
numpy.sumequivalent function
- var(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the variance of the array elements, along given axis.
Refer to numpy.var for full documentation.
See also
numpy.varequivalent function
- class spt3g.core.G3VectorQuat(*args, **kwargs)
Bases:
QuatVector,G3FrameObjectList of quaternions. Convertible to a 4xN numpy array. Arithmetic operations on this object are fast and provide results given proper quaternion math rather than element-by-element numpy-ish results.
Overloaded function.
__init__(self: spt3g.core.G3VectorQuat, arg0: Buffer) -> None
Constructor from numpy array
__init__(self: spt3g.core.G3VectorQuat) -> None
__init__(self: spt3g.core.G3VectorQuat, arg0: spt3g.core.G3VectorQuat) -> None
Copy constructor
__init__(self: spt3g.core.G3VectorQuat, arg0: Iterable) -> None
- Description(self: G3VectorQuat) str
Long-form human-readable description of the object
- Summary(self: G3VectorQuat) str
Short (one-line) description of the object
- abs(self: G3VectorQuat) G3VectorDouble
Return the Euclidean norm of each quaternion
- append(self: G3VectorQuat, x: Quat) None
Add an item to the end of the list
- clear(self: G3VectorQuat) None
Clear the contents
- count(self: G3VectorQuat, x: Quat) int
Return the number of times
xappears in the list
- cross3(
- self: G3VectorQuat,
- arg0: Quat,
Cross product of last three entries of each quaternion with the input
- dot3(
- self: G3VectorQuat,
- arg0: Quat,
Dot product of last three entries of each quaternion with the input
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.G3VectorQuat, L: spt3g.core.G3VectorQuat) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.G3VectorQuat, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(
- self: G3VectorQuat,
- i: int,
- x: Quat,
Insert an item at a given position.
- norm(self: G3VectorQuat) G3VectorDouble
Return the Cayley norm of each quaternion
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3VectorQuat) -> spt3g.core.Quat
Remove and return the last item
pop(self: spt3g.core.G3VectorQuat, i: int) -> spt3g.core.Quat
Remove and return the item at index
i
- remove(self: G3VectorQuat, x: Quat) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- vnorm(self: G3VectorQuat) G3VectorDouble
Return the Cayley norm of the unreal (vector) part of each quaternion
- property real
Return the real (scalar) part of each quaternion
- class spt3g.core.G3VectorString(*args, **kwargs)
Bases:
StringVector,G3FrameObjectList of strings.
Overloaded function.
__init__(self: spt3g.core.G3VectorString) -> None
__init__(self: spt3g.core.G3VectorString, arg0: spt3g.core.G3VectorString) -> None
Copy constructor
__init__(self: spt3g.core.G3VectorString, arg0: Iterable) -> None
- Description(self: G3VectorString) str
Long-form human-readable description of the object
- Summary(self: G3VectorString) str
Short (one-line) description of the object
- append(self: G3VectorString, x: str) None
Add an item to the end of the list
- clear(self: G3VectorString) None
Clear the contents
- count(self: G3VectorString, x: str) int
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.G3VectorString, L: spt3g.core.G3VectorString) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.G3VectorString, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(self: G3VectorString, i: int, x: str) None
Insert an item at a given position.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3VectorString) -> str
Remove and return the last item
pop(self: spt3g.core.G3VectorString, i: int) -> str
Remove and return the item at index
i
- remove(self: G3VectorString, x: str) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- class spt3g.core.G3VectorTime(*args, **kwargs)
Bases:
G3TimeVector,G3FrameObjectList of times.
Overloaded function.
__init__(self: spt3g.core.G3VectorTime, arg0: numpy.ndarray) -> None
Constructor from numpy array
__init__(self: spt3g.core.G3VectorTime) -> None
__init__(self: spt3g.core.G3VectorTime, arg0: spt3g.core.G3VectorTime) -> None
Copy constructor
__init__(self: spt3g.core.G3VectorTime, arg0: Iterable) -> None
- Description(self: G3VectorTime) str
Long-form human-readable description of the object
- Summary(self: G3VectorTime) str
Short (one-line) description of the object
- append(self: G3VectorTime, x: G3Time) None
Add an item to the end of the list
- clear(self: G3VectorTime) None
Clear the contents
- count(self: G3VectorTime, x: G3Time) int
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.G3VectorTime, L: spt3g.core.G3VectorTime) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.G3VectorTime, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(
- self: G3VectorTime,
- i: int,
- x: G3Time,
Insert an item at a given position.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3VectorTime) -> spt3g.core.G3Time
Remove and return the last item
pop(self: spt3g.core.G3VectorTime, i: int) -> spt3g.core.G3Time
Remove and return the item at index
i
- remove(self: G3VectorTime, x: G3Time) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- class spt3g.core.G3VectorUnsignedChar(*args, **kwargs)
Bases:
UnsignedCharVector,G3FrameObjectList of 8-bit integers
Overloaded function.
__init__(self: spt3g.core.G3VectorUnsignedChar) -> None
__init__(self: spt3g.core.G3VectorUnsignedChar, arg0: spt3g.core.G3VectorUnsignedChar) -> None
Copy constructor
__init__(self: spt3g.core.G3VectorUnsignedChar, arg0: Iterable) -> None
- Description(self: G3VectorUnsignedChar) str
Long-form human-readable description of the object
- Summary(self: G3VectorUnsignedChar) str
Short (one-line) description of the object
- append(self: G3VectorUnsignedChar, x: int) None
Add an item to the end of the list
- clear(self: G3VectorUnsignedChar) None
Clear the contents
- count(self: G3VectorUnsignedChar, x: int) int
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.G3VectorUnsignedChar, L: spt3g.core.G3VectorUnsignedChar) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.G3VectorUnsignedChar, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(
- self: G3VectorUnsignedChar,
- i: int,
- x: int,
Insert an item at a given position.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3VectorUnsignedChar) -> int
Remove and return the last item
pop(self: spt3g.core.G3VectorUnsignedChar, i: int) -> int
Remove and return the item at index
i
- remove(self: G3VectorUnsignedChar, x: int) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- class spt3g.core.G3VectorVectorString(*args, **kwargs)
Bases:
G3VectorStringVector,G3FrameObjectList of lists of strings.
Overloaded function.
__init__(self: spt3g.core.G3VectorVectorString) -> None
__init__(self: spt3g.core.G3VectorVectorString, arg0: spt3g.core.G3VectorVectorString) -> None
Copy constructor
__init__(self: spt3g.core.G3VectorVectorString, arg0: Iterable) -> None
- Description(self: G3VectorVectorString) str
Long-form human-readable description of the object
- Summary(self: G3VectorVectorString) str
Short (one-line) description of the object
- append(
- self: G3VectorVectorString,
- x: G3VectorString,
Add an item to the end of the list
- clear(self: G3VectorVectorString) None
Clear the contents
- count(
- self: G3VectorVectorString,
- x: G3VectorString,
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.G3VectorVectorString, L: spt3g.core.G3VectorVectorString) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.G3VectorVectorString, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(
- self: G3VectorVectorString,
- i: int,
- x: G3VectorString,
Insert an item at a given position.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3VectorVectorString) -> spt3g.core.G3VectorString
Remove and return the last item
pop(self: spt3g.core.G3VectorVectorString, i: int) -> spt3g.core.G3VectorString
Remove and return the item at index
i
- remove(
- self: G3VectorVectorString,
- x: G3VectorString,
Remove the first item from the list whose value is x. It is an error if there is no such item.
Class-like Pipeline Modules
Classes that can be added to G3Pipeline
instances, either written as callable objects in Python (see
Callable Objects as Functions) or as G3Module-derived
classes in C++ (see Writing a module in C++). Aside from adding these into
pipelines using the standard Add() method, such objects may also be
instantiated outside of pipelines to make use of additional features.
One typical use case is to extract some kind of data from a series of frames:
class ExtractData:
def __init__(self, key="RawTimestreams"):
self.key = key
self.data = []
def __call__(self, frame):
if self.key in frame:
self.data.append(frame[self.key])
# instantiate caching class
extractor = ExtractData()
# use instance in a pipeline
pipe = core.G3Pipeline()
pipe.Add(core.G3Reader, filename="file.g3")
pipe.Add(extractor)
pipe.Run()
# use extracted data in later processing
print(extractor.data)
Another use case may be to call additional methods of a class. For
example, the G3Writer class can be used as a
context manager, and also report the position of the file pointer after
each frame is written:
with core.G3Writer("file.g3") as writer:
for frame in frames:
writer(frame)
print("Bytes written:", writer.tell())
Class-like modules permit a variety of additional features beyond their standard usage in pipelines.
- class spt3g.core.G3InfiniteSource(*args, **kwargs)
Bases:
G3ModuleEmits infinite frames, up to an optional maximum number n
Overloaded function.
__init__(self: spt3g.core.G3InfiniteSource) -> None
__init__(self: spt3g.core.G3InfiniteSource, type: spt3g.core.G3FrameType = spt3g.core.G3FrameType.none, n: int = -1) -> None
- class spt3g.core.G3Module(self: G3Module)
Bases:
Base class for functors that can be added to a G3Pipeline.
- class spt3g.core.G3MultiFileWriter(
- self: G3MultiFileWriter,
- filename: object,
- size_limit: int,
- divide_on: object = None,
- buffersize: int = 1048576,
Bases:
G3ModuleWrites frames to disk into a sequence of files. Once a file exceeds the number of bytes specified in size_limit, it will start a new file. Files are named based on filename. If passed a string for filename with a printf-style specifier, that specifier will be replaced by a zero-indexed sequence number. For example, outfile-%03u.g3.gz would produce a sequence of files named outfile-000.g3.gz, outfile-001.g3.gz, etc. Alternatively, you can pass a callable that is passed the first frame in the new file and the sequence number and returns a path to the new file. Any frames besides Timepoint and Scan frames have the most recent frame of each type prepended to all new files.
More complex behavior can be obtained with the optional divide_on argument. This can be an iterable of frame types (e.g. [core.G3FrameType.Observation]) or a callable. In the iterable case, the presence of any frame with a type in the list will cause the creation of a new file even if the file size threshold has not yet been met. This is useful to create files based on, for example, observation boundaries. For more flexibility, you can also pass a python callable as divide_on. This callable will be passed each frame in turn. If it returns True (or something with positive truth-value), a new file will be started at that frame.
- property current_file
Path to the output file to which the next input frame will be written
- class spt3g.core.G3NetworkSender(
- self: G3NetworkSender,
- hostname: str,
- port: int,
- max_queue_size: int = 0,
- n_serializers: int = 0,
Bases:
G3ModuleWrites frames to a network socket. If hostname is set to ‘*’, will listen on the given port, on all interfaces, instead of connecting to the given port on a remote host. In listen mode, metadata frames (Calibration, Wiring, etc. – everything but Scan and Timepoint) will be accumulated and the most recent of each will be sent to new clients on connect. Scan and Timepoint frames will be broadcast live to all connected clients. If max_queue_size is set to a non-zero value, Scan and Timepoint frames may be dropped if more than max_queue_size frames are queued for transmission. If n_serializers is set to a non-zero value, the task of serializing frames to be sent will be distributed across that many background threads, which is useful when high throughput of large frames is required, but is otherwise typically not necessary.
- Close(self: G3NetworkSender) None
- class spt3g.core.G3Reader(*args, **kwargs)
Bases:
G3ModuleRead frames from disk. Takes either the path to a file to read or an iterable of files to be read in sequence. If n_frames_to_read is greater than zero, will stop after n_frames_to_read frames rather than at the end of the file[s]. The timeout parameter can used to enable socket timeout for tcp streams, resulting in EOF behavior on expiry; unfortunately this cannot be used for polling, you have to close the connection. Use the tell and seek methods to record the position of and seek to the beginning of a particular frame in the file. Set track_filename to True to record the filename for each frame in the ._filename attribute (fragile).
Overloaded function.
__init__(self: spt3g.core.G3Reader, filename: str, n_frames_to_read: int = 0, timeout: float = -1.0, track_filename: bool = False, buffersize: int = 1048576) -> None
__init__(self: spt3g.core.G3Reader, filename: spt3g.core.StringVector, n_frames_to_read: int = 0, timeout: float = -1.0, track_filename: bool = False, buffersize: int = 1048576) -> None
- class spt3g.core.G3Writer(
- self: G3Writer,
- filename: str,
- streams: FrameTypeVector = spt3g.core.FrameTypeVector([]),
- append: bool = False,
- buffersize: int = 1048576,
Bases:
G3ModuleWrites frames to disk. Frames will be written to the file specified by filename. If filename ends in .gz, output will be compressed using gzip. To write only some types of frames, pass a list of the desired frame types to the second optional argument (streams). If no streams argument is given, writes all types of frames. If append is set to True, will append frames to its output file rather than overwriting it.
- class spt3g.core.util.AbortAfterNFrames(type, n_frames)[source]
Bases:
Stops processing after n_frames frames go by
- class spt3g.core.util.DeduplicateMetadata(
- dataframetype=[spt3g.core.G3FrameType.Timepoint, spt3g.core.G3FrameType.Scan],
Bases:
Drop metadata frames (e.g. Calibration, Wiring) for which the previous metadata frame of the same type is byte-for-byte identical. This can be handy when, for example, reading in many files from the G3MultiFileWriter, which copies metadata frames to the beginning of each file. Considers all frames not in <dataframetypes> to be metadata (by default, everything except Timepoint and Scan frames).
- class spt3g.core.util.DropOrphanMetadata(
- dataframetype=[spt3g.core.G3FrameType.Timepoint, spt3g.core.G3FrameType.Scan],
Bases:
Remove metadata frames (e.g. Calibration, Wiring) without intervening data frames (e.g. Timepoint, Scan, specified by the <dataframetype> argument to the constructor). The metadata frames that do show up will be the most recent of each type and appear in their original order.
- class spt3g.core.util.G3ThrottledNetworkSender(
- hostname='*',
- port=5978,
- frame_decimation={spt3g.core.G3FrameType.Timepoint: 10},
- max_queue_size=0,
Bases:
Send every Nth frame of certain types using a wrapped G3NetworkSender. All instances of frames not in the dictionary frame_decimation will be sent at their full rate.
Function-like Pipeline Modules
Python functions that can be added to G3Pipeline instances. Such functions may also be called directly with a G3Frame object as the first argument, and do not necessarily need to be used in a pipeline. See Python Modules as Functions for more detail.
- spt3g.core.util.Delete(frame, keys=[], type=None)[source]
Deletes specified keys from frame. If optional type specified, only acts on frames of the given type.
- spt3g.core.util.Dump(frame, type=None, added_message=None)[source]
Prints frames to console. If optional type specified, only acts on frames of the given type.
- spt3g.core.util.InjectDebug(frame, type=None, debug_start_func=None)[source]
Starts a pdb session when a frame of type shows up.
The frame data is stored in the variable named “frame”.
If
debug_start_funcis not None, only starts a debug session whendebug_start_func(frame) == True.
Pipeline Segments
Python functions that combine a sequence of pipeline modules, and can be added to G3Pipeline instances. See Pipeline Segments for more detail.
- spt3g.core.util.G3NetworkReceiver(pipe, hostname='localhost', port=5978)
Emulation of old G3NetworkReceiver class. Equivalent to pointing G3Reader at a TCP URL.
Equivalent to
pipe.Add(spt3g.core.G3Reader, filename='tcp://localhost:5978')
Useful Classes
Various Python and C++ classes that are part of the public API.
- class spt3g.core.BoolVector(*args, **kwargs)
Bases:
Overloaded function.
__init__(self: spt3g.core.BoolVector) -> None
__init__(self: spt3g.core.BoolVector, arg0: spt3g.core.BoolVector) -> None
Copy constructor
__init__(self: spt3g.core.BoolVector, arg0: Iterable) -> None
- all(axis=None, out=None, *, keepdims=<no value>, where=<no value>)
Returns True if all elements evaluate to True.
Refer to numpy.all for full documentation.
See also
numpy.allequivalent function
- any(axis=None, out=None, *, keepdims=<no value>, where=<no value>)
Returns True if any of the elements of a evaluate to True.
Refer to numpy.any for full documentation.
See also
numpy.anyequivalent function
- append(self: BoolVector, x: bool) None
Add an item to the end of the list
- argmax(axis=None, out=None, *, keepdims=False)
Return indices of the maximum values along the given axis.
Refer to numpy.argmax for full documentation.
See also
numpy.argmaxequivalent function
- argmin(axis=None, out=None, *, keepdims=False)
Return indices of the minimum values along the given axis.
Refer to numpy.argmin for detailed documentation.
See also
numpy.argminequivalent function
- clear(self: BoolVector) None
Clear the contents
- count(self: BoolVector, x: bool) int
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.BoolVector, L: spt3g.core.BoolVector) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.BoolVector, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(self: BoolVector, i: int, x: bool) None
Insert an item at a given position.
- max(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the maximum along a given axis.
Refer to numpy.amax for full documentation.
See also
numpy.amaxequivalent function
- mean(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- where=<no value>,
Returns the average of the array elements along given axis.
Refer to numpy.mean for full documentation.
See also
numpy.meanequivalent function
- min(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the minimum along a given axis.
Refer to numpy.amin for full documentation.
See also
numpy.aminequivalent function
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.BoolVector) -> bool
Remove and return the last item
pop(self: spt3g.core.BoolVector, i: int) -> bool
Remove and return the item at index
i
- remove(self: BoolVector, x: bool) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- std(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the standard deviation of the array elements along given axis.
Refer to numpy.std for full documentation.
See also
numpy.stdequivalent function
- sum(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the sum of the array elements over the given axis.
Refer to numpy.sum for full documentation.
See also
numpy.sumequivalent function
- var(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the variance of the array elements, along given axis.
Refer to numpy.var for full documentation.
See also
numpy.varequivalent function
- class spt3g.core.ComplexDoubleVector(*args, **kwargs)
Bases:
Overloaded function.
__init__(self: spt3g.core.ComplexDoubleVector, arg0: numpy.ndarray) -> None
Constructor from numpy array
__init__(self: spt3g.core.ComplexDoubleVector) -> None
__init__(self: spt3g.core.ComplexDoubleVector, arg0: spt3g.core.ComplexDoubleVector) -> None
Copy constructor
__init__(self: spt3g.core.ComplexDoubleVector, arg0: Iterable) -> None
- all(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- where=<no value>,
Returns True if all elements evaluate to True.
Refer to numpy.all for full documentation.
See also
numpy.allequivalent function
- any(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- where=<no value>,
Returns True if any of the elements of a evaluate to True.
Refer to numpy.any for full documentation.
See also
numpy.anyequivalent function
- append(self: ComplexDoubleVector, x: complex) None
Add an item to the end of the list
- argmax(axis=None, out=None, *, keepdims=False)
Return indices of the maximum values along the given axis.
Refer to numpy.argmax for full documentation.
See also
numpy.argmaxequivalent function
- argmin(axis=None, out=None, *, keepdims=False)
Return indices of the minimum values along the given axis.
Refer to numpy.argmin for detailed documentation.
See also
numpy.argminequivalent function
- clear(self: ComplexDoubleVector) None
Clear the contents
- count(self: ComplexDoubleVector, x: complex) int
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.ComplexDoubleVector, L: spt3g.core.ComplexDoubleVector) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.ComplexDoubleVector, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(
- self: ComplexDoubleVector,
- i: int,
- x: complex,
Insert an item at a given position.
- max(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the maximum along a given axis.
Refer to numpy.amax for full documentation.
See also
numpy.amaxequivalent function
- mean(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- where=<no value>,
Returns the average of the array elements along given axis.
Refer to numpy.mean for full documentation.
See also
numpy.meanequivalent function
- min(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the minimum along a given axis.
Refer to numpy.amin for full documentation.
See also
numpy.aminequivalent function
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.ComplexDoubleVector) -> complex
Remove and return the last item
pop(self: spt3g.core.ComplexDoubleVector, i: int) -> complex
Remove and return the item at index
i
- remove(self: ComplexDoubleVector, x: complex) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- std(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the standard deviation of the array elements along given axis.
Refer to numpy.std for full documentation.
See also
numpy.stdequivalent function
- sum(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the sum of the array elements over the given axis.
Refer to numpy.sum for full documentation.
See also
numpy.sumequivalent function
- var(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the variance of the array elements, along given axis.
Refer to numpy.var for full documentation.
See also
numpy.varequivalent function
- class spt3g.core.ComplexFloatVector(*args, **kwargs)
Bases:
Overloaded function.
__init__(self: spt3g.core.ComplexFloatVector, arg0: numpy.ndarray) -> None
Constructor from numpy array
__init__(self: spt3g.core.ComplexFloatVector) -> None
__init__(self: spt3g.core.ComplexFloatVector, arg0: spt3g.core.ComplexFloatVector) -> None
Copy constructor
__init__(self: spt3g.core.ComplexFloatVector, arg0: Iterable) -> None
- all(axis=None, out=None, *, keepdims=<no value>, where=<no value>)
Returns True if all elements evaluate to True.
Refer to numpy.all for full documentation.
See also
numpy.allequivalent function
- any(axis=None, out=None, *, keepdims=<no value>, where=<no value>)
Returns True if any of the elements of a evaluate to True.
Refer to numpy.any for full documentation.
See also
numpy.anyequivalent function
- append(self: ComplexFloatVector, x: complex) None
Add an item to the end of the list
- argmax(axis=None, out=None, *, keepdims=False)
Return indices of the maximum values along the given axis.
Refer to numpy.argmax for full documentation.
See also
numpy.argmaxequivalent function
- argmin(axis=None, out=None, *, keepdims=False)
Return indices of the minimum values along the given axis.
Refer to numpy.argmin for detailed documentation.
See also
numpy.argminequivalent function
- clear(self: ComplexFloatVector) None
Clear the contents
- count(self: ComplexFloatVector, x: complex) int
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.ComplexFloatVector, L: spt3g.core.ComplexFloatVector) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.ComplexFloatVector, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(
- self: ComplexFloatVector,
- i: int,
- x: complex,
Insert an item at a given position.
- max(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the maximum along a given axis.
Refer to numpy.amax for full documentation.
See also
numpy.amaxequivalent function
- mean(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- where=<no value>,
Returns the average of the array elements along given axis.
Refer to numpy.mean for full documentation.
See also
numpy.meanequivalent function
- min(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the minimum along a given axis.
Refer to numpy.amin for full documentation.
See also
numpy.aminequivalent function
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.ComplexFloatVector) -> complex
Remove and return the last item
pop(self: spt3g.core.ComplexFloatVector, i: int) -> complex
Remove and return the item at index
i
- remove(self: ComplexFloatVector, x: complex) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- std(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the standard deviation of the array elements along given axis.
Refer to numpy.std for full documentation.
See also
numpy.stdequivalent function
- sum(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the sum of the array elements over the given axis.
Refer to numpy.sum for full documentation.
See also
numpy.sumequivalent function
- var(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the variance of the array elements, along given axis.
Refer to numpy.var for full documentation.
See also
numpy.varequivalent function
- class spt3g.core.DoubleVector(*args, **kwargs)
Bases:
Overloaded function.
__init__(self: spt3g.core.DoubleVector, arg0: numpy.ndarray) -> None
Constructor from numpy array
__init__(self: spt3g.core.DoubleVector) -> None
__init__(self: spt3g.core.DoubleVector, arg0: spt3g.core.DoubleVector) -> None
Copy constructor
__init__(self: spt3g.core.DoubleVector, arg0: Iterable) -> None
- all(axis=None, out=None, *, keepdims=<no value>, where=<no value>)
Returns True if all elements evaluate to True.
Refer to numpy.all for full documentation.
See also
numpy.allequivalent function
- any(axis=None, out=None, *, keepdims=<no value>, where=<no value>)
Returns True if any of the elements of a evaluate to True.
Refer to numpy.any for full documentation.
See also
numpy.anyequivalent function
- append(self: DoubleVector, x: float) None
Add an item to the end of the list
- argmax(axis=None, out=None, *, keepdims=False)
Return indices of the maximum values along the given axis.
Refer to numpy.argmax for full documentation.
See also
numpy.argmaxequivalent function
- argmin(axis=None, out=None, *, keepdims=False)
Return indices of the minimum values along the given axis.
Refer to numpy.argmin for detailed documentation.
See also
numpy.argminequivalent function
- clear(self: DoubleVector) None
Clear the contents
- count(self: DoubleVector, x: float) int
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.DoubleVector, L: spt3g.core.DoubleVector) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.DoubleVector, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(self: DoubleVector, i: int, x: float) None
Insert an item at a given position.
- max(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the maximum along a given axis.
Refer to numpy.amax for full documentation.
See also
numpy.amaxequivalent function
- mean(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- where=<no value>,
Returns the average of the array elements along given axis.
Refer to numpy.mean for full documentation.
See also
numpy.meanequivalent function
- min(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the minimum along a given axis.
Refer to numpy.amin for full documentation.
See also
numpy.aminequivalent function
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.DoubleVector) -> float
Remove and return the last item
pop(self: spt3g.core.DoubleVector, i: int) -> float
Remove and return the item at index
i
- remove(self: DoubleVector, x: float) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- std(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the standard deviation of the array elements along given axis.
Refer to numpy.std for full documentation.
See also
numpy.stdequivalent function
- sum(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the sum of the array elements over the given axis.
Refer to numpy.sum for full documentation.
See also
numpy.sumequivalent function
- var(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the variance of the array elements, along given axis.
Refer to numpy.var for full documentation.
See also
numpy.varequivalent function
- class spt3g.core.FloatVector(*args, **kwargs)
Bases:
Overloaded function.
__init__(self: spt3g.core.FloatVector, arg0: numpy.ndarray) -> None
Constructor from numpy array
__init__(self: spt3g.core.FloatVector) -> None
__init__(self: spt3g.core.FloatVector, arg0: spt3g.core.FloatVector) -> None
Copy constructor
__init__(self: spt3g.core.FloatVector, arg0: Iterable) -> None
- all(axis=None, out=None, *, keepdims=<no value>, where=<no value>)
Returns True if all elements evaluate to True.
Refer to numpy.all for full documentation.
See also
numpy.allequivalent function
- any(axis=None, out=None, *, keepdims=<no value>, where=<no value>)
Returns True if any of the elements of a evaluate to True.
Refer to numpy.any for full documentation.
See also
numpy.anyequivalent function
- append(self: FloatVector, x: float) None
Add an item to the end of the list
- argmax(axis=None, out=None, *, keepdims=False)
Return indices of the maximum values along the given axis.
Refer to numpy.argmax for full documentation.
See also
numpy.argmaxequivalent function
- argmin(axis=None, out=None, *, keepdims=False)
Return indices of the minimum values along the given axis.
Refer to numpy.argmin for detailed documentation.
See also
numpy.argminequivalent function
- clear(self: FloatVector) None
Clear the contents
- count(self: FloatVector, x: float) int
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.FloatVector, L: spt3g.core.FloatVector) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.FloatVector, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(self: FloatVector, i: int, x: float) None
Insert an item at a given position.
- max(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the maximum along a given axis.
Refer to numpy.amax for full documentation.
See also
numpy.amaxequivalent function
- mean(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- where=<no value>,
Returns the average of the array elements along given axis.
Refer to numpy.mean for full documentation.
See also
numpy.meanequivalent function
- min(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the minimum along a given axis.
Refer to numpy.amin for full documentation.
See also
numpy.aminequivalent function
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.FloatVector) -> float
Remove and return the last item
pop(self: spt3g.core.FloatVector, i: int) -> float
Remove and return the item at index
i
- remove(self: FloatVector, x: float) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- std(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the standard deviation of the array elements along given axis.
Refer to numpy.std for full documentation.
See also
numpy.stdequivalent function
- sum(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the sum of the array elements over the given axis.
Refer to numpy.sum for full documentation.
See also
numpy.sumequivalent function
- var(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the variance of the array elements, along given axis.
Refer to numpy.var for full documentation.
See also
numpy.varequivalent function
- class spt3g.core.FrameObjectVector(*args, **kwargs)
Bases:
Overloaded function.
__init__(self: spt3g.core.FrameObjectVector) -> None
__init__(self: spt3g.core.FrameObjectVector, arg0: spt3g.core.FrameObjectVector) -> None
Copy constructor
__init__(self: spt3g.core.FrameObjectVector, arg0: Iterable) -> None
- append(
- self: FrameObjectVector,
- x: G3FrameObject,
Add an item to the end of the list
- clear(self: FrameObjectVector) None
Clear the contents
- count(
- self: FrameObjectVector,
- x: G3FrameObject,
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.FrameObjectVector, L: spt3g.core.FrameObjectVector) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.FrameObjectVector, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(
- self: FrameObjectVector,
- i: int,
- x: G3FrameObject,
Insert an item at a given position.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.FrameObjectVector) -> spt3g.core.G3FrameObject
Remove and return the last item
pop(self: spt3g.core.FrameObjectVector, i: int) -> spt3g.core.G3FrameObject
Remove and return the item at index
i
- remove(
- self: FrameObjectVector,
- x: G3FrameObject,
Remove the first item from the list whose value is x. It is an error if there is no such item.
- class spt3g.core.FrameTypeVector(*args, **kwargs)
Bases:
Overloaded function.
__init__(self: spt3g.core.FrameTypeVector) -> None
__init__(self: spt3g.core.FrameTypeVector, arg0: spt3g.core.FrameTypeVector) -> None
Copy constructor
__init__(self: spt3g.core.FrameTypeVector, arg0: Iterable) -> None
- append(
- self: FrameTypeVector,
- x: G3FrameType,
Add an item to the end of the list
- clear(self: FrameTypeVector) None
Clear the contents
- count(
- self: FrameTypeVector,
- x: G3FrameType,
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.FrameTypeVector, L: spt3g.core.FrameTypeVector) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.FrameTypeVector, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(
- self: FrameTypeVector,
- i: int,
- x: G3FrameType,
Insert an item at a given position.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.FrameTypeVector) -> spt3g.core.G3FrameType
Remove and return the last item
pop(self: spt3g.core.FrameTypeVector, i: int) -> spt3g.core.G3FrameType
Remove and return the item at index
i
- remove(
- self: FrameTypeVector,
- x: G3FrameType,
Remove the first item from the list whose value is x. It is an error if there is no such item.
- class spt3g.core.FrameVector(*args, **kwargs)
Bases:
Overloaded function.
__init__(self: spt3g.core.FrameVector) -> None
__init__(self: spt3g.core.FrameVector, arg0: spt3g.core.FrameVector) -> None
Copy constructor
__init__(self: spt3g.core.FrameVector, arg0: Iterable) -> None
- append(self: FrameVector, x: G3Frame) None
Add an item to the end of the list
- clear(self: FrameVector) None
Clear the contents
- count(self: FrameVector, x: G3Frame) int
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.FrameVector, L: spt3g.core.FrameVector) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.FrameVector, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(
- self: FrameVector,
- i: int,
- x: G3Frame,
Insert an item at a given position.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.FrameVector) -> spt3g.core.G3Frame
Remove and return the last item
pop(self: spt3g.core.FrameVector, i: int) -> spt3g.core.G3Frame
Remove and return the item at index
i
- remove(self: FrameVector, x: G3Frame) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- class spt3g.core.G3Frame(*args, **kwargs)
Bases:
Frames are the core datatype of the analysis software. They behave like Python dictionaries except that they can only store subclasses of core.G3FrameObject and the dictionary keys must be strings. Pickling and unpickling them uses internal serialization and is extremely fast.
In addition to dictionary-like contents, frames have a type code (G3Frame.Type) that designates what kind of data are contained in it. These types usually indicates information that changes at different rates.
Overloaded function.
__init__(self: spt3g.core.G3Frame) -> None
__init__(self: spt3g.core.G3Frame, arg0: spt3g.core.G3FrameType) -> None
__init__(self: spt3g.core.G3Frame, arg0: spt3g.core.G3Frame) -> None
__init__(self: spt3g.core.G3Frame, adhoctypecode: str) -> None
Create a frame with an ad-hoc (non-standard) type code. Use sparingly and with care.
- drop_blobs(self: G3Frame, decode_all: bool = False) None
Drop all serialized data either for already-decoded objects (default) or all objects after decoding them (if decode_all is true). Saves memory at the expense of CPU time if reserialized.
- drop_objects(self: G3Frame) None
Drop all decoded objects in favor of their serialized copies, where those serialized copies already exist. Saves memory for frames about to be written at the expense of CPU time to re-decode them if they are accessed again later.
- generate_blobs(self: G3Frame, drop_objects: bool = False) None
Force immediate serialization of all objects. Will save some CPU time later during serialization of the frame in exchange for spending the exact same amount of CPU time right now.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3Frame, arg0: str) -> object
pop(self: spt3g.core.G3Frame, arg0: str, arg1: object) -> object
- values(self: G3Frame) ValuesView
Return an object providing a view on the mappings’s values.
- property hash
Return the serialized representation of the frame
- property type
Type code for frame. See general G3Frame docstring.
- class spt3g.core.G3FrameType(*args, **kwargs)
Bases:
Enumerated frame type for identifying G3Frame objects
Overloaded function.
__init__(self: spt3g.core.G3FrameType, value: int) -> None
__init__(self: spt3g.core.G3FrameType, arg0: None) -> None
- Calibration = spt3g.core.G3FrameType.Calibration
- EndProcessing = spt3g.core.G3FrameType.EndProcessing
- Ephemeris = spt3g.core.G3FrameType.Ephemeris
- GcpSlow = spt3g.core.G3FrameType.GcpSlow
- Housekeeping = spt3g.core.G3FrameType.Housekeeping
- InstrumentStatus = spt3g.core.G3FrameType.InstrumentStatus
- LightCurve = spt3g.core.G3FrameType.LightCurve
- Map = spt3g.core.G3FrameType.Map
- Observation = spt3g.core.G3FrameType.Observation
- PipelineInfo = spt3g.core.G3FrameType.PipelineInfo
- Scan = spt3g.core.G3FrameType.Scan
- Statistics = spt3g.core.G3FrameType.Statistics
- Timepoint = spt3g.core.G3FrameType.Timepoint
- Wiring = spt3g.core.G3FrameType.Wiring
- property key
C++ enum character key
- G3FrameType.name -> str
- names = {'Calibration': spt3g.core.G3FrameType.Calibration, 'EndProcessing': spt3g.core.G3FrameType.EndProcessing, 'Ephemeris': spt3g.core.G3FrameType.Ephemeris, 'GcpSlow': spt3g.core.G3FrameType.GcpSlow, 'Housekeeping': spt3g.core.G3FrameType.Housekeeping, 'InstrumentStatus': spt3g.core.G3FrameType.InstrumentStatus, 'LightCurve': spt3g.core.G3FrameType.LightCurve, 'Map': spt3g.core.G3FrameType.Map, 'Observation': spt3g.core.G3FrameType.Observation, 'PipelineInfo': spt3g.core.G3FrameType.PipelineInfo, 'Scan': spt3g.core.G3FrameType.Scan, 'Statistics': spt3g.core.G3FrameType.Statistics, 'Timepoint': spt3g.core.G3FrameType.Timepoint, 'Wiring': spt3g.core.G3FrameType.Wiring, 'none': spt3g.core.G3FrameType.none}
- none = spt3g.core.G3FrameType.none
- property value
- values = {67: spt3g.core.G3FrameType.Calibration, 69: spt3g.core.G3FrameType.Ephemeris, 71: spt3g.core.G3FrameType.GcpSlow, 72: spt3g.core.G3FrameType.Housekeeping, 73: spt3g.core.G3FrameType.InstrumentStatus, 76: spt3g.core.G3FrameType.LightCurve, 77: spt3g.core.G3FrameType.Map, 78: spt3g.core.G3FrameType.none, 79: spt3g.core.G3FrameType.Observation, 80: spt3g.core.G3FrameType.PipelineInfo, 82: spt3g.core.G3FrameType.Statistics, 83: spt3g.core.G3FrameType.Scan, 84: spt3g.core.G3FrameType.Timepoint, 87: spt3g.core.G3FrameType.Wiring, 90: spt3g.core.G3FrameType.EndProcessing}
- class spt3g.core.G3LogLevel(self: G3LogLevel, value: int)
Bases:
Logging level identifier for G3Logger objects
- LOG_DEBUG = spt3g.core.G3LogLevel.LOG_DEBUG
- LOG_ERROR = spt3g.core.G3LogLevel.LOG_ERROR
- LOG_FATAL = spt3g.core.G3LogLevel.LOG_FATAL
- LOG_INFO = spt3g.core.G3LogLevel.LOG_INFO
- LOG_NOTICE = spt3g.core.G3LogLevel.LOG_NOTICE
- LOG_TRACE = spt3g.core.G3LogLevel.LOG_TRACE
- LOG_WARN = spt3g.core.G3LogLevel.LOG_WARN
- G3LogLevel.name -> str
- names = {'LOG_DEBUG': spt3g.core.G3LogLevel.LOG_DEBUG, 'LOG_ERROR': spt3g.core.G3LogLevel.LOG_ERROR, 'LOG_FATAL': spt3g.core.G3LogLevel.LOG_FATAL, 'LOG_INFO': spt3g.core.G3LogLevel.LOG_INFO, 'LOG_NOTICE': spt3g.core.G3LogLevel.LOG_NOTICE, 'LOG_TRACE': spt3g.core.G3LogLevel.LOG_TRACE, 'LOG_WARN': spt3g.core.G3LogLevel.LOG_WARN}
- property value
- values = {0: spt3g.core.G3LogLevel.LOG_TRACE, 1: spt3g.core.G3LogLevel.LOG_DEBUG, 2: spt3g.core.G3LogLevel.LOG_INFO, 3: spt3g.core.G3LogLevel.LOG_NOTICE, 4: spt3g.core.G3LogLevel.LOG_WARN, 5: spt3g.core.G3LogLevel.LOG_ERROR, 6: spt3g.core.G3LogLevel.LOG_FATAL}
- class spt3g.core.G3Logger
Bases:
C++ logging abstract base class
- get_level_for_unit(
- self: G3Logger,
- unit: str,
- log(
- self: G3Logger,
- level: G3LogLevel,
- unit: str,
- file: str,
- line: int,
- function: str,
- message: str,
- set_level(self: G3Logger, level: G3LogLevel) None
- set_level_for_unit(
- self: G3Logger,
- unit: str,
- level: G3LogLevel,
- global_logger = <spt3g.core.G3PrintfLogger object>
- class spt3g.core.G3LoggerVector(*args, **kwargs)
Bases:
Overloaded function.
__init__(self: spt3g.core.G3LoggerVector) -> None
__init__(self: spt3g.core.G3LoggerVector, arg0: spt3g.core.G3LoggerVector) -> None
Copy constructor
__init__(self: spt3g.core.G3LoggerVector, arg0: Iterable) -> None
- append(
- self: G3LoggerVector,
- x: G3Logger,
Add an item to the end of the list
- clear(self: G3LoggerVector) None
Clear the contents
- count(self: G3LoggerVector, x: G3Logger) int
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.G3LoggerVector, L: spt3g.core.G3LoggerVector) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.G3LoggerVector, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(
- self: G3LoggerVector,
- i: int,
- x: G3Logger,
Insert an item at a given position.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3LoggerVector) -> spt3g.core.G3Logger
Remove and return the last item
pop(self: spt3g.core.G3LoggerVector, i: int) -> spt3g.core.G3Logger
Remove and return the item at index
i
- remove(
- self: G3LoggerVector,
- x: G3Logger,
Remove the first item from the list whose value is x. It is an error if there is no such item.
- class spt3g.core.G3MultiLogger(self: G3MultiLogger, arg0: G3LoggerVector)
Bases:
G3LoggerLog to multiple loggers at once
- class spt3g.core.G3NullLogger
Bases:
G3LoggerLogger that does not log. Useful if you don’t want log messages
- class spt3g.core.G3Pipeline(self: G3Pipeline)
Bases:
A collection of core.G3Modules and Python callables. Added callables are called sequentially and are passed a frame as their only positional argument. If the added callable is a python function, it is also passed any keyword arguments given to Add(). If it is a class, those keyword arguments are passed to the class constructor.
The first module is passed None and returns one or more frames to be passed to the next module. Processing will halt if it returns [].
Following modules are passed the frames, one at a time, returned by the previous module. The return value from these modules then becomes the input queue for the next. Once the last module returns, or a module returns [] (or False, which is equivalent), control returns to the first module and new data is pushed through the pipe.
- Return value semantics for modules:
A single frame: pass frame to next module
An iterable (e.g. a list) of frames: pass frames to next module in order
None: pass input frame to next module (implicit if no return)
True: pass input frame to next module
False: discard input frame and return to first module, or end processing if returned by first module. Equivalent to [].
- static halt_processing() None
Halts all running pipelines after they flush all currently in-flight frames. Once set, the first module will not be called again.
- Add(callable, name=None, subprocess=False, **kwargs)
Add a processing module to the pipeline. It can be any subclass of spt3g.core.G3Module or any Python callable, either an instance or a class. Positional and keyword arguments are passed through to the argument’s constructor (if a class) or as additional arguments to a function. If subprocess is set to True, this module will be run in a separate process.
- GetGraphInfo(self: G3Pipeline) str
Get stored control flow information from Run(graph=True)
- Run(
- self: G3Pipeline,
- profile: bool = False,
- graph: bool = False,
- signal_halt: bool = True,
Run pipeline. If profile is True, print execution time statistics for each module when complete. If graph is True, stores control flow data that can be processed with GraphViz once retrieved using GetGraphInfo(). If signal_halt is True (default), the pipeline will stop processing new frames when SIGINT is sent to this process. Equivalent to what happens when halt_processing() is called.
- property last_frame
- class spt3g.core.G3PrintfLogger(
- self: G3PrintfLogger,
- default_level: G3LogLevel = spt3g.core.G3LogLevel.LOG_NOTICE,
Bases:
G3LoggerLogger that prints error messages to stderr (in color, if stderr is a tty).
- property timestamps
- property trim_file_names
- class spt3g.core.G3SyslogLogger(
- self: G3SyslogLogger,
- ident: str,
- facility: int,
- default_level: G3LogLevel = spt3g.core.G3LogLevel.LOG_NOTICE,
Bases:
G3LoggerPass log messages to the syslog service. Initialize with a string identifier and a logging facility. See syslog(3) for details. Example: import syslog logger = core.G3SyslogLogger(‘myprogram’, syslog.LOG_USER)
- class spt3g.core.G3TimeVector(*args, **kwargs)
Bases:
Overloaded function.
__init__(self: spt3g.core.G3TimeVector, arg0: numpy.ndarray) -> None
Constructor from numpy array
__init__(self: spt3g.core.G3TimeVector) -> None
__init__(self: spt3g.core.G3TimeVector, arg0: spt3g.core.G3TimeVector) -> None
Copy constructor
__init__(self: spt3g.core.G3TimeVector, arg0: Iterable) -> None
- append(self: G3TimeVector, x: G3Time) None
Add an item to the end of the list
- clear(self: G3TimeVector) None
Clear the contents
- count(self: G3TimeVector, x: G3Time) int
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.G3TimeVector, L: spt3g.core.G3TimeVector) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.G3TimeVector, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(
- self: G3TimeVector,
- i: int,
- x: G3Time,
Insert an item at a given position.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3TimeVector) -> spt3g.core.G3Time
Remove and return the last item
pop(self: spt3g.core.G3TimeVector, i: int) -> spt3g.core.G3Time
Remove and return the item at index
i
- remove(self: G3TimeVector, x: G3Time) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- class spt3g.core.G3TimestreamUnits(*args, **kwargs)
Bases:
Unit scheme for timestreams and maps. Designates different classes of units (power, current, on-sky temperature) rather than choices of unit within a class (watts vs. horsepower, or K vs. uK), transformations between which are handled by core.G3Units.
Overloaded function.
__init__(self: spt3g.core.G3TimestreamUnits, value: int) -> None
__init__(self: spt3g.core.G3TimestreamUnits, arg0: None) -> None
- Angle = spt3g.core.G3TimestreamUnits.Angle
- Counts = spt3g.core.G3TimestreamUnits.Counts
- Current = spt3g.core.G3TimestreamUnits.Current
- Distance = spt3g.core.G3TimestreamUnits.Distance
- FluxDensity = spt3g.core.G3TimestreamUnits.FluxDensity
- Frequency = spt3g.core.G3TimestreamUnits.Frequency
- None = spt3g.core.G3TimestreamUnits.None
- Power = spt3g.core.G3TimestreamUnits.Power
- Pressure = spt3g.core.G3TimestreamUnits.Pressure
- Resistance = spt3g.core.G3TimestreamUnits.Resistance
- Tcmb = spt3g.core.G3TimestreamUnits.Tcmb
- Trj = spt3g.core.G3TimestreamUnits.Trj
- Voltage = spt3g.core.G3TimestreamUnits.Voltage
- G3TimestreamUnits.name -> str
- names = {'Angle': spt3g.core.G3TimestreamUnits.Angle, 'Counts': spt3g.core.G3TimestreamUnits.Counts, 'Current': spt3g.core.G3TimestreamUnits.Current, 'Distance': spt3g.core.G3TimestreamUnits.Distance, 'FluxDensity': spt3g.core.G3TimestreamUnits.FluxDensity, 'Frequency': spt3g.core.G3TimestreamUnits.Frequency, 'None': spt3g.core.G3TimestreamUnits.None, 'Power': spt3g.core.G3TimestreamUnits.Power, 'Pressure': spt3g.core.G3TimestreamUnits.Pressure, 'Resistance': spt3g.core.G3TimestreamUnits.Resistance, 'Tcmb': spt3g.core.G3TimestreamUnits.Tcmb, 'Trj': spt3g.core.G3TimestreamUnits.Trj, 'Voltage': spt3g.core.G3TimestreamUnits.Voltage}
- property value
- values = {0: spt3g.core.G3TimestreamUnits.None, 1: spt3g.core.G3TimestreamUnits.Counts, 2: spt3g.core.G3TimestreamUnits.Current, 3: spt3g.core.G3TimestreamUnits.Power, 4: spt3g.core.G3TimestreamUnits.Tcmb, 5: spt3g.core.G3TimestreamUnits.Resistance, 6: spt3g.core.G3TimestreamUnits.Angle, 7: spt3g.core.G3TimestreamUnits.Distance, 8: spt3g.core.G3TimestreamUnits.Voltage, 9: spt3g.core.G3TimestreamUnits.Pressure, 10: spt3g.core.G3TimestreamUnits.FluxDensity, 11: spt3g.core.G3TimestreamUnits.Trj, 12: spt3g.core.G3TimestreamUnits.Frequency}
- class spt3g.core.G3VectorStringVector(*args, **kwargs)
Bases:
Overloaded function.
__init__(self: spt3g.core.G3VectorStringVector) -> None
__init__(self: spt3g.core.G3VectorStringVector, arg0: spt3g.core.G3VectorStringVector) -> None
Copy constructor
__init__(self: spt3g.core.G3VectorStringVector, arg0: Iterable) -> None
- append(
- self: G3VectorStringVector,
- x: G3VectorString,
Add an item to the end of the list
- clear(self: G3VectorStringVector) None
Clear the contents
- count(
- self: G3VectorStringVector,
- x: G3VectorString,
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.G3VectorStringVector, L: spt3g.core.G3VectorStringVector) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.G3VectorStringVector, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(
- self: G3VectorStringVector,
- i: int,
- x: G3VectorString,
Insert an item at a given position.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.G3VectorStringVector) -> spt3g.core.G3VectorString
Remove and return the last item
pop(self: spt3g.core.G3VectorStringVector, i: int) -> spt3g.core.G3VectorString
Remove and return the item at index
i
- remove(
- self: G3VectorStringVector,
- x: G3VectorString,
Remove the first item from the list whose value is x. It is an error if there is no such item.
- class spt3g.core.Int64Vector(*args, **kwargs)
Bases:
Overloaded function.
__init__(self: spt3g.core.Int64Vector, arg0: numpy.ndarray) -> None
Constructor from numpy array
__init__(self: spt3g.core.Int64Vector) -> None
__init__(self: spt3g.core.Int64Vector, arg0: spt3g.core.Int64Vector) -> None
Copy constructor
__init__(self: spt3g.core.Int64Vector, arg0: Iterable) -> None
- all(axis=None, out=None, *, keepdims=<no value>, where=<no value>)
Returns True if all elements evaluate to True.
Refer to numpy.all for full documentation.
See also
numpy.allequivalent function
- any(axis=None, out=None, *, keepdims=<no value>, where=<no value>)
Returns True if any of the elements of a evaluate to True.
Refer to numpy.any for full documentation.
See also
numpy.anyequivalent function
- append(self: Int64Vector, x: int) None
Add an item to the end of the list
- argmax(axis=None, out=None, *, keepdims=False)
Return indices of the maximum values along the given axis.
Refer to numpy.argmax for full documentation.
See also
numpy.argmaxequivalent function
- argmin(axis=None, out=None, *, keepdims=False)
Return indices of the minimum values along the given axis.
Refer to numpy.argmin for detailed documentation.
See also
numpy.argminequivalent function
- clear(self: Int64Vector) None
Clear the contents
- count(self: Int64Vector, x: int) int
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.Int64Vector, L: spt3g.core.Int64Vector) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.Int64Vector, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(self: Int64Vector, i: int, x: int) None
Insert an item at a given position.
- max(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the maximum along a given axis.
Refer to numpy.amax for full documentation.
See also
numpy.amaxequivalent function
- mean(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- where=<no value>,
Returns the average of the array elements along given axis.
Refer to numpy.mean for full documentation.
See also
numpy.meanequivalent function
- min(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the minimum along a given axis.
Refer to numpy.amin for full documentation.
See also
numpy.aminequivalent function
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.Int64Vector) -> int
Remove and return the last item
pop(self: spt3g.core.Int64Vector, i: int) -> int
Remove and return the item at index
i
- remove(self: Int64Vector, x: int) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- std(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the standard deviation of the array elements along given axis.
Refer to numpy.std for full documentation.
See also
numpy.stdequivalent function
- sum(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the sum of the array elements over the given axis.
Refer to numpy.sum for full documentation.
See also
numpy.sumequivalent function
- var(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the variance of the array elements, along given axis.
Refer to numpy.var for full documentation.
See also
numpy.varequivalent function
- class spt3g.core.IntVector(*args, **kwargs)
Bases:
Overloaded function.
__init__(self: spt3g.core.IntVector, arg0: numpy.ndarray) -> None
Constructor from numpy array
__init__(self: spt3g.core.IntVector) -> None
__init__(self: spt3g.core.IntVector, arg0: spt3g.core.IntVector) -> None
Copy constructor
__init__(self: spt3g.core.IntVector, arg0: Iterable) -> None
- all(axis=None, out=None, *, keepdims=<no value>, where=<no value>)
Returns True if all elements evaluate to True.
Refer to numpy.all for full documentation.
See also
numpy.allequivalent function
- any(axis=None, out=None, *, keepdims=<no value>, where=<no value>)
Returns True if any of the elements of a evaluate to True.
Refer to numpy.any for full documentation.
See also
numpy.anyequivalent function
- argmax(axis=None, out=None, *, keepdims=False)
Return indices of the maximum values along the given axis.
Refer to numpy.argmax for full documentation.
See also
numpy.argmaxequivalent function
- argmin(axis=None, out=None, *, keepdims=False)
Return indices of the minimum values along the given axis.
Refer to numpy.argmin for detailed documentation.
See also
numpy.argminequivalent function
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.IntVector, L: spt3g.core.IntVector) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.IntVector, L: Iterable) -> None
Extend the list by appending all the items in the given list
- max(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the maximum along a given axis.
Refer to numpy.amax for full documentation.
See also
numpy.amaxequivalent function
- mean(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- where=<no value>,
Returns the average of the array elements along given axis.
Refer to numpy.mean for full documentation.
See also
numpy.meanequivalent function
- min(
- axis=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the minimum along a given axis.
Refer to numpy.amin for full documentation.
See also
numpy.aminequivalent function
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.IntVector) -> int
Remove and return the last item
pop(self: spt3g.core.IntVector, i: int) -> int
Remove and return the item at index
i
- remove(self: IntVector, x: int) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- std(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the standard deviation of the array elements along given axis.
Refer to numpy.std for full documentation.
See also
numpy.stdequivalent function
- sum(
- axis=None,
- dtype=None,
- out=None,
- *,
- keepdims=<no value>,
- initial=<no value>,
- where=<no value>,
Return the sum of the array elements over the given axis.
Refer to numpy.sum for full documentation.
See also
numpy.sumequivalent function
- var(
- axis=None,
- dtype=None,
- out=None,
- ddof=0,
- *,
- keepdims=<no value>,
- where=<no value>,
- mean=<no value>,
Returns the variance of the array elements, along given axis.
Refer to numpy.var for full documentation.
See also
numpy.varequivalent function
- class spt3g.core.ItemsView
Bases:
View of mapping items, with length and iteration operations.
- class spt3g.core.KeysView
Bases:
View of mapping keys, with length, existence and iteration operations.
- class spt3g.core.ModuleConfigVector(*args, **kwargs)
Bases:
Overloaded function.
__init__(self: spt3g.core.ModuleConfigVector) -> None
__init__(self: spt3g.core.ModuleConfigVector, arg0: spt3g.core.ModuleConfigVector) -> None
Copy constructor
__init__(self: spt3g.core.ModuleConfigVector, arg0: Iterable) -> None
- append(
- self: ModuleConfigVector,
- x: G3ModuleConfig,
Add an item to the end of the list
- clear(self: ModuleConfigVector) None
Clear the contents
- count(
- self: ModuleConfigVector,
- x: G3ModuleConfig,
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.ModuleConfigVector, L: spt3g.core.ModuleConfigVector) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.ModuleConfigVector, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(
- self: ModuleConfigVector,
- i: int,
- x: G3ModuleConfig,
Insert an item at a given position.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.ModuleConfigVector) -> spt3g.core.G3ModuleConfig
Remove and return the last item
pop(self: spt3g.core.ModuleConfigVector, i: int) -> spt3g.core.G3ModuleConfig
Remove and return the item at index
i
- remove(
- self: ModuleConfigVector,
- x: G3ModuleConfig,
Remove the first item from the list whose value is x. It is an error if there is no such item.
- class spt3g.core.Quat(*args, **kwargs)
Bases:
Representation of a quaternion. Data in a,b,c,d.
Overloaded function.
__init__(self: spt3g.core.Quat) -> None
__init__(self: spt3g.core.Quat, arg0: spt3g.core.Quat) -> None
Copy constructor
__init__(self: spt3g.core.Quat, a: float, b: float, c: float, d: float) -> None
Create a quaternion from its four elements.
__init__(self: spt3g.core.Quat, data: Buffer) -> None
Create a quaternion from a numpy array
__init__(self: spt3g.core.Quat, data: Iterable) -> None
Create a quaternion from a python iterable
- property a
Scalar component
- property b
First vector component
- property c
Second vector component
- property d
Third vector component
- property real
The real (scalar) part of the quaternion
- property unreal
The unreal (vector) part of the quaternion
- class spt3g.core.QuatVector(*args, **kwargs)
Bases:
Overloaded function.
__init__(self: spt3g.core.QuatVector, arg0: Buffer) -> None
Constructor from numpy array
__init__(self: spt3g.core.QuatVector) -> None
__init__(self: spt3g.core.QuatVector, arg0: spt3g.core.QuatVector) -> None
Copy constructor
__init__(self: spt3g.core.QuatVector, arg0: Iterable) -> None
- append(self: QuatVector, x: Quat) None
Add an item to the end of the list
- clear(self: QuatVector) None
Clear the contents
- count(self: QuatVector, x: Quat) int
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.QuatVector, L: spt3g.core.QuatVector) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.QuatVector, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(self: QuatVector, i: int, x: Quat) None
Insert an item at a given position.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.QuatVector) -> spt3g.core.Quat
Remove and return the last item
pop(self: spt3g.core.QuatVector, i: int) -> spt3g.core.Quat
Remove and return the item at index
i
- remove(self: QuatVector, x: Quat) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- class spt3g.core.StringVector(*args, **kwargs)
Bases:
Overloaded function.
__init__(self: spt3g.core.StringVector) -> None
__init__(self: spt3g.core.StringVector, arg0: spt3g.core.StringVector) -> None
Copy constructor
__init__(self: spt3g.core.StringVector, arg0: Iterable) -> None
- append(self: StringVector, x: str) None
Add an item to the end of the list
- clear(self: StringVector) None
Clear the contents
- count(self: StringVector, x: str) int
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.StringVector, L: spt3g.core.StringVector) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.StringVector, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(self: StringVector, i: int, x: str) None
Insert an item at a given position.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.StringVector) -> str
Remove and return the last item
pop(self: spt3g.core.StringVector, i: int) -> str
Remove and return the item at index
i
- remove(self: StringVector, x: str) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- class spt3g.core.UInt64Vector(*args, **kwargs)
Bases:
Overloaded function.
__init__(self: spt3g.core.UInt64Vector, arg0: numpy.ndarray) -> None
Constructor from numpy array
__init__(self: spt3g.core.UInt64Vector) -> None
__init__(self: spt3g.core.UInt64Vector, arg0: spt3g.core.UInt64Vector) -> None
Copy constructor
__init__(self: spt3g.core.UInt64Vector, arg0: Iterable) -> None
- append(self: UInt64Vector, x: int) None
Add an item to the end of the list
- clear(self: UInt64Vector) None
Clear the contents
- count(self: UInt64Vector, x: int) int
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.UInt64Vector, L: spt3g.core.UInt64Vector) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.UInt64Vector, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(self: UInt64Vector, i: int, x: int) None
Insert an item at a given position.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.UInt64Vector) -> int
Remove and return the last item
pop(self: spt3g.core.UInt64Vector, i: int) -> int
Remove and return the item at index
i
- remove(self: UInt64Vector, x: int) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- class spt3g.core.UIntVector(*args, **kwargs)
Bases:
Overloaded function.
__init__(self: spt3g.core.UIntVector, arg0: numpy.ndarray) -> None
Constructor from numpy array
__init__(self: spt3g.core.UIntVector) -> None
__init__(self: spt3g.core.UIntVector, arg0: spt3g.core.UIntVector) -> None
Copy constructor
__init__(self: spt3g.core.UIntVector, arg0: Iterable) -> None
- append(self: UIntVector, x: int) None
Add an item to the end of the list
- clear(self: UIntVector) None
Clear the contents
- count(self: UIntVector, x: int) int
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.UIntVector, L: spt3g.core.UIntVector) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.UIntVector, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(self: UIntVector, i: int, x: int) None
Insert an item at a given position.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.UIntVector) -> int
Remove and return the last item
pop(self: spt3g.core.UIntVector, i: int) -> int
Remove and return the item at index
i
- remove(self: UIntVector, x: int) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- class spt3g.core.UnsignedCharVector(*args, **kwargs)
Bases:
Overloaded function.
__init__(self: spt3g.core.UnsignedCharVector) -> None
__init__(self: spt3g.core.UnsignedCharVector, arg0: spt3g.core.UnsignedCharVector) -> None
Copy constructor
__init__(self: spt3g.core.UnsignedCharVector, arg0: Iterable) -> None
- append(self: UnsignedCharVector, x: int) None
Add an item to the end of the list
- clear(self: UnsignedCharVector) None
Clear the contents
- count(self: UnsignedCharVector, x: int) int
Return the number of times
xappears in the list
- extend(*args, **kwargs)
Overloaded function.
extend(self: spt3g.core.UnsignedCharVector, L: spt3g.core.UnsignedCharVector) -> None
Extend the list by appending all the items in the given list
extend(self: spt3g.core.UnsignedCharVector, L: Iterable) -> None
Extend the list by appending all the items in the given list
- insert(
- self: UnsignedCharVector,
- i: int,
- x: int,
Insert an item at a given position.
- pop(*args, **kwargs)
Overloaded function.
pop(self: spt3g.core.UnsignedCharVector) -> int
Remove and return the last item
pop(self: spt3g.core.UnsignedCharVector, i: int) -> int
Remove and return the item at index
i
- remove(self: UnsignedCharVector, x: int) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- class spt3g.core.ValuesView
Bases:
View of mapping values, with length and iteration operations.
- class spt3g.core.apidoc.G3Documenter(root)[source]
Bases:
Class for inspecting sub-modules of the SPT-3G software package and generating valid RST for use with sphinx-autodoc.
- find_objects(mod=None)[source]
Recursively find all objects in the input root that fit into one of the API categories listed in
categories.- Parameters:
mod (object) – Object to inspect
- Returns:
cache – Recursively populated dictionary of fully qualified names and their associated API category.
- Return type:
dict
- generate()[source]
Construct valid RST for each of the API types in separate sections, and list all relevant objects with appropriate sphinx-autodoc directives.
- Returns:
String containing valid RST to append to a document
- Return type:
str
- property categories
Dictionary of API categories for which to generate documentation, containing a section title, description, and sphinx-autodoc directive as a tuple for each category.
- class spt3g.core.fileio.G3File(path)[source]
Bases:
Iterable class for G3 files, as created by G3Writer. Loop through frames by doing something like:
with core.G3File("/path/to/file.g3") as f: for frame in f: print(frame)
An entire file can also be read into an indexable list by doing:
f = list(core.G3File("/path/to/file.g3"))
Useful Functions
Various Python and C++ functions that are part of the public API.
- spt3g.core.apidoc.module_apidoc(module_path)[source]
Create API documentation for a submodule of the spt3g library.
The output separates each of the API types into separate sections, and lists all relevant objects with appropriate sphinx-autodoc directives.
- Parameters:
module_path (str) – Python module path to inspect, e.g. “spt3g.core”
- Returns:
String containing valid RST to append to a document
- Return type:
str
- spt3g.core.g3logging.log_debug(*args, unit='Python')[source]
Log a message for the given unit at level LOG_DEBUG.
- spt3g.core.g3logging.log_error(*args, unit='Python')[source]
Log a message for the given unit at level LOG_ERROR.
- spt3g.core.g3logging.log_fatal(*args, unit='Python')[source]
Log a message for the given unit at level LOG_FATAL, and raise a RuntimeError.
- spt3g.core.g3logging.log_info(*args, unit='Python')[source]
Log a message for the given unit at level LOG_INFO.
- spt3g.core.g3logging.log_notice(*args, unit='Python')[source]
Log a message for the given unit at level LOG_NOTICE.
- spt3g.core.g3logging.log_trace(*args, unit='Python')[source]
Log a message for the given unit at level LOG_TRACE.
- spt3g.core.g3logging.log_warn(*args, unit='Python')[source]
Log a message for the given unit at level LOG_WARN.
- spt3g.core.g3logging.set_log_level(level, unit=None)[source]
Set log level to the requested level. If unit is not None, set the log level for the given logging unit only.
Example
core.set_log_level(core.G3LogLevel.LOG_DEBUG, 'GCPMuxDataDecoder')
- spt3g.core.timestreamextensions.concatenate_timestreams(ts_lst, ts_rounding_error=0.6, ts_interp_threshold=0)[source]
Concatenate G3Timestream or G3TimestreamMap objects together.
- Parameters:
ts_lst (list) – list of G3Timestream or G3TimestreamMap objects. Must all be the same type.
ts_rounding_error (float) – allowed error in timestream separation such that timestreams are contiguous, as a fraction of the sample rate. This should be 0 by default, but is 0.5 to allow for downsampler shifting, and then bumpted again to 0.6 to allow for floating-point errors in what 0.5 is.
ts_interp_threshold (float) – allowed timestream separation below which gaps between timestreams are interpolated to be made continuous
- Returns:
ts – The concatenation of the input list of objects
- Return type:
G3Timestream or G3TimestreamMap object
Decorators
Decorator functions for indicating any of the above types and/or modifying function behavior.
- @spt3g.core.g3decorators.cache_frame_data(type, **kwargs)[source]
This is a decorator for use with G3Modules written as functions. It enables a function to use cached values from other types of frames in the processing of a frame.
To make that confusing sentence clearer with an example, in a lot of cases we want to have a module that works on Scan frames, but have access to the BolometerProperties. This decorator allows you to specify the information to cache. This case looks like:
@core.cache_frame_data(type=core.G3FrameType.Scan, bolo_props='BolometerProperties') def FlagSomeStuff(frame, flag_key='Flags', bolo_props=None): pass
You specify the type of frame the function is operating on with the type argument. Any additional keyword arguments specifies information to cache and send to the function.
For the keyword args passed to the decorator having the format: Key = Value. Key specifies the name of the argument that we pass the infromation to in the decorated function. If the decorated function is called with Key as an argument it will overwrite the value specified in the decorator.
Value specifies the default path to look for the cached data. It will search all of the frames that do not have the frame type ‘type’ for a key with that value. This can be overridden when calling the decorated function.
- @spt3g.core.g3decorators.scan_func_cache_data[source]
This is a simple wrapper around cache_frame_data where the type argument has been set to core.G3FrameType.Scan.
- @spt3g.core.modconstruct.indexmod[source]
Mark argument as a processing module that can be found by automated documentation tools.
Example
@core.indexmod def dostuff(frame): dosomestuff()
- @spt3g.core.modconstruct.pipesegment[source]
Use as a decorator for a pre-assembled set of pipeline modules. Makes a pseudo-module consisting of several inputs. Use this to introspect the segment to find out what it does, or use
pipesegment_nodoc()if your module does anything complicated.Example
@core.pipesegment def standardfiltering( pipe, PolyOrder=4, MaskedHighPassEll=6000, Input='CalTimestreams', Output='FilteredTimestreams', ): pipe.Add(analysis.PolyFilter, PolyOrder=PolyOrder, Input=Input, Output='__Temp' + Output) pipe.Add(analysis.MaskedHighPass, MaskedHighPassEll=MaskedHighPassEll, Input='__Temp' + Output, Output=Output) def cleanup(frame): del frame['__Temp' + Output] pipe.Add(cleanup) pipe.Add(standardfiltering, PolyOrder=3)
- @spt3g.core.modconstruct.pipesegment_nodoc[source]
Use as a decorator for a pre-assembled set of pipeline modules. Makes a pseudo-module consisting of several inputs. Use this variant instead of
pipesegmentto avoid introspection if your pipeline does anything complicated.Example
@core.pipesegment_nodoc def standardfiltering( pipe, PolyOrder=4, MaskedHighPassEll=6000, Input='CalTimestreams', Output='FilteredTimestreams', ): pipe.Add(analysis.PolyFilter, PolyOrder=PolyOrder, Input=Input, Output='__Temp' + Output) pipe.Add(analysis.MaskedHighPass, MaskedHighPassEll=MaskedHighPassEll, Input='__Temp' + Output, Output=Output) def cleanup(frame): del frame['__Temp' + Output] pipe.Add(cleanup) pipe.Add(standardfiltering, PolyOrder=3)