beta-sgp

Scaled Gradient Projection (SGP) algorithm with beta divergence

https://github.com/yash-10/beta-sgp

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (4.7%) to scientific vocabulary

Keywords

astronomy image-restoration mathematical-optimization
Last synced: 6 months ago · JSON representation ·

Repository

Scaled Gradient Projection (SGP) algorithm with beta divergence

Basic Info
  • Host: GitHub
  • Owner: Yash-10
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 24.2 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 2
  • Releases: 0
Topics
astronomy image-restoration mathematical-optimization
Created about 4 years ago · Last pushed over 2 years ago
Metadata Files
Readme License Citation

README.md

Scaled Gradient Projection with $\beta$-divergence

This repository contains the code implementation accompanying the paper: $\beta$-SGP: Scaled Gradient Projection with $\beta$-divergence for astronomical image restoration. It is aimed at single-image deconvolution of astronomical images with a known Point Spread Function.

Repository overview

Click here to see the folder structure

.
├── images
│   ├── crowded_flux_subdiv.png
│   ├── crowded_subdiv_example.png
│   ├── ellipticity_ratio.png
│   ├── flux_frac_diff.png
│   ├── flux_line_plot_stamps.png
│   ├── flux_subdiv.png
│   ├── fwhm_ratio.png
│   └── subdiv_example.png
├── pre_processing
│   └── Automation.cl
├── psf
│   ├── get_psf_coeffs.bash
│   ├── psf_calculate.py
│   ├── psfccfbrd210048_1_1.bin.txt
│   ├── psfccfbrd210048_1_1_img.fits
│   ├── psf_estimation.bash
│   ├── psf_mat_show.ipynb
│   ├── psf_steps_and_params.MD
│   └── README.md
├── README.md
├── restoration
│   ├── application_sgp_star_stamps.py
│   ├── application_sgp_subdivisions.py
│   ├── flux_conserve_proj.py
│   ├── sgp.py
│   ├── simulated_test
│   │   ├── data
│   │   │   ├── NGC7027_255.mat
│   │   │   └── satellite_25500.mat
│   │   └── __init__.py
│   ├── simulation_test_sgp.py
│   ├── tests.py
│   └── utils.py
└── results
    ├── CROWDED_SUBDIV_BEST_BETA_INIT.npy
    ├── CROWDED_SUBDIV_EXEC_TIME_BETA.npy
    ├── CROWDED_SUBDIV_EXEC_TIME.npy
    ├── CROWDED_SUBDIV_NUM_ITERS_BETA.npy
    ├── CROWDED_SUBDIV_NUM_ITERS.npy
    ├── CROWDED_SUBDIV_ORIGCAT_2sigma.csv
    ├── CROWDED_SUBDIV_ORIGCAT.csv
    ├── CROWDED_SUBDIV_ORIG_FLUX_BETA.npy
    ├── CROWDED_SUBDIV_ORIG_FLUX.npy
    ├── CROWDED_SUBDIV_ORIGIMG_BETA.fits
    ├── CROWDED_SUBDIV_ORIGIMG.fits
    ├── CROWDED_SUBDIV_RESTORED_BETA.csv
    ├── CROWDED_SUBDIV_RESTORED_BETA_MATCHED.csv
    ├── CROWDED_SUBDIV_RESTORED.csv
    ├── CROWDED_SUBDIV_RESTORED_FLUX_BETA.npy
    ├── CROWDED_SUBDIV_RESTORED_FLUX.npy
    ├── CROWDED_SUBDIV_RESTOREDIMG_BETA.fits
    ├── CROWDED_SUBDIV_RESTOREDIMG.fits
    ├── CROWDED_SUBDIV_RESTORED_MATCHED.csv
    ├── ELLIPTICITY_RATIO_BETA.npy
    ├── ELLIPTICITY_RATIO.npy
    ├── EXEC_TIME_BETA.npy
    ├── EXEC_TIME.npy
    ├── FLUX_FRACTIONAL_DIFFERENCE_BETA.npy
    ├── FLUX_FRACTIONAL_DIFFERENCE.npy
    ├── FWHM_RATIO_BETA.npy
    ├── FWHM_RATIO.npy
    ├── NUM_ITERS_BETA.npy
    ├── NUM_ITERS.npy
    ├── ORIG_FLUX_BETA.npy
    ├── ORIG_FLUX.npy
    ├── RESTORED_FLUX_BETA.npy
    ├── RESTORED_FLUX.npy
    ├── SUBDIV_BEST_BETA_INIT.npy
    ├── SUBDIV_EXEC_TIME_BETA.npy
    ├── SUBDIV_EXEC_TIME.npy
    ├── SUBDIV_NUM_ITERS_BETA.npy
    ├── SUBDIV_NUM_ITERS.npy
    ├── SUBDIV_ORIGCAT.csv
    ├── SUBDIV_ORIG_FLUX_BETA.npy
    ├── SUBDIV_ORIG_FLUX.npy
    ├── SUBDIV_ORIGIMG_BETA.fits
    ├── SUBDIV_ORIGIMG.fits
    ├── SUBDIV_RESTORED_BETA.csv
    ├── SUBDIV_RESTORED_BETA_MATCHED.csv
    ├── SUBDIV_RESTORED.csv
    ├── SUBDIV_RESTORED_FLUX_BETA.npy
    ├── SUBDIV_RESTORED_FLUX.npy
    ├── SUBDIV_RESTOREDIMG_BETA.fits
    ├── SUBDIV_RESTOREDIMG.fits
    ├── SUBDIV_RESTORED_MATCHED.csv
    ├── WD_RADIAL_PROFILE_DISTANCE_BETA.npy
    └── WD_RADIAL_PROFILE_DISTANCE.npy

