Skip to content

Check for statefulness of xarray accessor #241

@BSchilperoort

Description

@BSchilperoort

See pydata/xarray#3268 for background info.

We should ensure we don't store anything on self., but instead use @property for things such as;

        self.attrs = xarray_obj.attrs


        # alias commonly used variables
        self.x = xarray_obj.x
        self.nx = self.x.size
        self.time = xarray_obj.time
        self.nt = self.time.size


        # None if doesn't exist
        self.st = xarray_obj.get("st")
        self.ast = xarray_obj.get("ast")
        self.rst = xarray_obj.get("rst")
        self.rast = xarray_obj.get("rast")


        self.acquisitiontime_fw = xarray_obj.get("userAcquisitionTimeFW")
        self.acquisitiontime_bw = xarray_obj.get("userAcquisitionTimeBW")

And store any modifications on the xarray object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions