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.4.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.4-py3-none-any.whl (45.3 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ucdmcmc-1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 9970c276dc32e523b181193edd8804dd68ca032b027c68d5462b40ff01eb57dd
MD5 717c4c703347b5e3b521a580a8599947
BLAKE2b-256 bd5106a5a741bde0c29cb960fc2e8ab447d2aee8d5c8a9669b5d0ed06b2a0471

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ucdmcmc-1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bcdd5211f5347273a17fcd730244a95c608d840ca415edf4fc072055e5765651
MD5 b87abcfb1110b87a6a33b87b0f7b7841
BLAKE2b-256 f388bf0dfd23263aa2ca71f4ab99487b71572b5d9f758389c69a55c29a82f709

See more details on using hashes here.

Provenance

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