7 directories

restoration

  • sgp.py contains implementation for SGP with both, $\beta$-divergence and KL divergence.
  • flux_conserve_proj.py contains the flux conservation projection step code.
  • utils.py contains some utility functions helpful in other scripts.

psf

  • psf_calculate.py calculates the PSF matrix from the parameters output by the getpsf code from the DIAPL package1.

results

  • It contains the results in form of metrics embedded in .npy files.

pre_processing

  • Automation.cl is the IRAF automation script we generated to automate the process of removing bad bias and flat frames during the image reduction process.

Example results and comparison

Example 1: Example 1

Example 2: Example 2

Data availability

The M13 globular cluster I-filter images (244 images) are available here. These images have gone through the usual image reduction pipeline.

Bugs or issues

If you find something not working as expected or anything weird, we would like to know and improve it! Please feel free to open an issue in the issue tracker or send an email to yashgondhalekar567@gmail.com

Code motivation

The code presented here is a modified, Python implementation of the Matlab SGP code of the SGP-dec software3. However, it is not the official Python implementation of SGP-dec.

Code status

Currently, SGP and $\beta$-SGP are written in two separate functions, despite both having many commonalities. This could make it slightly cumbersome to switch between both functions, especially given that $\beta$-SGP generalizes SGP. Future versions would focus on improving this aspect.

References

[1] Pych, W. Difference Image Analysis Package (DIAPL).

[2] Efficient deconvolution methods for astronomical imaging: algorithms and IDL-GPU codes M. Prato, R. Cavicchioli, L. Zanni, P. Boccacci, M. Bertero A&A 539 A133 (2012) DOI: 10.1051/0004-6361/201118681

[3] Bonettini S., Zanella R., Zanni L., 2009, InvPr, 25, 015002. doi:10.1088/0266-5611/25/1/015002

License and copyright

The code here is licensed under the MIT License.

Copyright (c) 2023 Yash Gondhalekar

Owner

  • Name: Yash Gondhalekar
  • Login: Yash-10
  • Kind: user
  • Location: India

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: >-
  β-SGP: Scaled Gradient Projection algorithm using
  β-divergence
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Yash
    family-names: Gondhalekar
    email: yashgondhalekar567@gmail.com
identifiers:
  - type: url
    value: 'https://github.com/Yash-10/beta-sgp'
    description: >-
      Scaled Gradient Projection (SGP) algorithm with beta
      divergence
repository-code: 'https://github.com/Yash-10/beta-sgp'
url: 'https://github.com/Yash-10/beta-sgp'
repository: 'https://ascl.net/code/v/3605'
abstract: >-
  β-SGP deconvolves an astronomical image with a known Point
  Spread Function, providing a means for the restoration of
  telescopic images due to issues ranging from atmospheric
  turbulence to instrumental aberrations. The code supports
  improved astrometry, deblending of overlapping sources,
  faint source detection, identification of point sources
  near bright extended objects, and other tasks. β-SGP
  generalizes the Scaled Gradient Projection (SGP) image
  deconvolution algorithm using β-divergence as a loss
  function to restore distorted stellar shapes.
keywords:
  - image-restoration
  - mathematical-optimization
license: MIT
commit: 3400aa444efecca8b12db37a9ba94d0e5c451805
version: 0.1.0

GitHub Events

Total
Last Year

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 138
  • Total Committers: 1
  • Avg Commits per committer: 138.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Yash Gondhalekar y****7@g****m 138

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 2
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Yash-10 (2)
Pull Request Authors
Top Labels
Issue Labels
enhancement (1)
Pull Request Labels