Skip to content

Commit 0088942

Browse files
Liang YuGitHub Enterprise
authored andcommitted
Rename pybind_nisar to nisar (#790)
* rename pybind_nisar directories to nisar * replace pybind_nisar with nisar in code
1 parent 9bea470 commit 0088942

File tree

102 files changed

+269
-269
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+269
-269
lines changed

python/packages/CMakeLists.txt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Python packages
22
set(PYPKGS
33
isce3
4-
pybind_nisar
4+
nisar
55
)
66

77
foreach(PYPKG ${PYPKGS})
@@ -19,23 +19,23 @@ set(WORKFLOWS
1919
)
2020
foreach(WORKFLOW ${WORKFLOWS})
2121
install(DIRECTORY ${PROJECT_SOURCE_DIR}/share/nisar/${WORKFLOW}
22-
DESTINATION ${ISCE_PACKAGESDIR}/pybind_nisar/workflows)
22+
DESTINATION ${ISCE_PACKAGESDIR}/nisar/workflows)
2323
endforeach()
2424

2525

2626
# XXX Make workflow scripts executable.
2727
set (list_of_exe
28-
pybind_nisar/workflows/crossmul.py
29-
pybind_nisar/workflows/focus.py
30-
pybind_nisar/workflows/geo2rdr.py
31-
pybind_nisar/workflows/geocode_insar.py
32-
pybind_nisar/workflows/gcov.py
33-
pybind_nisar/workflows/gslc.py
34-
pybind_nisar/workflows/insar.py
35-
pybind_nisar/workflows/rdr2geo.py
36-
pybind_nisar/workflows/resample_slc.py
37-
pybind_nisar/workflows/stage_dem.py
38-
pybind_nisar/workflows/unwrap.py)
28+
nisar/workflows/crossmul.py
29+
nisar/workflows/focus.py
30+
nisar/workflows/geo2rdr.py
31+
nisar/workflows/geocode_insar.py
32+
nisar/workflows/gcov.py
33+
nisar/workflows/gslc.py
34+
nisar/workflows/insar.py
35+
nisar/workflows/rdr2geo.py
36+
nisar/workflows/resample_slc.py
37+
nisar/workflows/stage_dem.py
38+
nisar/workflows/unwrap.py)
3939

