pyblobby3d
Blobby3D is a tool to perform Bayesian inference for gas kinematics on emission line observations of galaxies using Integral Field Spectroscopy.
Science Score: 64.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
✓Committers with academic emails
2 of 10 committers (20.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.0%) to scientific vocabulary
Keywords
Repository
Blobby3D is a tool to perform Bayesian inference for gas kinematics on emission line observations of galaxies using Integral Field Spectroscopy.
Basic Info
Statistics
- Stars: 0
- Watchers: 1
- Forks: 3
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
Blobby3D
Blobby3D is designed to perform Bayesian inference for gas kinematics on emission line observations of galaxies using Integral Field Spectroscopy. The code was designed with two main goals in mind:
- To robustly infer gas kinematics for regularly rotating galaxies even if the gas profiles have significant substructure.
- Infer gas kinematic properties free from the effects of beam smearing. Where beam smearing is the effect of the observational seeing spatially blurring the gas profiles. This has significant effects on the observed gas kinematic properties - particularly the observed velocity dispersion.
You can find the motivation and first implementation of Blobby3D in this paper. Please cite this paper if you use the code in your research.
Getting Started
These instructions will get you a copy of the project up and running on your machine for testing purposes. If you have any trouble, feel free to contact Mathew Varidel at mathew.varidel@sydney.edu.au.
Prerequisites
Blobby3D is dependent on the following:
C++11\ DNest4 \ FFTW3 \ Python 3
FFTW3 will typically be available on scientific machines/clusters, so you will often have it or can get it relatively easily by contacting your system administrator.
DNest4 is a bespoke nested sampling algorithm written by Brendon Brewer. The code will need to be cloned from github in the usual manner. It is only available for Unix like machines.
Compilling
To install Blobby3D you need to clone this repository. You then need to compile the C++ code and install the python module.
To compile the C++ code type 'make' in the root directory. Note that this assumes that you have setup a DNEST4PATH environment variable as suggested in the DNEST4 paper. If you have not setup a DNEST4PATH environment variable, then simply make using the following:
make DNEST4_PATH=/path/to/DNest4
Where /path/to/DNest4 is the root directory for DNest4 on your machine.
To install the python module you can just do the following:
pip install pyblobby3d
The python module is then available using:
import pyblobby3d
Running Blobby3D on Examples
To get a feel for Blobby3D you will want to start with an example. There is an example using GAMA 485885 in the examples folder. The code can be run as an executable from within the subdirectory as follows:
../../Blobby3D -t 1 -f MODEL_OPTIONS
You may want to setup a terminal alias such that you can run the executable from anywhere on your machine. The -t 1 parameter sets the number of threads. Blobby3D is computationally expensive, so you should run it using multiple threads. The -f MODEL_OPTIONS tells the model to use the input hyperparameters that define the priors. Note the DNest4 parameters are defined in the OPTIONS file (see DNest4 documentation for that). Option files are provided in the examples.
There will be 3 output files created as Blobby3D runs:
sampleinfo.txt\ sample.txt\ samplerstate.txt
At any time during or after the run, you can perform postprocessing of the current Blobby3D output. An example postprocessing script is available in the examples folders labeled post.py.
Running Your Own Data
Blobby3D requires several files to run. Blobby3D accepts three data files typically named data.txt, var.txt, and metadata.txt. data.txt and var.txt correspond to the data and variance cubes. The file format is in whitespace separated values of (x, y, wavelength) represented in row-major format. The metadata format describes the data width given by whitespace separated (x, y, wavelength) bins, followed by minimum, maximum values of (x, y, wavelength). The minimum and maximum values are the left-most and right-most edge of each array. The data is assumed to be de-redshifted and centred about (0, 0) spatial coordinates.
There is also a MODEL_OPTIONS file that describes model parameterisation options. Note that the default parameterisation can be found in the paper. It has the following required parameters:
LSFFWHM : float\ Line Spread Function Full-Width Half-Maximum measured in Angstroms.\ PSFWEIGHT : floats\ Point Spread Function weights, which are the integral of each Gaussian and must sum to 1.\ PSFFWHM : floats\ Point Spread Function Full-Width Half-Maximum. The PSF is modelled a sum of concentric Gaussians described with pairs of (PSFWEIGHT, PSFFWHM).\ INC : float\ Inclination in radians. INC = 0 for a face-on galaxy.\ LINE : float, or list of floats\ Vacuum wavelength in Angstroms for a line to be modelled. This can also describe coupled lines, for example for the [NII] lines around H-alpha it can be described as:\ LINE 6583.1 6548.1 0.3333\ This couples the [NII] line at 6583.1 A to the line at 6548.1 A assuming that the second line has a known ratio to the first of 0.3333. Triplets (or more) can also be described by adding an extra pair similar to the second [NII] line above.
The following allows you to change the hyperparameters with defaults as set in the paper:
NMAX : int, default is 300\ Maximum number of blobs allowed\ NFIXED : int, default is False\ Whether the number of blobs is allowed to change. For example, if you want to run a single component model you can easily do NMAX as 1 and NFIXED as TRUE.\ WDMIN : float, default is 0.03\ Minimum width for typical distance (mur in the paper). Value is given in the same units as (x, y) coordinates.\ WDMAX: float, default is 30 in (x, y) units. Value is given in the same units as (x, y) coordinates.\ Minimum width for typical distance (mur in the paper).\ MEANFLUXMIN : float, default is 1E-3\ Minimum for typical flux of blobs (muF in the paper).\ MEANFLUXMAX : float, default is 1E3\ Maximum for typical flux of blobs (muF in the paper). RADIUSLIMMAX : float, default is 30 in (x, y) units\ Maximum value in the prior for the maximum allowed width for blobs.\ VSYSMAX : float, default is 150\ Symmetrical maximum allowed systemic velocity in km/s. VMAXMIN : float, default is 40\ Minimum allowed asymptotic velocity.\ VMAXMAX : float, default is 400\ Maximum allowed asymptotic velocity.\ VSLOPEMIN : float, default is 0.03\ Minimum allowed turnover radius. Value is given in the same units as (x, y) coordinates.\ VSLOPEMAX : float, default is 30\ Maximum allowed turnover radius. Value is given in the same units as (x, y) coordinates.\ VGAMMAMIN : float, default is 1\ Minimum allowed gammav shape parameter.\ VGAMMAMAX : float, default is 100\ Maximum allowed gammav shape parameter.\ VBETAMIN : float, default is -0.75\ Minimum allowed betav shape parameter.\ VBETAMAX : float, default is 0.75\ Maximum allowed betav shape parameter.\ VDISPORDER : int, default is 1\ Velocity dispersion profile polynomial order.\ LOGVDISP0MIN : float, default is 0.\ Log minimum velocity dispersion for zeroth order moment of the polynomial.\ LOGVDISP0MAX : float, default is log(200)\ Log maximum velocity dispersion for zeroth order moment of the polynomial.\ VDISPNSIGMA : float, default is 0.2\ Width for normal prior for the log velocity dispersion gradient.\
Owner
- Name: Mathew Varidel
- Login: SpaceOdyssey
- Kind: user
- Repositories: 2
- Profile: https://github.com/SpaceOdyssey
Citation (CITATION.cff)
cff-version: 0.0.1
message: "If you use this software, please cite it as below."
authors:
- family-names: Varidel
given-names: Mathew
orcid: https://orcid.org/0000-0002-1648-8317
title: "Blobby3D"
version: 0.0.1
doi: 10.1093/mnras/staa1272
date-released: 2023-03-30
GitHub Events
Total
- Fork event: 1
Last Year
- Fork event: 1
Committers
Last synced: about 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| mathewvaridel | m****7@g****m | 107 |
| Mathew Varidel | m****l@1****u | 29 |
| mvar0005 | m****5@l****) | 18 |
| mvar0005 | m****5@l****) | 14 |
| mvar0005 | m****5@l****) | 11 |
| mvar0005 | m****5@l****n | 7 |
| Mathew Varidel | m****7@h****m | 6 |
| Mathew Varidel | m****l@s****u | 1 |
| mvar0005 | m****5@l****u | 1 |
| mvar0005 | m****5@l****n | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 12 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 2
- Total maintainers: 1
pypi.org: pyblobby3d
Python package for Blobby3D
- Homepage: https://github.com/SpaceOdyssey/Blobby3D
- Documentation: https://pyblobby3d.readthedocs.io/
- License: MIT License
-
Latest release: 0.0.2
published over 4 years ago