Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Distribution / packaging
build/
dist/
*.egg-info/
*.egg
.eggs/

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Virtual environments
venv/
env/
.venv/
.conda/
*.env

# PyInstaller
*.spec

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
coverage.xml
*.cover
*.py,cover

# Jupyter Notebook
.ipynb_checkpoints

# Pyre type checker
.pyre/

# VSCode and IDEs
.vscode/
.idea/

# macOS and Windows crap
.DS_Store
Thumbs.db
45 changes: 28 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,54 @@
# RITSAR
Synthetic Aperture Radar (SAR) Image Processing Toolbox for Python

Before installation, please make sure you have the following:
- SciPy. Comes with many Python distributions such as Enthought Canopy, Python(x,y), and Anaconda. Development was done using the Anaconda distribution which can be downloaded for free from https://store.continuum.io/cshop/anaconda/.
- OpenCV (optional). If using the omega-k algorithm, OpenCV is required. Instructions for installing OpenCV for Python can be found at https://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_setup/py_table_of_contents_setup/py_table_of_contents_setup.html#py-table-of-content-setup.
- Spectral (optional). Needed to interface with .envi files. Can be installed from the command line using
I modified this repo's source code for use with python 3.12 using anaconda. The original repo is here https://github.com/dm6718/RITSAR

I didn't modify the reference sheet as I tried to preserve the parameter data format as best I could.

$ pip install spectral
## Pre-requisite Installation

alternatively, Spectral can be downloaded here: http://www.spectralpython.net/

To get started, first make sure your SciPy and NumPy libraries are up-to-date. With Anaconda, this can be done by typing the following into a terminal or command prompt:
$ conda create -n ritsar python=3.12

$ conda update conda
$ conda activate ritsar

$ conda update anaconda
$ conda install ipython

Once you've ensured the required libraries are up-to-date, download the zip file and extract it to a directory that from here on will be referred to as \<ritsar_dir\>. Open up a command line or terminal and type:
Optional (Verify ipython is using conda):

$ cd \<ritsar_dir\>
$ ipython -c "import sys; print(sys.executable)"

$ python setup.py install
$ pip install scipy opencv-python spectral numpy matplotlib

- SciPy. Comes with many Python distributions such as Enthought Canopy, Python(x,y), and Anaconda. Development was done using the Anaconda distribution which can be downloaded for free from https://store.continuum.io/cshop/anaconda/.
- OpenCV (optional). If using the omega-k algorithm, OpenCV is required. Instructions for installing OpenCV for Python can be found at https://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_setup/py_table_of_contents_setup/py_table_of_contents_setup.html#py-table-of-content-setup.
- Spectral (optional). Needed to interface with .envi files. Can be installed from the command line using

## Clone this repo to your computer

$ cd ./RITSAR

$ pip install .

then...

$ cd ./examples

You can execute these with python

$ python FFBPmp_demo.py

You can also use pylab if you like that kind of thing

$ ipython --pylab

From the ipython console, type:

In [1]: %run FFBPmp_demo

In [2]: import matplotlib.pylab as plt; plt.show()

or run any other demo. Alternatively, you can open up the demos in an IDE of your choice to experiment with the different options available.
or run any other demo. And you can open up the demos in an IDE of your choice to experiment with the different options available.

Current capabilities include modeling the phase history for a collection of point targets as well as processing phase histories using the polar format, omega-k, backprojection, digitally spotlighted backprojection, fast-factorized backprojection, and fast-factorized backprojection with multi-processing algorithms. Autofocusing can also be performed using the Phase Gradient Algorithm. The current version can interface with AFRL Gotcha and DIRSIG data as well as a data set provided by Sandia.

Data included with this toolset includes a small subset of the AFRL Gotcha data provided by AFRL/SNA. The full data set can be downloaded separately from https://www.sdms.afrl.af.mil/index.php?collection=gotcha after user registration. Also included is a single dataset from Sandia National Labs.

If anyone is interested in collaborating, I can be reached at [email protected]. Ideas on how to incorporate a GUI would be greatly appreciated.
The original code owner wanted to develop a GUI, so reach out to them at [email protected] if interested (but that email was posted 9 years ago).
2 changes: 2 additions & 0 deletions examples/AutoFocus_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,5 @@
#Output image
plt.figure()
imgTools.imshow(img_af, dB_scale = [-45,0])

plt.show()
2 changes: 1 addition & 1 deletion examples/DSBP_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@

plt.subplot(1,2,1)
plt.title('Full Backprojection')
imgTools.imshow(img_bp[177-N/2:177+N/2,202-N/2:202+N/2], dB_scale = [-25,0], extent = extent)
imgTools.imshow(img_bp[177-N//2:177+N//2,202-N//2:202+N//2], dB_scale = [-25,0], extent = extent)
plt.xlabel('meters'); plt.ylabel('meters')

plt.subplot(1,2,2)
Expand Down
2 changes: 1 addition & 1 deletion examples/dictionaries/SARplatform.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def plat_dict(aux = []):
R_c = pos[npulses/2]
else:
R_c = np.mean(
pos[npulses/2-1:npulses/2+1],
pos[npulses//2-1:npulses//2+1],
axis = 0)

#Coherent integration angle
Expand Down
Binary file removed examples/dictionaries/SARplatform.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions examples/dictionaries/SARplatformUHF.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ def plat_dict(aux = []):

#Vector to scene center at synthetic aperture center
if np.mod(npulses,2)>0:
R_c = pos[npulses/2]
R_c = pos[npulses//2]
else:
R_c = np.mean(
pos[npulses/2-1:npulses/2+1],
pos[npulses//2-1:npulses//2+1],
axis = 0)

#Coherent integration angle
Expand Down
Binary file removed examples/dictionaries/SARplatformUHF.pyc
Binary file not shown.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
Loading