Skip to main content

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

Project description

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 (in progress)

The remaining CHARA instruments SPICA and MYSTIC will be integrated soon.

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.

What is in this notebook?

This tutorial is designed to show the general steps of how a user should implement RADPy for your own angular diameter fitting needs for single stars. This notebook will go over how to install, how to import the necessary modules from RADPy, how to read in your data, how to perform initial fits, how to run the Monte Carlo simulations, how to calculate the remaining stellar parameters, and how to generate publicaiton ready plots. This tutorial is useful for those that want to step through every part of RADPy and see the outputs of each step.

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.3.9. Available on PyPI: https://pypi.org/project/rsadpy. Source code: https://github.com/spaceashley/radpy

Contact

Logo Credits

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rsadpy-0.5.0.tar.gz (230.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rsadpy-0.5.0-py3-none-any.whl (219.4 kB view details)

Uploaded Python 3

File details

Details for the file rsadpy-0.5.0.tar.gz.

File metadata

  • Download URL: rsadpy-0.5.0.tar.gz
  • Upload date:
  • Size: 230.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.7 Windows/10

File hashes

Hashes for rsadpy-0.5.0.tar.gz
Algorithm Hash digest
SHA256 5cc6e64536d92b7f7bcfdb9743a6a3820b008c1882dd7f4fe86c8742d6c081ab
MD5 c705f494de6c7e6d0fd28993a8f5c428
BLAKE2b-256 02dc9b3e5ba01eb2c4f5bd02edb3e357e805f9358a802ffe67f770f1822f342d

See more details on using hashes here.

File details

Details for the file rsadpy-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: rsadpy-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 219.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.7 Windows/10

File hashes

Hashes for rsadpy-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 837fedef13d85d2ce175609fd33ed0133ac248e0c97f034d2e985384edd7f8ae
MD5 852e8b393c55bc1823b9953d7157034d
BLAKE2b-256 67a47366c0295481ce6f8c49662b505ad97ce75a61ee121f617999a043d46d7b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page