Skip to main content

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

If you would like to use the SED fitting feature, there are some additional packages you need to make sure that you have installed.

  • SEDFit
  • astroARIADNE

These two packages have to be installed separately outside of RADPy due to some technical issues. The instructions to download them are below. Please note that if you are a Windows user, you will need to run a virtual environment that runs a linux or OS distribution. I recommend using WSL. The two packages are have dependencies that are not compatible with Windows machines.

SEDFit:

The installation of this package requires a few additional packages that are unfortunately not compatible with windows machines. This will require the use of a virtual environment like WSL.

To install this package, use the following command:

pip install git+https://github.com/mkounkel/SEDFit.git

In addition, there are filter profiles that need to be downloaded and moved to the directory where SEDFit was just installed. The filter profiles needed are:

  • GAIA.GAIA3.G
  • GAIA.GAIA3.Gbp
  • GAIA.GAIA3.Grp
  • Hipparcos.Hipparcos.Hp_MvB
  • Johnson.H
  • Johnson.J
  • Johnson.K
  • Stromgren.b.dat
  • Stromgren.u.dat
  • Stromgren.v.dat
  • Stromgren.y.dat
  • TESS.TESS.Red.dat
  • TYCHO.TYCHO.B_MvB
  • TYCHO.TYCHO.V_MvB

You can download them from here: https://github.com/spaceashley/radpy/tree/main/radpy/data.

If you are interested in having RADPy pull photometry for your star for you, you need to install astroARIADNE. This package also has dependencies that are not compatible with Windows machines.

To install this package:

pip install astroariadne

With astroARIADNE, you also need to import the necessary dustmaps.

import dustmaps.sfd
dustmaps.sfd.fetch()

However, the dependencies that are required for this package aren't all up to date and/or aren't working properly. This is perfectly fine. You should be able to use the features of the SED fitter without an issue. If there is one, please submit an issue to the repo.

You can find more information about each package here:

SEDFit'

astroARIADNE

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>

For a tutorial on how to use the SED fitting feature, go here: <https://github.com/spaceashley/radpy/blob/main/tests/SED%20Fitting%20Tutorial.ipynb>

How to Cite

If you use RADPy in your research, please cite it through the following:

DOI

Official paper is coming soon.

In addition, if you decide to use the SED fitting feature and/or the photometry extraction for SED fitting, please cite the following as well:

astroARIADNE (if using the photometry extraction for SED fitting):

@ARTICLE{2022MNRAS.tmp..920V,
       author = {{Vines}, Jose I. and {Jenkins}, James S.},
        title = "{ARIADNE: Measuring accurate and precise stellar parameters through SED fitting}",
      journal = {\mnras},
     keywords = {stars:atmospheres, methods:data analysis, stars:fundamental parameters, Astrophysics - Solar and Stellar Astrophysics, Astrophysics - Earth and Planetary Astrophysics, Astrophysics - Instrumentation and Methods for Astrophysics},
         year = 2022,
        month = apr,
          doi = {10.1093/mnras/stac956},
archivePrefix = {arXiv},
       eprint = {2204.03769},
 primaryClass = {astro-ph.SR},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2022MNRAS.tmp..920V},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

SEDFit (if using the SED fitting feature):

@software{sedfit,
	author = {{Kounkel}, Marina},
	doi = {10.5281/zenodo.8076500},
	month = jun,
	publisher = {Zenodo},
	title = {SEDFit},
	url = {https://doi.org/10.5281/zenodo.8076500},
	year = 2023}

Contact

Logo Credits

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

Metadata

Release files for rsadpy 0.12.25

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rsadpy 0.12.25
File Size Uploaded
rsadpy-0.12.25.tar.gz 441.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rsadpy 0.12.25
File Interpreter ABI Platform
rsadpy-0.12.25-py3-none-any.whl Python 3 none any Details

Total release size: 869.1 kB

Release files / rsadpy-0.12.25.tar.gz

Download URL rsadpy-0.12.25.tar.gz
Size 441.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d75e203c45f77a8fc67abf8a56dfe2daf3338902a084c222238ab0231f68660a
BLAKE2b-256 checksum
How to use checksums
8710aae2af04c838adbecd9942b31353ea121e4f4952dcd8794ed5b9bafbfcb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.1 CPython/3.11.7 Windows/10

Release files / rsadpy-0.12.25-py3-none-any.whl

Download URL rsadpy-0.12.25-py3-none-any.whl
Size 427.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
608c3909534b715ba146e4ff4a62065ed45250a272ea260a4d2ff2dd926324ee
BLAKE2b-256 checksum
How to use checksums
b5c92700a63051f4d82dd51799bc8b34dfaafae098602fb47bd10b6814934de9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.1 CPython/3.11.7 Windows/10

Release history Release notifications | RSS feed

0.13.1

2 release files

0.13.0

2 release files

This release

0.12.25 This release

2 release files

0.12.9

2 release files

0.12.8

2 release files

0.12.7

2 release files

0.12.6

2 release files

0.12.5

2 release files

0.12.4

2 release files

0.12.3

2 release files

0.12.2

2 release files

0.12.1

2 release files

0.12.0

2 release files

0.11.4

2 release files

0.11.3

2 release files

0.11.2

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.7

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.11

2 release files

0.3.10

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page