4040
foreach(script ${list_of_exe})
4141
install(
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

python/packages/pybind_nisar/products/readers/Base/Base.py renamed to python/packages/nisar/products/readers/Base/Base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def parsePolarizations(self):
199199
'''
200200
Parse HDF5 and identify polarization channels available for each frequency.
201201
'''
202-
from pybind_nisar.h5 import bytestring, extractWithIterator
202+
from nisar.h5 import bytestring, extractWithIterator
203203

204204
try:
205205
frequencyList = self.frequencies

python/packages/pybind_nisar/products/readers/Base/Identification.py renamed to python/packages/nisar/products/readers/Base/Identification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def unpack(self, h5grp):
5151
'''
5252
Populate self with hdf5 group.
5353
'''
54-
from pybind_nisar.h5 import extractScalar, bytestring, extractWithIterator
54+
from nisar.h5 import extractScalar, bytestring, extractWithIterator
5555
import pybind_isce3 as isce3
5656

5757
self.missionId = extractScalar(h5grp, 'missionId',
File renamed without changes.

python/packages/pybind_nisar/products/readers/GenericProduct/GenericProduct.py renamed to python/packages/nisar/products/readers/GenericProduct/GenericProduct.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
import h5py
66
import pyre
77
import journal
8-
from pybind_nisar.products.readers.Base import (Base,
9-
get_hdf5_file_root_path)
8+
from nisar.products.readers.Base import (Base,
9+
get_hdf5_file_root_path)
1010

1111

12-
def open_product(filename: str,
12+
def open_product(filename: str,
1313
product_type: str = None,
1414
root_path: str = None):
1515
'''
@@ -24,7 +24,7 @@ def open_product(filename: str,
2424
product_type : str
2525
Preliminary product type to check (e.g. RCOV) before default product type list
2626
root_path : str
27-
Preliminary root path to check (e.g., XSAR, PSAR) before default root
27+
Preliminary root path to check (e.g., XSAR, PSAR) before default root
2828
path list
2929
3030
Returns
@@ -38,7 +38,7 @@ def open_product(filename: str,
3838
root_path = get_hdf5_file_root_path(
3939
filename, root_path = root_path)
4040
product_type = get_hdf5_file_product_type(
41-
filename, product_type = product_type,
41+
filename, product_type = product_type,
4242
root_path = root_path)
4343

4444
# set keyword arguments for class constructors
@@ -49,12 +49,12 @@ def open_product(filename: str,
4949
if (product_type == 'RSLC'):
5050

5151
# return SLC obj
52-
from pybind_nisar.products.readers import SLC
52+
from nisar.products.readers import SLC
5353
return SLC(**kwargs)
5454
elif (product_type == 'RRSD'):
5555

5656
# return Raw obj
57-
from pybind_nisar.products.readers.Raw import Raw
57+
from nisar.products.readers.Raw import Raw
5858
return Raw(**kwargs)
5959

6060
kwargs['_ProductType'] = product_type
@@ -63,7 +63,7 @@ def open_product(filename: str,
6363
return GenericProduct(**kwargs)
6464

6565

66-
def get_hdf5_file_product_type(filename,
66+
def get_hdf5_file_product_type(filename,
6767
product_type = None,
6868
root_path = None):
6969
'''
@@ -78,24 +78,24 @@ def get_hdf5_file_product_type(filename,
7878
product_type : str
7979
Preliminary product type to check (e.g. RCOV) before default product type list
8080
root_path : str
81-
Preliminary root path to check (e.g., XSAR, PSAR) before default root
81+
Preliminary root path to check (e.g., XSAR, PSAR) before default root
8282
path list
8383
8484
Returns
8585
-------
8686
str
8787
Product type
8888
'''
89-
# The product group name should be "RSLC" per the spec.
90-
# However, early sample products used "SLC" instead.
89+
# The product group name should be "RSLC" per the spec.
90+
# However, early sample products used "SLC" instead.
9191
# We maintain compatibility with both options.
9292

9393
error_channel = journal.error('get_hdf5_file_product_type')
9494

9595
if root_path is None:
9696
root_path = get_hdf5_file_root_path(
9797
filename, root_path=root_path)
98-
NISAR_PRODUCT_LIST = ['RRSD', 'RSLC', 'SLC', 'RIFG', 'RUNW',
98+
NISAR_PRODUCT_LIST = ['RRSD', 'RSLC', 'SLC', 'RIFG', 'RUNW',
9999
'GCOV', 'GSLC', 'GUNW']
100100
with h5py.File(filename, 'r', libver='latest', swmr=True) as f:
101101
g = f[root_path]
@@ -126,13 +126,13 @@ def __init__(self, **kwds):
126126

127127
###Read base product information like Identification
128128
super().__init__(**kwds)
129-
129+
130130
# Set error channel
131131
self.error_channel = journal.error('GenericProduct')
132132

133133
self.identification.productType = \
134134
get_hdf5_file_product_type(
135-
self.filename,
135+
self.filename,
136136
product_type = self.productType,
137137
root_path = self.RootPath)
138138

@@ -143,13 +143,13 @@ def __init__(self, **kwds):
143143
f' but {self.productType} found')
144144

145145
self.parsePolarizations()
146-
146+
147147

148148
def parsePolarizations(self):
149149
'''
150150
Parse HDF5 and identify polarization channels available for each frequency.
151151
'''
152-
from pybind_nisar.h5 import bytestring, extractWithIterator
152+
from nisar.h5 import bytestring, extractWithIterator
153153

154154
try:
155155
frequencyList = self.frequencies

0 commit comments

Comments
 (0)