-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sentinel1 denoising out of the class
- Loading branch information
agrouaze
committed
Dec 5, 2024
1 parent
1ed0703
commit af2b2ad
Showing
2 changed files
with
102 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import pdb | ||
|
||
from xsar.sentinel1_dataset import add_denoised | ||
import xsar | ||
import logging | ||
logging.basicConfig() | ||
logging.getLogger('xsar').setLevel(logging.DEBUG) | ||
logging.getLogger('xsar.utils').setLevel(logging.DEBUG) | ||
logging.getLogger('xsar.xml_parser').setLevel(logging.DEBUG) | ||
logging.captureWarnings(True) | ||
|
||
logger = logging.getLogger('xsar_test') | ||
logger.setLevel(logging.DEBUG) | ||
def test_denoising(): | ||
meta = xsar.Sentinel1Meta( | ||
xsar.get_test_file('S1A_IW_GRDH_1SDV_20170907T103020_20170907T103045_018268_01EB76_Z010.SAFE')) | ||
reader = xsar.Sentinel1Dataset(meta) | ||
ds = reader.datatree['measurement'].dataset #(meta)#.isel(pol=0, sample=slice(0, 100), line=slice(0, 100)) | ||
ds = ds[['longitude','latitude','incidence','sigma0_raw','nesz']] # removed calibrated / denoised variables for the test | ||
print('ds input',ds) | ||
# pdb.set_trace() | ||
ds = add_denoised(ds,sar_meta_denoised={'VV':False},dataset_recalibration=reader._dataset_recalibration) | ||
print('ds output',ds) | ||
return True | ||
|
||
if __name__ == '__main__': | ||
test_denoising() |