Skip to content

Add Sentinel-2 to Harmonization tool #772

Closed
@kevinlacaille

Description

@kevinlacaille

Is your feature request related to a problem? Please describe.
Our SDK only allows data harmonization with Dove Classic, however the openAPI spec has added Sentinel-2 as a target sensor for harmonization.

I propose we add Sentinel-2 as an option for harmonization to the Orders API.

Describe the solution you'd like

Current harmonization tool:

def harmonize_tool() -> dict:
    '''Create the API spec representation of a harmonize tool.

    Currently, only "PS2" (Dove Classic) is supported as a target sensor, and
    it will transform only items captured by “PS2.SD” (Dove-R).
    '''
    return _tool('harmonize', {'target_sensor': 'PS2'})

Proposed solution:

def harmonize_tool(target_sensor: str) -> dict:
    '''Create the API spec representation of a harmonize tool.

    Currently, only "PS2" (Dove Classic) and "Sentinel-2" are supported as 
    target sensors. Dove-R can only be transformed by PS2 and Sentinel-2 can 
    only transform surface reflectance bundles for PSScene 
    (ie., analytic_8b_sr_udm2, analytic_sr_udm2).
    '''
    return _tool('harmonize', {'target_sensor': target_sensor})

I also suggest adding a test for hamonization in tests/unit/test_order_request.py:

@pytest.mark.parametrize("target_sensor", ["PS2", "Sentinel-2"])
def test_harmonization_tool(target_sensor):
    ht = order_request.harmonize_tool(target_sensor)
    expected = {'harmonize': {'target_sensor': target_sensor}}
    assert ht == expected

Additional context
I would double check the sensor harmonization compatibility on the Dev Center.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions