Skip to content

Latest commit

 

History

History
207 lines (162 loc) · 9.08 KB

README.md

File metadata and controls

207 lines (162 loc) · 9.08 KB

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)