Skip to main content

Extragalactic Kinematics is an exciting tool that utilizes a kernel (e.g., Gaussian) to broaden models in velocity space, resulting in a highly accurate and detailed output. With this repository, you can easily apply kinematical broadening to your models and gain valuable insights into extragalactic kinematics.

Project description

PyKinematicalBroadening

email: antineutrinomuon@gmail.com, jean@astro.up.pt

last stable version: 0.0.9

github repository: PyKinematicalBroadening

© Copyright ®

J.G. - Jean Gomes



RESUME

PyKinematicalBroadening is a Python repository for Extragalactic Kinematics that performs kinematical broadening of a spectrum by convolving it with a kernel in velocity space, which results in a broadened model. This code provides a function called 'broadening,' which uses a Gaussian kernel for convolution. However, in addition to the Gaussian kernel, the code can also use Gauss-Hermite kernels for convolution.

The Gauss-Hermite kernels provide a more general perspective than the Gaussian kernels, as they can account for higher-order velocity moments of the broadening process. The code defines the width and mean velocity of the kernel with vd_sigma and vc0_gals, respectively, while the number of points for the kernel is set with the Ni_Gauss parameter. The output spectrum is defined at wavelengths lambda_s and is returned as fluxes_s. The fill_val parameter defines the value to use for regions outside of the original wavelength range, and verbosity controls the level of detail of console output.

In summary, the PyKinematicalBroadening code provides a flexible way to apply kinematical broadening to a spectrum using Gaussian or Gauss-Hermite kernels. The code reads in a test spectrum, interpolates it onto a set of equally spaced wavelength values, and loops over different velocity dispersions to call the 'broadening' function, which broadens the spectrum and plots the results.


INSTALLATION

You can easily install PyKinematicalBroadening by using pip - PyPI - The Python Package Index:

pip install PyKinematicalBroadening


or by using a generated conda repository https://anaconda.org/neutrinomuon/PyKinematicalBroadening:

conda install -c neutrinomuon PyKinematicalBroadening


OBS.: Linux, OS-X ad Windows pre-compilations available in conda.

You can also clone the repository and install by yourself in your machine:

git clone https://github.com/neutrinomuon/PyKinematicalBroadening
python setup.py install

EXAMPLE

Example of the test spectrum test_spectrum.spec successively broadened by different velocity dispersions in [km/s]. The code is not optimized for cpu speed, but it shows the principle of how it works.


STRUCTURE

PyKinematicalBroadening
├── MANIFEST.in
├── dist
│   ├── PyKinematicalBroadening-0.0.3.tar.gz
│   ├── PyKinematicalBroadening-0.0.5.tar.gz
│   ├── PyKinematicalBroadening-0.0.6.tar.gz
│   └── PyKinematicalBroadening-0.0.4.tar.gz
├── README.md
├── figures
│   ├── KinematicalBroadening.png
│   └── cc_logo.png
├── PyKinematicalBroadening.egg-info
│   ├── PKG-INFO
│   ├── dependency_links.txt
│   ├── SOURCES.txt
│   ├── top_level.txt
│   └── requires.txt
├── LICENSE.txt
├── setup.py
├── tutorials
│   ├── .ipynb_checkpoints
│   │   └── Example 1 - Kinematical Broadening-checkpoint.ipynb
│   └── Example 1 - Kinematical Broadening.ipynb
├── pykinematicalbroadening
│   ├── win-32
│   │   └── pykinematicalbroadening-0.0.5-py39_0.tar.bz2
│   ├── linux-armv7l
│   │   └── pykinematicalbroadening-0.0.5-py39_0.tar.bz2
│   ├── linux-armv6l
│   │   ├── .projectignore
│   │   └── pykinematicalbroadening-0.0.5-py39_0.tar.bz2
│   ├── linux-s390x
│   │   └── pykinematicalbroadening-0.0.5-py39_0.tar.bz2
│   ├── linux-ppc64
│   │   └── pykinematicalbroadening-0.0.5-py39_0.tar.bz2
│   ├── linux-aarch64
│   │   ├── .projectignore
│   │   └── pykinematicalbroadening-0.0.5-py39_0.tar.bz2
│   ├── linux-32
│   │   ├── .projectignore
│   │   └── pykinematicalbroadening-0.0.5-py39_0.tar.bz2
│   ├── linux-64
│   │   ├── .projectignore
│   │   └── pykinematicalbroadening-0.0.5-py39_0.tar.bz2
│   ├── osx-64
│   │   └── pykinematicalbroadening-0.0.5-py39_0.tar.bz2
│   ├── meta.yaml
│   ├── win-64
│   │   └── pykinematicalbroadening-0.0.5-py39_0.tar.bz2
│   ├── README.txt
│   ├── linux-ppc64le
│   │   └── pykinematicalbroadening-0.0.5-py39_0.tar.bz2
│   └── osx-arm64
│       └── pykinematicalbroadening-0.0.5-py39_0.tar.bz2
├── Pykinematicalbroadening.egg-info
│   ├── PKG-INFO
│   ├── dependency_links.txt
│   ├── SOURCES.txt
│   ├── top_level.txt
│   └── requires.txt
├── src
│   └── python
│       ├── __pycache__
│       ├── test_spectrum.spec
│       ├── __init__.py
│       └── PyKinematicalBroadening.py
├── version.txt
└── build
    └── lib
        ├── Pykinematicalbroadening
        └── PyKinematicalBroadening

26 directories, 44 files

REFERENCES


LICENSE

Attribution-NonCommercial-NoDerivatives 4.0 (CC BY-NC-ND 4.0)

Creative Commons Attribution-NonCommercial-NoDerivs (CC-BY-NC-ND)

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

PyKinematicalBroadening-0.0.9.tar.gz (41.0 kB view details)

Uploaded Source

File details

Details for the file PyKinematicalBroadening-0.0.9.tar.gz.

File metadata

File hashes

Hashes for PyKinematicalBroadening-0.0.9.tar.gz
Algorithm Hash digest
SHA256 a5277efdabb00a3da6da8d9b263f755a80e771c829490a8e6eaff27487c2fba7
MD5 f1e2185bd624de9aa80754e172e695e1
BLAKE2b-256 fa4e426b8240046232e99eeb3fe35daa923a11292a166580330ab60992cbae6f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page