Skip to content

[Bug]: Clarification on class-3 based smoothing in deforestation/afforestation workflow #1040

Description

@Uttkarsh779

Pre-submission Checklist

  • I searched existing issues and this is not a duplicate
  • I can reproduce this bug consistently

Component / Module

Layer Generation (/computing)

Severity

Low (minor inconvenience, workaround exists)

Bug Description

While reviewing change_deforestation_afforestation(), I noticed that the temporal smoothing step explicitly operates on raw class 3.

Based on the current class mapping, raw class 3 corresponds to a water category, while raw class 6 corresponds to tree/forest.

Since this logic exists inside the deforestation/afforestation workflow, I would like clarification regarding the intended behavior.

Steps to Reproduce

cond1 = (
before.eq(3)
.And(middle.neq(3))
.And(after.eq(3))
)

cond2 = (
before.neq(3)
.And(middle.eq(3))
.And(after.neq(3))
)

middle = middle.where(cond1, 3)
middle = middle.where(cond2, before)

Class Reference

Raw Class Meaning
3 Water (Kharif + Rabi)
6 Tree / Forest

Expected Behavior

In change_deforestation_afforestation() the temporal smoothing is expected to be of classes related to forest.

Actual Behavior

The smoothing logic restores or removes occurrences of raw class 3.

Because this occurs before the later remapping and transition analysis steps, I would like to confirm whether the focus on class 3 is intentional.

Environment Details

OS: Ubuntu 24.04 (WSL2)
Python version: 3.10.x (Conda environment)
Django version: 5.2.x
Celery version: 5.6.x
Deployment: Local development environment (WSL2 + Docker services)

Logs / Error Messages

No response

Screenshots / Screen Recordings

No response

Additional Context

This issue is being opened for clarification and validation by the developer/scientific team.

During review of the change detection pipeline, I observed the behavior described above. I am not asserting that this is a confirmed bug. The goal of this issue is to determine whether the current behavior is intentional, documented, and scientifically correct, or whether it represents an implementation issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    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