diff --git a/connectomics/volume/decorators.py b/connectomics/volume/decorators.py index 64c2126..866c01d 100644 --- a/connectomics/volume/decorators.py +++ b/connectomics/volume/decorators.py @@ -902,6 +902,19 @@ def __init__(self, context_spec=context_spec) +@gin.register +class StdProjection(Projection): + """Reduces input TensorStore along given dimension via nanstd().""" + + def __init__(self, + projection_dim: int, + context_spec: Optional[MutableJsonSpec] = None): + super().__init__( + projection_fn=np.nanstd, + projection_dim=projection_dim, + context_spec=context_spec) + + @gin.register class SumProjection(Projection): """Reduces input TensorStore along given dimension via nansum()."""