rsadpy


Namersadpy JSON
Version 0.3.11 PyPI version JSON
download
home_pagehttps://github.com/spaceashley/radpy.git
SummaryRobust Angular Diameters in Python: an angular diameter fitting routine for multi-wavelength interferometric data
upload_time2025-07-18 21:27:04
maintainerNone
docs_urlNone
authorAshley Elliott
requires_python<3.12,>=3.10
licenseGPL-3.0
keywords interferometry angular diameters chara
VCS
bugtrack_url
requirements numpy scipy lmfit matplotlib astropy astroquery gaiadr3-zeropoint pandas corner ipympl
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![RADPy logo](https://github.com/spaceashley/radpy/blob/main/radpynobglogo.png)


# 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
- Ashley Elliott (aelli76@lsu.edu)

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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/spaceashley/radpy.git",
    "name": "rsadpy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.12,>=3.10",
    "maintainer_email": null,
    "keywords": "interferometry, angular diameters, CHARA",
    "author": "Ashley Elliott",
    "author_email": "elliottashleya99@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/3a/17/037875b99c1b7db8cf653500846d9b81c6784d5dcd88624de9be96a694f2/rsadpy-0.3.11.tar.gz",
    "platform": null,
    "description": "![RADPy logo](https://github.com/spaceashley/radpy/blob/main/radpynobglogo.png)\n\n\n# Robust Angular Diameters in Python (`RADPy`)\n## Introduction to `RADPy`\n\n`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:\n\n- Classic/CLIMB\n- PAVO\n- VEGA\n- MIRC-X (in progress)\n\nThe remaining CHARA instruments SPICA and MYSTIC will be integrated soon.\n\n## To install:\n\n**Please read this section carefully!!**\n\nSimply use pip to install `RADPy`. Due to naming conflicts, to install `RADPy`, you must use \"rsadpy\". \n\n`pip install rsadpy`\n\nThe 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:\n- `lmfit`\n- `astropy`\n- `astroquery`\n- `gaiadr3-zeropoint`\n\nTo test if the installation worked, import `RADPy`. If you did not get an error, you should be all set. \n\n`import radpy`\n\nNOTE: \n\nto _install_, use rsadpy. **Note the 's'**\n\nto _import_, use radpy. **Note that there is no longer an s**\n\n## What does `RADPy` actually do?\n`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. \n\nThe 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). \n\nFor 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. \n\nFor limb-darkened disk diameters, `RADPy` follows a similar structure to the uniform disk diameters. There are a few differences which I'll highlight below:\n\n- 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.\n- 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.\n- 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.\n\n## What is in this notebook?\n\nThis 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. \n\n## How to Cite\n\nIf you use `RADPy` in your research, please cite it as:\n\nElliott, 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\n\n## Contact\n- Ashley Elliott (aelli76@lsu.edu)\n\n## Logo Credits\nLogo was designed by Emelly Tiburcio from LSU and made digital by Olivia Crowell from LSU.\n",
    "bugtrack_url": null,
    "license": "GPL-3.0",
    "summary": "Robust Angular Diameters in Python: an angular diameter fitting routine for multi-wavelength interferometric data",
    "version": "0.3.11",
    "project_urls": {
        "Homepage": "https://github.com/spaceashley/radpy.git",
        "Repository": "https://github.com/spaceashley/radpy.git",
        "repository": "https://github.com/spaceashley/radpy.git"
    },
    "split_keywords": [
        "interferometry",
        " angular diameters",
        " chara"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a41f9947b68ce0c2b95f5eae4a6f150b6639720707a30a0f6bb8e1949afc1bc9",
                "md5": "834585c7f1094d6401ef9196527df435",
                "sha256": "7e3b072d2668aba48aa01854093cf1f3df92c56d58b97f76bbfa263e66450f35"
            },
            "downloads": -1,
            "filename": "rsadpy-0.3.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "834585c7f1094d6401ef9196527df435",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.12,>=3.10",
            "size": 217605,
            "upload_time": "2025-07-18T21:27:02",
            "upload_time_iso_8601": "2025-07-18T21:27:02.644775Z",
            "url": "https://files.pythonhosted.org/packages/a4/1f/9947b68ce0c2b95f5eae4a6f150b6639720707a30a0f6bb8e1949afc1bc9/rsadpy-0.3.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3a17037875b99c1b7db8cf653500846d9b81c6784d5dcd88624de9be96a694f2",
                "md5": "0db86394917618f2d01296e3e56b68f7",
                "sha256": "61f88c0e5ec451bca00cde76c9aba4490a9e01e8cfd3e41171729ce0918f72a4"
            },
            "downloads": -1,
            "filename": "rsadpy-0.3.11.tar.gz",
            "has_sig": false,
            "md5_digest": "0db86394917618f2d01296e3e56b68f7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.12,>=3.10",
            "size": 228893,
            "upload_time": "2025-07-18T21:27:04",
            "upload_time_iso_8601": "2025-07-18T21:27:04.619341Z",
            "url": "https://files.pythonhosted.org/packages/3a/17/037875b99c1b7db8cf653500846d9b81c6784d5dcd88624de9be96a694f2/rsadpy-0.3.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-18 21:27:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "spaceashley",
    "github_project": "radpy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "scipy",
            "specs": []
        },
        {
            "name": "lmfit",
            "specs": []
        },
        {
            "name": "matplotlib",
            "specs": []
        },
        {
            "name": "astropy",
            "specs": []
        },
        {
            "name": "astroquery",
            "specs": []
        },
        {
            "name": "gaiadr3-zeropoint",
            "specs": []
        },
        {
            "name": "pandas",
            "specs": []
        },
        {
            "name": "corner",
            "specs": []
        },
        {
            "name": "ipympl",
            "specs": []
        }
    ],
    "lcname": "rsadpy"
}
        
Elapsed time: 1.56362s