cf.Field.cyclic

Field.cyclic(*identity, iscyclic=True, period=None, config={}, **filter_kwargs)[source]

Get or set the cyclicity of an axis.

New in version 1.0.

Parameters
identity, filter_kwargs: optional

Select the unique domain axis construct returned by f.domain_axis(*identity, **filter_kwargs). See domain_axis for details.

iscyclic: bool, optional

If False then the axis is set to be non-cyclic. By default the selected axis is set to be cyclic.

period: optional

The period for a dimension coordinate construct which spans the selected axis. May be any numeric scalar object that can be converted to a Data object (which includes numpy array and Data objects). The absolute value of period is used. If period has units then they must be compatible with those of the dimension coordinates, otherwise it is assumed to have the same units as the dimension coordinates.

config: dict, optional

Additional parameters for optimising the operation. See the code for details.

New in version 3.9.0.

axes: deprecated at version 3.0.0

Use the identity and filter_kwargs parameters instead.

Returns
set

The construct keys of the domain axes which were cyclic prior to the new setting, or the current cyclic domain axes if no axis was specified.

Examples

>>> f.cyclic()
set()
>>> f.cyclic('X', period=360)
set()
>>> f.cyclic()
{'domainaxis2'}
>>> f.cyclic('X', iscyclic=False)
{'domainaxis2'}
>>> f.cyclic()
set()