Helical features

Helical features encode dates as cyclic seasonal variables. A date is mapped onto a circle so that the end and start of a year are close; sine/cosine coordinates and optional higher harmonic orders become model features. Class/context interaction rasters can multiply these time features with class or context support.

Minimum inputs

InputRequired?Notes
Target datesYesText, CSV date field or raster folder with dates in filenames.
Reference gridRequired for raster outputsDefines extent, CRS and raster size.
Class/soft stack or hard label rasterOnly for class × time stacksSoft stacks are normalized; hard labels are converted to one-hot class bands.
Context stackOnly for context × time stacksMust match the reference grid.

Important controls

ControlEffect
Feature modeSelects annual, semiannual, quarterly or multi-harmonic features.
Max harmonic KMaximum harmonic order K; harmonic k=1 is annual, k=2 semiannual, and larger k captures shorter cycles.
Year length and phase originDefine the cyclic year and the day used as phase zero.
Include linear time / date spacingAdds trend and temporal-spacing columns.
Write raster / interaction stacksCreates constant time-feature rasters and optional class/context × time interactions.

Core calculations

φ = ((DOY − d0) / Y) mod 1

Seasonal phase: Y is the year length and d0 is the phase-origin day. Phase wraps at the year boundary, so late December and early January remain close.

sk = sin(2π · k · φ)
ck = cos(2π · k · φ),   k = 1,…,K

Harmonics: k=1 is annual, k=2 semiannual. Higher k values add shorter cyclic components.

tnorm = elapsed_days / max(total_span_days, 1)

Linear time: optional trend feature between 0 and 1. It complements cyclic features when long-term progression matters.

class-timec,k(x) = supportc(x) · sk
class-timec,k+K(x) = supportc(x) · ck

Interactions: class/context support gates the seasonal feature spatially. Only bounded temporal features are multiplied into interaction rasters; raw year/day metadata remain in the CSV.

Main outputs

OutputMeaning
Helical feature CSVOne row per date with phase, sine/cosine harmonics and optional linear/spacing columns.
Helical raster stacksConstant-value time-feature rasters for raster-only modelling pipelines.
Class × helical stacksClass support multiplied by bounded time features.
Context × helical stacksContext bands multiplied by bounded time features.
Report JSONMode, date count, harmonic count and generated paths.