Skip to content

Commit

Permalink
revert #229
Browse files Browse the repository at this point in the history
  • Loading branch information
jhkennedy committed Sep 14, 2023
1 parent 07090d5 commit 60666e5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 142 deletions.
2 changes: 0 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ dependencies:
- wheel
# For running
- gdal>=3
- h5netcdf
- hyp3lib=1.7.0
- isce2=2.6.1.dev7
- autorift=1.5.0
Expand All @@ -35,4 +34,3 @@ dependencies:
- pyproj
- requests
- scipy
- xarray
129 changes: 0 additions & 129 deletions hyp3_autorift/crop.py

This file was deleted.

13 changes: 4 additions & 9 deletions hyp3_autorift/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
from osgeo import gdal

from hyp3_autorift import geometry, image, io
from hyp3_autorift.crop import crop_netcdf_product

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -472,22 +471,18 @@ def process(reference: str, secondary: str, parameter_file: str = DEFAULT_PARAME
if netcdf_file is None:
raise Exception('Processing failed! Output netCDF file not found')

netcdf_file = Path(netcdf_file)
cropped_file = crop_netcdf_product(netcdf_file)
netcdf_file.unlink()

if naming_scheme == 'ITS_LIVE_PROD':
product_file = netcdf_file
product_file = Path(netcdf_file)
elif naming_scheme == 'ASF':
product_name = get_product_name(
reference, secondary, orbit_files=(reference_state_vec, secondary_state_vec),
pixel_spacing=parameter_info['xsize'],
)
product_file = Path(f'{product_name}.nc')
shutil.move(netcdf_file, str(product_file))
else:
product_file = netcdf_file.with_stem(f'{netcdf_file.stem}_IL_ASF_OD')

shutil.move(cropped_file, str(product_file))
product_file = Path(netcdf_file.replace('.nc', '_IL_ASF_OD.nc'))
shutil.move(netcdf_file, str(product_file))

with Dataset(product_file) as nc:
velocity = nc.variables['v']
Expand Down
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,13 @@
'boto3',
'botocore',
'gdal',
'h5netcdf',
'hyp3lib==1.7.0',
'matplotlib',
'netCDF4',
'numpy',
'pyproj',
'requests',
'scipy',
'xarray',
],

extras_require={
Expand Down

0 comments on commit 60666e5

Please sign in to comment.