nasa / opera-sds-pcm

Observational Products for End-Users from Remote Sensing Analysis (OPERA)
Apache License 2.0
16 stars 12 forks source link

[New Feature]: Create tool to truncate sensing times in the DISP-S1 historical database json #889

Closed philipjyoon closed 4 months ago

philipjyoon commented 4 months ago

Checked for duplicates

Yes - I've already checked

Alternatives considered

Yes - and alternatives don't suffice

Related problems

No response

Describe the feature request

https://opera-ancillaries.s3.us-west-2.amazonaws.com/opera-disp-s1-consistent-burst-ids-with-datetimes.json is a file delivered to PCM by ADT. It currently contains sensing times before July 1, 2016; however the project has decided not to process CSLC data before July 1, 2016. Therefore the sensing_time_list field in that file needs to be truncated accordingly.

For now, write a quick python code to do this. In future, we will expand this script as a CLI tool that performs other modifications to that file.

philipjyoon commented 4 months ago

Completed

philipjyoon commented 4 months ago

Before python tools/disp_s1_burst_db_tool.py time_range 2010-01-01T00:00:00 2016-07-01T00:00:00 | grep Sensing | wc -l 1669

python tools/disp_s1_burst_db_tool.py time_range 2016-07-01T00:00:00 2025-01-01T00:00:00 | grep Sensing | wc -l 225135

Truncation tool output. It says it truncated 1669 entries python tools/truncate_disp_s1_burst_db.py opera-disp-s1-consistent-burst-ids-with-datetimes.json | grep Truncating | wc -l 1669

After truncation python tools/disp_s1_burst_db_tool.py time_range 2010-01-01T00:00:00 2016-07-01T00:00:00 | grep Sensing | wc -l 0

python tools/disp_s1_burst_db_tool.py time_range 2016-07-01T00:00:00 2025-01-01T00:00:00 | grep Sensing | wc -l
225135