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.2.tar.gz (44.9 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.2-py3-none-any.whl (44.1 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ucdmcmc-1.2.tar.gz
Algorithm Hash digest
SHA256 09d480d29bd22e440902529b2dfe1ceeef801d50fc341dfe2013b23187409d0e
MD5 8fe76de1e2573ee5618a51235fbfce24
BLAKE2b-256 8f8ef8ab29bc14cacee575e1988905ae834fa29fed4c7ef3e5c7458b02444dcc

See more details on using hashes here.

Provenance

The following attestation bundles were made for ucdmcmc-1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: ucdmcmc-1.2-py3-none-any.whl
  • Upload date:
  • Size: 44.1 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dbcf751762f034ed28c941f75b94018399ff7d29e59288654b8509f505848264
MD5 7e0e7ae95a4ac9d2b157ef0756b188ac
BLAKE2b-256 cb434f75adfd623d296d0028e21bb3198bca0fb1e599771b5b37c5cac6f13561

See more details on using hashes here.

Provenance

The following attestation bundles were made for ucdmcmc-1.2-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