rsadpy

Robust Angular Diameters in Python

https://github.com/spaceashley/radpy

Science Score: 44.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
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.5%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Robust Angular Diameters in Python

Basic Info
  • Host: GitHub
  • Owner: spaceashley
  • License: gpl-3.0
  • Language: Jupyter Notebook
  • Default Branch: main
  • Homepage:
  • Size: 14.6 MB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created 8 months ago · Last pushed 6 months ago
Metadata Files
Readme License Citation

README.md

RADPy logo

Robust Angular Diameters in Python (RADPy)

Introduction to RADPy

RADPy stands for Robust Angular Diameters in Python. This was created to allow for multi-wavelength fits for angular diameters of stars measured with interferometric methods. Currently RADPy only has compatibility with the instruments on the Center for High Angular Resolution Astronomy (CHARA) Array. RADPy is currently configured for the following instruments at CHARA:

  • Classic/CLIMB
  • PAVO
  • VEGA
  • MIRC-X
  • MYSTIC
  • SPICA

To install:

Please read this section carefully!!

Simply use pip to install RADPy. Due to naming conflicts, to install RADPy, you must use "rsadpy".

pip install rsadpy

The installation should also install all necessary additional packages you need to run everything. Just in case, here is a list of all the necessary packages that aren't default: - lmfit - astropy - astroquery - gaiadr3-zeropoint

To test if the installation worked, import RADPy. If you did not get an error, you should be all set.

import radpy

NOTE:

to install, use rsadpy. Note the 's'

to import, use radpy. Note that there is no longer an s

What does RADPy actually do?

RADPy accepts data from an arbitrary number of beam-combiners from CHARA and allows the user to fit for the angular diameters (both uniform disk and limb-darkened disk) of single stars. With the fitted angular diameter, the user can also calculate the remaining fundamental stellar parameters of effective temperature, stellar luminosity, and radius of the measured star. The user can also plot the interferometric data with the chosen angular diameter fit (uniform or limb-darkened) which will output a publication ready plot. The plotting is highly customizable to the user's needs, including the type of model plotted, the ability to add the diameter in text to said plot, the binning of the data if the user choses to, and more.

The core of RADPy is a Monte Carlo simulation that involves a custom-built bracket bootstrapping within. A bracket in the realm of interferometry describes a set of data taken at the same time. Several instruments at CHARA span a wavelength range, so for every one observation, there is a span of data points to cover the wavelength ranges. RADPy automatically assigns a bracket number to the data once the data files are read in. The bracket numbers are assigned based on time-stamp and for PAVO, based on the same UCOORD and VCOORD measurements (as PAVO data does not output a time stamp).

For uniform disk diameters, RADPy will sample the wavelength of observations on a normal distribution. Within the bracket bootstrapping, the visibilities of each bracket chosen to be fit are sampled on a normal distribution. Using lmfit, the data are then fit using the uniform disk visibility squared equation. The final output results in a list of angular diameters calculated. The final uniform disk diameter is determined by taking the average of the uniform disk diameters and the error is determined by taking the mean absolute deviation.

For limb-darkened disk diameters, RADPy follows a similar structure to the uniform disk diameters. There are a few differences which I'll highlight below:

  • One needs the limb-darkening coefficient. To account for the limb-darkening coefficient, the tables of limb-darkening coefficients determined by Claret et al. 2011 are used. Based on the observation band, surface gravity (log g), and the effective temperature (Teff) of the star, RADPy will use an interpolated function based on the Claret tables to calculate the limb-darkening coefficient. If the effective temperature is less than 3500 and the surface gravity is between 3.5 and 5, the tables with the PHOENIX models are used. For all other stars, the tables with the ATLAS models are used.
  • For each iteration of the MC, RADPy calculates a limb-darkening coefficient for each band used (i.e. R-band). Within the bootstrapping, RADPy samples the limb-darkening coefficient on a normal distribution using 0.02 has the "error". The limb-darkening coefficient is then used in the full visibility squared equation and the limb-darkened angular diameter is fit.
  • To ensure RADPy is fitting for the optimal angular diameter, the limb-darkened disk fitting function will iterate until minimal change between the previous angular diameter and the one just calculated is seen. For robustness, the effective temperature is also checked as well. Minimal change is defined as being less than or equal to 0.05% difference.

Tutorial notebooks

For a tutorial for single stars, go here: https://github.com/spaceashley/radpy/blob/main/tests/SingleStarTutorial.ipynb

For a tutorial on how to use batch mode, go here: https://github.com/spaceashley/radpy/blob/main/tests/BatchModeTutorial.ipynb

How to Cite

If you use RADPy in your research, please cite it as:

Elliott, Ashley (2025). RADPy: Robust Angular Diameters in Python. Version 0.5.3. Available on PyPI: https://pypi.org/project/rsadpy. Source code: https://github.com/spaceashley/radpy

