PyAutoGalaxy
PyAutoGalaxy: Open-Source Multiwavelength Galaxy Structure & Morphology - Published in JOSS (2023)
Science Score: 100.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
Found .zenodo.json file -
✓DOI references
Found 5 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org -
✓Committers with academic emails
3 of 13 committers (23.1%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords from Contributors
gravitational-lenses
astronomy
astrophysics
physics
cosmology
lens-modeling
bayesian-inference
bayesian-methods
graphical-models
mcmc
Scientific Fields
Engineering
Computer Science -
60% confidence
Last synced: 4 months ago
·
JSON representation
·
Repository
PyAutoGalaxy: Open-Source Multiwavelength Galaxy Structure & Morphology
Basic Info
- Host: GitHub
- Owner: Jammy2211
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://pyautogalaxy.readthedocs.io/
- Size: 21.1 MB
Statistics
- Stars: 30
- Watchers: 4
- Forks: 14
- Open Issues: 19
- Releases: 17
Created about 6 years ago
· Last pushed 5 months ago
Metadata Files
Readme
Contributing
License
Code of conduct
Citation
README.rst
PyAutoGalaxy: Open-Source Multi Wavelength Galaxy Structure & Morphology
========================================================================
.. image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/Jammy2211/autogalaxy_workspace/HEAD
.. image:: https://readthedocs.org/projects/pyautogalaxy/badge/?version=latest
:target: https://pyautogalaxy.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://github.com/Jammy2211/PyAutoGalaxy/actions/workflows/main.yml/badge.svg
:target: https://github.com/Jammy2211/PyAutoGalaxy/actions
.. image:: https://github.com/Jammy2211/PyAutoBuild/actions/workflows/release.yml/badge.svg
:target: https://github.com/Jammy2211/PyAutoBuild/actions
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
.. image:: https://joss.theoj.org/papers/10.21105/joss.04475/status.svg
:target: https://doi.org/10.21105/joss.04475
.. image:: https://www.repostatus.org/badges/latest/active.svg
:target: https://www.repostatus.org/#active
:alt: Project Status: Active
.. image:: https://img.shields.io/pypi/pyversions/autogalaxy
:target: https://pypi.org/project/autogalaxy/
:alt: Python Versions
.. image:: https://img.shields.io/pypi/v/autogalaxy.svg
:target: https://pypi.org/project/autogalaxy/
:alt: PyPI Version
`Installation Guide `_ |
`readthedocs `_ |
`Introduction on Binder `_ |
`HowToGalaxy `_
**PyAutoGalaxy** is software for analysing the morphologies and structures of galaxies:
.. image:: https://github.com/Jammy2211/PyAutoGalaxy/blob/main/paper/hstcombined.png?raw=true
:target: https://github.com/Jammy2211/PyAutoGalaxy/blob/main/paper/hstcombined.png
**PyAutoGalaxy** also fits interferometer data from observatories such as ALMA:
.. image:: https://github.com/Jammy2211/PyAutoGalaxy/blob/main/paper/almacombined.png?raw=true
:target: https://github.com/Jammy2211/PyAutoGalaxy/blob/main/paper/almacombined.png
Getting Started
---------------
The following links are useful for new starters:
- `The PyAutoGalaxy readthedocs `_, which includes `an overview of PyAutoGalaxy's core features `_, `a new user starting guide `_ and `an installation guide `_.
- `The introduction Jupyter Notebook on Binder `_, where you can try **PyAutoGalaxy** in a web browser (without installation).
- `The autogalaxy_workspace GitHub repository `_, which includes example scripts and the `HowToGalaxy Jupyter notebook lectures `_ which give new users a step-by-step introduction to **PyAutoGalaxy**.
Core Aims
---------
**PyAutoGalaxy** has three core aims:
- **Model Complexity**: Fitting complex galaxy morphology models (e.g. Multi Gaussian Expansion, Shapelets, Ellipse Fitting, Irregular Meshes) that go beyond just simple Sersic fitting (which is supported too!).
- **Data Variety**: Support for many data types (e.g. CCD imaging, interferometry, multi-band imaging) which can be fitted independently or simultaneously.
- **Big Data**: Scaling automated analysis to extremely large datasets, using tools like an SQL database to build a scalable scientific workflow.
A complete overview of the software's aims is provided in our `Journal of Open Source Software paper `_.
API Overview
------------
Galaxy morphology calculations are performed in **PyAutoGalaaxy** by building a ``Plane`` object from ``LightProfile``
and ``Galaxy`` objects. Below, we create a simple galaxy system where a redshift 0.5
``Galaxy`` with an ``Sersic`` ``LightProfile`` representing a bulge and an ``Exponential`` ``LightProfile``
representing a disk.
.. code-block:: python
import autogalaxy as ag
import autogalaxy.plot as aplt
"""
To describe the galaxy emission two-dimensional grids of (y,x) Cartesian
coordinates are used.
"""
grid = ag.Grid2D.uniform(
shape_native=(50, 50),
pixel_scales=0.05, # <- Conversion from pixel units to arc-seconds.
)
"""
The galaxy has an elliptical sersic light profile representing its bulge.
"""
bulge=ag.lp.Sersic(
centre=(0.0, 0.0),
ell_comps=ag.convert.ell_comps_from(axis_ratio=0.9, angle=45.0),
intensity=1.0,
effective_radius=0.6,
sersic_index=3.0,
)
"""
The galaxy also has an elliptical exponential disk
"""
disk = ag.lp.Exponential(
centre=(0.0, 0.0),
ell_comps=ag.convert.ell_comps_from(axis_ratio=0.7, angle=30.0),
intensity=0.5,
effective_radius=1.6,
)
"""
We combine the above light profiles to compose a galaxy at redshift 1.0.
"""
galaxy = ag.Galaxy(redshift=1.0, bulge=bulge, disk=disk)
"""
We create a Plane, which in this example has just one galaxy but can
be extended for datasets with many galaxies.
"""
plane = ag.Plane(
galaxies=[galaxy],
)
"""
We can use the Grid2D and Plane to perform many calculations, for example
plotting the image of the galaxyed source.
"""
plane_plotter = aplt.GalaxiesPlotter(plane=plane, grid=grid)
plane_plotter.figures_2d(image=True)
With **PyAutoGalaxy**, you can begin modeling a galaxy in just a couple of minutes. The example below demonstrates a
simple analysis which fits a galaxy's light.
.. code-block:: python
import autofit as af
import autogalaxy as ag
import os
"""
Load Imaging data of the strong galaxy from the dataset folder of the workspace.
"""
dataset = ag.Imaging.from_fits(
data_path="/path/to/dataset/image.fits",
noise_map_path="/path/to/dataset/noise_map.fits",
psf_path="/path/to/dataset/psf.fits",
pixel_scales=0.1,
)
"""
Create a mask for the data, which we setup as a 3.0" circle.
"""
mask = ag.Mask2D.circular(
shape_native=dataset.shape_native,
pixel_scales=dataset.pixel_scales,
radius=3.0
)
"""
We model the galaxy using an Sersic LightProfile.
"""
light_profile = ag.lp.Sersic
"""
We next setup this profile as model components whose parameters are free & fitted for
by setting up a Galaxy as a Model.
"""
galaxy_model = af.Model(ag.Galaxy, redshift=1.0, light=light_profile)
model = af.Collection(galaxy=galaxy_model)
"""
We define the non-linear search used to fit the model to the data (in this case, Dynesty).
"""
search = af.Nautilus(name="search[example]", n_live=50)
"""
We next set up the `Analysis`, which contains the `log likelihood function` that the
non-linear search calls to fit the galaxy model to the data.
"""
analysis = ag.AnalysisImaging(dataset=masked_dataset)
"""
To perform the model-fit we pass the model and analysis to the search's fit method. This will
output results (e.g., dynesty samples, model parameters, visualization) to hard-disk.
"""
result = search.fit(model=model, analysis=analysis)
"""
The results contain information on the fit, for example the maximum likelihood
model from the Dynesty parameter space search.
"""
print(result.samples.max_log_likelihood())
Support
-------
Support for installation issues, help with galaxy modeling and using **PyAutoGalaxy** is available by
`raising an issue on the GitHub issues page `_.
We also offer support on the **PyAutoGalaxy** `Slack channel `_, where we also provide the
latest updates on **PyAutoGalaxy**. Slack is invitation-only, so if you'd like to join send
an `email `_ requesting an invite.
Owner
- Name: James Nightingale
- Login: Jammy2211
- Kind: user
- Location: Durham
- Company: Durham University
- Website: www.jamesnightingale.net
- Repositories: 16
- Profile: https://github.com/Jammy2211
Postdoc in Astronomy at Durham University Developer of PyAutoLens
JOSS Publication
PyAutoGalaxy: Open-Source Multiwavelength Galaxy Structure & Morphology
Published
January 27, 2023
Volume 8, Issue 81, Page 4475
Authors
Richard G. Hayes
Institute for Computational Cosmology, Stockton Rd, Durham DH1 3LE
Institute for Computational Cosmology, Stockton Rd, Durham DH1 3LE
Amy Etherington
Institute for Computational Cosmology, Stockton Rd, Durham DH1 3LE
Institute for Computational Cosmology, Stockton Rd, Durham DH1 3LE
XiaoYue Cao
National Astronomical Observatories, Chinese Academy of Sciences, 20A Datun Road, Chaoyang District, Beijing 100012, China
National Astronomical Observatories, Chinese Academy of Sciences, 20A Datun Road, Chaoyang District, Beijing 100012, China
Sam Lange
Institute for Computational Cosmology, Stockton Rd, Durham DH1 3LE
Institute for Computational Cosmology, Stockton Rd, Durham DH1 3LE
Ran Li
National Astronomical Observatories, Chinese Academy of Sciences, 20A Datun Road, Chaoyang District, Beijing 100012, China
National Astronomical Observatories, Chinese Academy of Sciences, 20A Datun Road, Chaoyang District, Beijing 100012, China
Tags
astronomy galaxy formation and evolution galaxy morphology interferometryCitation (CITATIONS.rst)
.. _references: Citations & References ====================== The bibtex entries for **PyAutoGalaxy** and its affiliated software packages can be found `here <https://github.com/Jammy2211/PyAutoGalaxy/blob/main/files/citations.bib>`_, with example text for citing **PyAutoGalaxy** in `.tex format here <https://github.com/Jammy2211/PyAutoGalaxy/blob/main/files/citations.tex>`_ format here and `.md format here <https://github.com/Jammy2211/PyAutoGalaxy/blob/main/files/citations.md>`_. As shown in the examples, we would greatly appreciate it if you mention **PyAutoGalaxy** by name and include a link to our GitHub page! **PyAutoGalaxy** is published in the `Journal of Open Source Software <https://joss.theoj.org/papers/10.21105/joss.02825#>`_ and its entry in the above .bib file is under the citation key ``pyautogalaxy``. You should also specify the non-linear search(es) you use in your analysis (e.g. Dynesty, Emcee, PySwarms, etc) in the main body of text, and delete as appropriate any packages your analysis did not use. The citations.bib file includes the citation key for all of these projects.
GitHub Events
Total
- Create event: 51
- Issues event: 1
- Release event: 4
- Watch event: 2
- Delete event: 54
- Issue comment event: 4
- Push event: 135
- Pull request review comment event: 15
- Pull request review event: 14
- Pull request event: 74
- Fork event: 1
Last Year
- Create event: 51
- Issues event: 1
- Release event: 4
- Watch event: 2
- Delete event: 54
- Issue comment event: 4
- Push event: 135
- Pull request review comment event: 15
- Pull request review event: 14
- Pull request event: 74
- Fork event: 1
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| James Nightingale | j****e@d****k | 2,253 |
| Richard | r****7@g****m | 154 |
| Jammy2211 | J****1@g****m | 57 |
| Jonathan Frawley | j****y@d****k | 14 |
| P. L. Lim | 2****m | 5 |
| samlange04 | s****4@g****m | 4 |
| Jack O'Donnell | j****l@g****m | 3 |
| Dan F-M | f****y@g****m | 2 |
| Felix Vecchi | f****i@L****l | 2 |
| amyetherington | a****5@h****m | 1 |
| Qiuhan He | 4****6 | 1 |
| Kassidy E. Kollmann | k****n@p****u | 1 |
| Kassidy Kollmann | k****y@k****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 43
- Total pull requests: 222
- Average time to close issues: 3 months
- Average time to close pull requests: 7 days
- Total issue authors: 6
- Total pull request authors: 12
- Average comments per issue: 1.86
- Average comments per pull request: 0.07
- Merged pull requests: 206
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 78
- Average time to close issues: N/A
- Average time to close pull requests: 5 days
- Issue authors: 1
- Pull request authors: 6
- Average comments per issue: 3.0
- Average comments per pull request: 0.03
- Merged pull requests: 68
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- pllim (24)
- Jammy2211 (9)
- alexandergagliano (4)
- sloneil (3)
- pedro-acunha (1)
- Conor-Larison (1)
Pull Request Authors
- Jammy2211 (215)
- rhayes777 (27)
- CKrawczyk (11)
- pllim (6)
- samlange04 (5)
- jonathanfrawley (4)
- jhod0 (3)
- dfm (2)
- kassidy-kollmann (2)
- felixvecchi (2)
- Chocologism (1)
- amyetherington (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 1,179 last-month
- Total dependent packages: 1
- Total dependent repositories: 1
- Total versions: 125
- Total maintainers: 2
pypi.org: autogalaxy
Open-Source Multi Wavelength Galaxy Structure & Morphology
- Homepage: https://github.com/Jammy2211/PyAutoGalaxy
- Documentation: https://autogalaxy.readthedocs.io/
- License: mit
-
Latest release: 0.20.2
published over 4 years ago
Rankings
Dependent packages count: 3.3%
Forks count: 11.0%
Downloads: 11.0%
Average: 12.0%
Stargazers count: 12.5%
Dependent repos count: 22.2%
Last synced:
4 months ago