PyAutoCTI
PyAutoCTI: Open-Source Charge Transfer Inefficiency Calibration - Published in JOSS (2024)
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 1 DOI reference(s) in JOSS metadata -
✓Academic publication links
Links to: arxiv.org -
✓Committers with academic emails
2 of 5 committers (40.0%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords from Contributors
gravitational-lenses
astrophysics
cosmology
exoplanet
stats
statistical-analysis
probabilistic-programming
mcmc
graphical-models
bayesian-methods
Scientific Fields
Artificial Intelligence and Machine Learning
Computer Science -
62% confidence
Materials Science
Physical Sciences -
40% confidence
Engineering
Computer Science -
40% confidence
Last synced: 4 months ago
·
JSON representation
·
Repository
PyAutoCTI: Charge Transfer Inefficiency Calibration
Basic Info
- Host: GitHub
- Owner: Jammy2211
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://pyautocti.readthedocs.io/
- Size: 261 MB
Statistics
- Stars: 6
- Watchers: 1
- Forks: 3
- Open Issues: 7
- Releases: 6
Created about 7 years ago
· Last pushed about 1 year ago
Metadata Files
Readme
Contributing
License
Code of conduct
Citation
README.rst
PyAutoCTI: Charge Transfer Inefficiency Modeling
================================================
.. |nbsp| unicode:: 0xA0
:trim:
.. |RTD| image:: https://readthedocs.org/projects/pyautocti/badge/?version=latest
:target: https://pyautocti.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. |Tests| image:: https://github.com/Jammy2211/PyAutoCTI/actions/workflows/main.yml/badge.svg
:target: https://github.com/Jammy2211/PyAutoCTI/actions
.. |Build| image:: https://github.com/Jammy2211/PyAutoBuild/actions/workflows/release.yml/badge.svg
:target: https://github.com/Jammy2211/PyAutoBuild/actions
.. |code-style| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
.. |arXiv| image:: https://img.shields.io/badge/arXiv-1708.07377-blue
:target: https://arxiv.org/abs/0909.0507
|RTD| |Tests| |Build| |code-style| |arXiv|
`Installation Guide `_ |
`readthedocs `_ |
`What is CTI? `_
Charge Transfer Inefficiency, or CTI for short, is an effect that occurs when acquiring imaging data from
Charge Coupled Devices (CCDs). Due to radiation damage to the CCD's silicon lattice electrons are read-out inefficiently,
creating a characteristic trailing or smearing effect.
Here is an example of CTI in the Hubble space telescope, after decades of radiation damage:
.. image:: https://raw.githubusercontent.com/Jammy2211/PyAutoCTI/main/docs/overview/images/what_is_cti.png
:width: 600
:alt: Alternative text
**PyAutoCTI** makes it simple to calibrate a time-varying CTI model using in-orbit observations and correct CTI in
science imaging using this model.
**PyAutoCTI** development is centred around mitigating CTI for the Euclid space mission, which relies on the precise
measurement of galaxy shapes in order to map out the distribution of dark matter throughout the Universe via a
phenomena called weak gravitational lensing.
Getting Started
---------------
The following links are useful for new starters:
- `The PyAutoCTI readthedocs `_, which includes `an installation guide `_ and an overview of **PyAutoCTI**'s core features.
- `The autocti_workspace GitHub repository `_, which includes example scripts.
API Overview
------------
To model CTI, **PyAutoCTI** wraps the library **arCTIc** (https://github.com/jkeger/arctic).
CTI can be added to an image as follows:
.. code-block:: python
import autocti as ac
"""
Define a pre-cti image which **PyAutoCTI** adds CTI to.
"""
pre_cti_data_2d = ac.Array2D.no_mask(
values=[
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 10.0, 10.0, 10.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 10.0, 10.0, 10.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 10.0, 10.0, 10.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
],
pixel_scales=0.1,
)
"""
A clocker object is used to model CCD clocking, which includes customization such
as the properties of the read-out electronics.
"""
clocker_2d = ac.Clocker2D(parallel_roe=ac.ROE())
"""
CTI is caused by traps on the CCD's silicon lattice, for example traps which capture
electrons instantaneously.
"""
parallel_trap = ac.TrapInstantCapture(density=100.0, release_timescale=1.0)
"""
CTI also depends on how electrons fill each pixel in a CCD, therefore we define
the volume-filling properties of the CCD.
"""
parallel_ccd = ac.CCDPhase(
well_fill_power=0.58, well_notch_depth=0.0, full_well_depth=200000.0
)
"""
The data, traps and CCD properties are combined to clock the pre-CTI data and return the
post-CTI data.
"""
post_cti_data_2d = clocker_2d.add_cti(
data=pre_cti_data_2d,
parallel_trap_list=[parallel_trap],
parallel_ccd=parallel_ccd
)
"""
We can use PyAutoCTI's built in visualization library to plot the data with CTI.
"""
import autocti.plot as aplt
array_2d_plotter = aplt.Array2DPlotterarray=post_cti_data_2d)
array_2d_plotter.figure_2d()
With **PyAutoCTI**, you can begin calibrating a CTI model in minutes. The example below demonstrates a simple analysis
which fits a CTI model to charge injection imaging calibrate data (a form of data used to calibrate a CTI model)
.. code-block:: python
import autofit as af
import autocti as al
import autocti.plot as aplt
"""
Define the 2D shape of the charge injection image.
"""
shape_native = (30, 30)
"""
Define where the charge injection is on the data.
"""
regions_list = [(0, 25, serial_prescan[3], serial_overscan[2])]
"""
Setup the data layout which informs **PyAutoCTI** where information on
CTI is in the data.
"""
layout = ac.Layout2DCI(
shape_2d=shape_native,
region_list=regions_list,
)
"""
Load the charge injection image from fits.
"""
dataset = ac.ImagingCI.from_fits(
data_path=path.join(dataset_path, f"data.fits"),
noise_map_path=path.join(dataset_path, f"noise_map.fits"),
pre_cti_data_path=path.join(dataset_path, f"pre_cti_data.fits"),
layout=layout,
pixel_scales=0.1,
)
"""
Again define the clocker which models CCD clocking and read-out electronics.
"""
clocker_2d = ac.Clocker2D(parallel_roe=ac.ROE())
"""
Define the traps in the CTI model and customize the priors of their free parameters.
"""
trap = af.Model(ac.TrapInstantCapture)
trap.density = af.UniformPrior(lower_limit=0.0, upper_limit=20.0)
trap.release_timescale = af.UniformPrior(lower_limit=0.0, upper_limit=20.0)
"""
Define the CCD filling behaviour of the CTI, which is also part of the model and is
fitted for as free parameters.
"""
parallel_ccd = af.Model(ac.CCDPhase)
parallel_ccd.well_fill_power = af.UniformPrior(lower_limit=0.0, upper_limit=1.0)
parallel_ccd.well_notch_depth = 0.0
parallel_ccd.full_well_depth = 200000.0
"""
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 cti model to the data.
"""
analysis = ac.AnalysisImagingCI(dataset=dataset, clocker=clocker_2d)
"""
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 cti modeling and using **PyAutoCTI** is available by
`raising an issue on the GitHub issues page `_.
We also offer support on the **PyAutoCTI** `Slack channel `_, where we also provide the
latest updates on **PyAutoCTI**. 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
PyAutoCTI: Open-Source Charge Transfer Inefficiency Calibration
Published
June 01, 2024
Volume 9, Issue 98, Page 4904
Authors
Richard G. Hayes
Institute for Computational Cosmology, Stockton Rd, Durham DH1 3LE
Institute for Computational Cosmology, Stockton Rd, Durham DH1 3LE
Tags
astronomy instrumentation Charge Coupled Devices weak lensingCitation (CITATIONS.rst)
.. _references: Citations & References ====================== The bibtex entries for **PyAutoCTI** and its affiliated software packages can be found `here <https://github.com/Jammy2211/PyAutoCTI/blob/main/files/citations.bib>`_, with example text for citing **PyAutoCTI** in `.tex format here <https://github.com/Jammy2211/PyAutoCTI/blob/main/files/citations.tex>`_ format here and `.md format here <https://github.com/Jammy2211/PyAutoCTI/blob/main/files/citations.md>`_. As shown in the examples, we would greatly appreciate it if you mention **PyAutoCTI** by name and include a link to our GitHub page! **PyAutoCTI** 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 ``pyautocti``. 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
- Push event: 2
- Create event: 2
Last Year
- Push event: 2
- Create event: 2
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| James Nightingale | j****e@d****k | 1,363 |
| Richard Hayes | r****7@g****m | 499 |
| Jacob Kegerreis | j****s@d****k | 53 |
| dependabot[bot] | 4****] | 2 |
| Dan F-M | f****y@g****m | 1 |
Committer Domains (Top 20 + Academic)
durham.ac.uk: 2
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 19
- Total pull requests: 62
- Average time to close issues: 10 days
- Average time to close pull requests: 2 days
- Total issue authors: 3
- Total pull request authors: 5
- Average comments per issue: 2.26
- Average comments per pull request: 0.08
- Merged pull requests: 59
- Bot issues: 0
- Bot pull requests: 2
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: 5 minutes
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- Jammy2211 (13)
- mwcraig (4)
- jryon (1)
Pull Request Authors
- Jammy2211 (45)
- rhayes777 (19)
- jkeger (5)
- dependabot[bot] (2)
- dfm (2)
Top Labels
Issue Labels
Pull Request Labels
dependencies (2)
Packages
- Total packages: 2
-
Total downloads:
- pypi 560 last-month
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 0
(may contain duplicates) - Total versions: 56
- Total maintainers: 2
pypi.org: autocti-no-gsl
PyAutoCTI: Charge Transfer Inefficiency Modeling
- Homepage: https://github.com/jammy2211/PyAutoCTI
- Documentation: https://autocti-no-gsl.readthedocs.io/
- License: MIT License
-
Latest release: 2023.1.15.1
published almost 3 years ago
Rankings
Dependent packages count: 6.6%
Forks count: 19.6%
Average: 20.0%
Stargazers count: 23.3%
Dependent repos count: 30.6%
Maintainers (1)
Last synced:
4 months ago
pypi.org: autocti
PyAutoCTI: Charge Transfer Inefficiency Modeling
- Homepage: https://github.com/jammy2211/PyAutoCTI
- Documentation: https://autocti.readthedocs.io/
- License: MIT License
-
Latest release: 0.12.4
published about 5 years ago
Rankings
Dependent packages count: 10.1%
Downloads: 11.8%
Forks count: 19.1%
Stargazers count: 19.4%
Average: 25.5%
Dependent repos count: 67.1%
Last synced:
4 months ago
Dependencies
docs/requirements.txt
pypi
- astropy >=3.0.0
- autoarray ==2022.07.11.1
- autoconf ==2022.07.11.1
- autofit ==2022.07.11.1
- furo *
- matplotlib >=3.0.3
- myst-parser *
- numpy >=1.18.0
- numpydoc >=1.0.0
- pyprojroot ==0.2.0
- scikit-learn ==0.21.3
- sphinx ==4.0.0
- sphinx_copybutton *
- sphinx_design *
- sphinx_inline_tabs *
.github/workflows/draft-pdf.yml
actions
- actions/checkout v2 composite
- actions/upload-artifact v1 composite
- openjournals/openjournals-draft-action master composite
.github/workflows/main.yml
actions
- actions/checkout v2 composite
- actions/setup-python v2 composite
optional_requirements.txt
pypi
- jax ==0.3.1
- jaxlib ==0.3.0
- lacosmic *
- numba *
- pylops >=1.10.0,<=1.18.3
- pynufft *
- ultranest ==3.2.0
- zeus-mcmc ==2.4.1
requirements.txt
pypi
- arcticpy ==2.1
setup.py
pypi
