The docstring for __calculate_sampling_design_state() (lines 1385-1399) describes 6 sampling design states but the implementation only handles SDS 1 and 2.
From docstring
- SDS1: every (k,t) cell has n>=2
- SDS2: every (k,t) cell has n==1
- SDS3: mixture of replication (some n==1 and some n>=2) and/or missing (k,t) cells
- SDS4: single design condition over time (K==1 with time present)
- SDS5: nested design (>=2 design vars) with asynchronous time coverage
- SDS6: unstructured fallback (no time OR cannot form (k,t) cells)
Actual implementation
if all(group_sizes>=2): out = 1
if all(group_sizes==1): out = 2
# Everything else returns 0
Impact
- Misleading documentation
- Silent failures for SDS 3-6 cases
- Incomplete feature
Fix Options
Option 1: Implement SDS 3-6 detection
Option 2: Update docs to state only SDS 1-2 supported and raise error for other cases
Files
The docstring for
__calculate_sampling_design_state()(lines 1385-1399) describes 6 sampling design states but the implementation only handles SDS 1 and 2.From docstring
Actual implementation
Impact
Fix Options
Option 1: Implement SDS 3-6 detection
Option 2: Update docs to state only SDS 1-2 supported and raise error for other cases
Files
analysis_dataset.py