Skip to main content

MCMC fitting code for low temperature atmosphere spectra

Project description

UCDMCMC

Markov Chain Monte Carlo (MCMC) fitting code for low-temperature stars, brown dwarfs ande extrasolar planet spectra, tuned particularly to the near-infrared.

INSTALLATION NOTES

ucdmcmc can be installed from pip:

pip install ucdmcmc

or from git:

git clone
cd ucdmcmc
python -m setup.py install

It is recommended that you install in a conda environment to ensure the dependencies do not conflict with your own installation

conda create -n ucdmcmc python=3.13
conda activate ucdmcmc
pip install ucdmcmc

A check that this worked is that you can import ucdmcmc into python/jupyter noteobook, and that the ucdmcmc.MODEL_FOLDER points to the models folder that was downloaded

ucdmcmc uses the following extenal packages:

Optionally install SPLAT

To generate new model sets using the built-in generateModels() function, you will need to install SPLAT (note: this is not necessary for the other functionality in this code). SPLAT is not automatically installed on setup. The instructions are essentially the same:

git clone https://github.com/aburgasser/splat.git
cd splat
python -m pip install .

See https://github.com/aburgasser/splat for additional instructions

Models

ucdmcmc comes with a starter set of models that play nicely with the code. An extended set can be downloaded from https://spexarchive.coolstarlab.ucsd.edu/ucdmcmc/. These should be placed in the folder .ucdmcmc_models in your home directory (i.e., /home/adam/.ucdmcmc_models). If it doesn't already exist, this directory will be created on the first call to ucdmcmcm. In addition, models that exist on this website and not present in this folder will be downloaded directly when getModelSet()`` is called. You can also generate your own set of models using the generateModels()` function (see note above).

Spectra

ucdmcmc comes with a starter set of spectra for the following instruments:

User spectra can be read in using ucdmcmc.Spectrum("filename"). Files can be .fits, .csv, .txt (space-delimited), or .tsv (tab-delimited), and should have wavelength, flux, and uncertainty arrays. You can also read in these files separately and create a Spectrum object using the call ucdmcmc.Spectrum(wave=[wave array,flux=[flux array],noise=[uncertainty array]). See the docstring for ucdmcmc.Spectrum for further details.

Usage

[TBD examples]

Opacities

[TBD]

Citing the code

If you use this code in your research, publications, or presentatinos, please include the following citation:

Adam Burgasser. (2025). aburgasser/ucdmcmc (vXXX). Zenodo. https://doi.org/10.5281/zenodo.16923762

or in bibtex:

@software{adam_burgasser_2025_16921711,
	author = {Adam Burgasser},
	doi = {10.5281/zenodo.16921711},
	month = aug,
	publisher = {Zenodo},
	title = {aburgasser/ucdmcmc},
	url = {https://doi.org/10.5281/zenodo.16921711},
	version = {vXXX},
	year = 2025,
	bdsk-url-1 = {https://doi.org/10.5281/zenodo.16921711}}

where (vXXX) corresponds to the version used.

ucdmcmc and its antecedents has been used in the following publications:

Please let me know if you make use of the code so we can include your publication in the list above!

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

ucdmcmc-1.3.tar.gz (46.0 MB view details)

Uploaded Source

Built Distribution

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

ucdmcmc-1.3-py3-none-any.whl (45.3 MB view details)

Uploaded Python 3

File details

Details for the file ucdmcmc-1.3.tar.gz.

File metadata

  • Download URL: ucdmcmc-1.3.tar.gz
  • Upload date:
  • Size: 46.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ucdmcmc-1.3.tar.gz
Algorithm Hash digest
SHA256 36a26d9ab3663ae9a20e8f9e2f1878fa0a7f053f7627e804cadb4f98169ac6e4
MD5 2624dddde62236fb6ff90190561383b9
BLAKE2b-256 bea0db5e41bae8d44731076f23fed84ffd90f4306777c68f64365a855b86e9b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for ucdmcmc-1.3.tar.gz:

Publisher: pypi-publish.yml on aburgasser/ucdmcmc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ucdmcmc-1.3-py3-none-any.whl.

File metadata

  • Download URL: ucdmcmc-1.3-py3-none-any.whl
  • Upload date:
  • Size: 45.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ucdmcmc-1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4ab591c6f94d6caea847c2f571504a89468c18dfb1557bc075d9a9edef47590d
MD5 38accea76fa8d4997514337ccf497d5e
BLAKE2b-256 215a4bcbadeaf3de390b3fdaecacf5b72d2defa5db54dc6399be25e23d616a45

See more details on using hashes here.

Provenance

The following attestation bundles were made for ucdmcmc-1.3-py3-none-any.whl:

Publisher: pypi-publish.yml on aburgasser/ucdmcmc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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