Contact

  • Ashley Elliott (aelli76@lsu.edu)

Logo Credits

Logo was designed by Emelly Tiburcio from LSU and made digital by Olivia Crowell from LSU.

Owner

  • Login: spaceashley
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use RADPy in your research, please cite it using the following metadata."
title: "RADPy: Robust Angular Diameters in Python"
version: "0.5.3"
date-released: "2025-08-2025"
authors:
  - family-names: "Elliott"
    given-names: "Ashley"
    orcid: "https://orcid.org/0009-0008-3869-5510"
    affiliation: "Louisiana State University"
license: "GNU General Public License v3"
repository-code: "https://github.com/spaceashley/radpy"
repository-artifact: "https://pypi.org/project/rsadpy"
keywords:
  -interferometry
  -CHARA
  -angular diameters
  -fundamental stellar properties

GitHub Events

Total
  • Push event: 27
  • Public event: 1
  • Pull request event: 2
Last Year
  • Push event: 27
  • Public event: 1
  • Pull request event: 2

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 1,448 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 22
  • Total maintainers: 1
pypi.org: rsadpy

Robust Angular Diameters in Python: an angular diameter fitting routine for multi-wavelength interferometric data

  • Versions: 22
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1,448 Last month
Rankings
Dependent packages count: 8.9%
Average: 29.5%
Dependent repos count: 50.1%
Maintainers (1)
Last synced: 6 months ago

Dependencies

poetry.lock pypi
  • asteval 1.0.6
  • astropy 6.1.6
  • astropy-iers-data 0.2025.6.30.0.39.40
  • astroquery 0.4.6
  • asttokens 3.0.0
  • atomicwrites 1.4.1
  • attrs 25.3.0
  • backports-tarfile 1.2.0
  • beautifulsoup4 4.13.4
  • certifi 2025.6.15
  • cffi 1.17.1
  • charset-normalizer 3.4.2
  • colorama 0.4.6
  • comm 0.2.2
  • contourpy 1.3.2
  • corner 2.2.2
  • cryptography 45.0.5
  • cycler 0.12.1
  • decorator 5.2.1
  • exceptiongroup 1.3.0
  • executing 2.2.0
  • fonttools 4.58.5
  • future 1.0.0
  • gaiadr3-zeropoint 0.0.4
  • html5lib 1.1
  • idna 3.10
  • importlib-metadata 8.7.0
  • iniconfig 2.1.0
  • ipympl 0.9.4
  • ipython 8.37.0
  • ipython-genutils 0.2.0
  • ipywidgets 8.1.7
  • jaraco-classes 3.4.0
  • jaraco-context 6.0.1
  • jaraco-functools 4.2.1
  • jedi 0.19.2
  • jeepney 0.9.0
  • jupyterlab-widgets 3.0.15
  • keyring 25.6.0
  • kiwisolver 1.4.8
  • lmfit 1.2.2
  • matplotlib 3.9.2
  • matplotlib-inline 0.1.7
  • more-itertools 10.7.0
  • numpy 1.25.2
  • packaging 25.0
  • pandas 2.2.2
  • parso 0.8.4
  • pexpect 4.9.0
  • pillow 11.3.0
  • pluggy 1.6.0
  • prompt-toolkit 3.0.51
  • ptyprocess 0.7.0
  • pure-eval 0.2.3
  • py 1.11.0
  • pycparser 2.22
  • pyerfa 2.0.1.5
  • pygments 2.19.2
  • pyparsing 3.2.3
  • pytest 7.1.2
  • python-dateutil 2.9.0.post0
  • pytz 2025.2
  • pyvo 1.7
  • pywin32-ctypes 0.2.3
  • pyyaml 6.0.2
  • requests 2.32.4
  • scipy 1.10.0
  • secretstorage 3.3.3
  • six 1.17.0
  • soupsieve 2.7
  • stack-data 0.6.3
  • tomli 2.2.1
  • traitlets 5.14.3
  • typing-extensions 4.14.0
  • tzdata 2025.2
  • uncertainties 3.1.7
  • urllib3 2.5.0
  • wcwidth 0.2.13
  • webencodings 0.5.1
  • widgetsnbextension 4.0.14
  • zipp 3.23.0
pyproject.toml pypi
  • astropy 6.1.6
  • astroquery 0.4.6
  • corner 2.2.2
  • gaiadr3-zeropoint ^0.0.4
  • ipympl 0.9.4
  • lmfit 1.2.2
  • matplotlib 3.9.2
  • numpy 1.25.2
  • pandas 2.2.2
  • pytest 7.1.2
  • python >=3.10,<3.12
  • scipy 1.10.0
  • uncertainties 3.1.7
requirements.txt pypi
  • astropy *
  • astroquery *
  • corner *
  • gaiadr3-zeropoint *
  • ipympl *
  • lmfit *
  • matplotlib *
  • numpy *
  • pandas *
  • scipy *