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.1.tar.gz (45.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.2.1-py3-none-any.whl (44.2 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ucdmcmc-1.2.1.tar.gz
  • Upload date:
  • Size: 45.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.2.1.tar.gz
Algorithm Hash digest
SHA256 bbed70aa3fb29d40d1299758fc5a6b0799fdb83fa651ba3c22cae1376f30a5e5
MD5 caf7e3c5a4063bc7ef8a0c5d956267c6
BLAKE2b-256 e8aa8e39b985644d1ba36a3b94c2aea22ff90a5730a099e12572c4f4919ceb7e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ucdmcmc-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 44.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6bdc3fdc5f177dc804cad8c7e014c968bc429fce15f71751d86155091eb68547
MD5 c62ff9ac30b748a84415699fef3d0e22
BLAKE2b-256 8dabc0a2ad26f83eaa76c00b2cbf0d2a4cd0fda099e624863de86cfbde9d71c4

See more details on using hashes here.

Provenance

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