Skip to main content

A clumpy PDR model

Project description

Forks Stargazers

pylint Contributors Issues GNU GPLv3 License

kosmatau3d

This is the current working version of kosmatau3d. It uses a series of sub-modules to perform most of the calculations. The reason for doing this is to reduce the memory footprint of the code to increase the overall efficiency. This also increases the maximum number of voxels that can be evaluated, since each voxel no longer owns as much memory.

Installation

using pip

Directly install from git using,

pip install git+https://github.com/CraigYanitski/kosmatau3d.git

manually

Download the repository.

git clone https://github.com/CraigYanitski/kosmatau3d
cd kosmatau3d

Now that you are in the root directory of this repository, install this package in bash with,

pip install .

Creating a voxel

A Voxel instance can be initialised using,

>>> from kosmatau3d import models
>>> vox = models.Voxel()

There are many parameters that must be specified in order to initialise and simulate the clumpy ensemble. For a detailed explanation of the properties that can be defined/accessed with a voxel instance, see the jupyter notebook in ./notebooks/voxel.ipynb. If you wish to use the pre-defined properties, you can simply run,

>>> vox.set_properties()
>>> vox.calculate_emission()

One can then easily plot different views of the voxel emission using built-in plotting methods.

>>> vox.plot_spectrum()

Documentation (in prep.)

At the moment there is no CI/CD to automatically compile the documentation files. In order to properly view the current documentation, from the root directory run,

cd doc
make html
cd build/html
browse index.html

You should now see the homepage of the documentation in its current form. This will periodically be improved over time.

Functionality

Single-voxel models

This is the basic component of kosmatau3d. It is made available as a self-sufficient object for use in other subgridding models. Given a volume-filling factor, mass, and FUV field, the single voxel object calculates the wavelength-dependant intensity, optical depth, absorption, and emissivity (assuming no background intensity) for a clumpy PDR ensemble. The explanation of this model is thoroughly-explained in ./notebooks/voxel.ipynb.

The objects that will modelled with this method are:

  • IC 1396
    • (Okada et al. in prep) first application of directly comparing single voxels with an observational map

3D models

The full subgrid model to simulate entire 3-dimensional structures. Voxel data can be streamed into fits files and the radiative transfer portion is a self-contained module to save on computational time.

It is currently setup for the Milky Way model initially developed by Christoph Bruckmann as that will be its first application. This galactic model can also be used in a more generalised application for distant galaxies.

The objects that will modelled with this method are:

  • Milky Way
    • (Yanitski et al. in prep) an approximate description compared to COBE-DIRBE, Planck, COBE-FIRAS, GOT C+, CfA, Mopra, ThrUMMS, and SEDIGISM data

Code Corrections

The major changes to the functionality of the kosmatau3d model over the KOSMA-tau-3D model of Silke et al. (2017) are described in the document ./docs/treatise.pdf, and the major changes to the Milky Way model will also appear in the upcoming Yanitski et al. (2023) paper. There will be other documents to state the other various corrections and developments made.

Developmental Progress

base development

  • 3D model
    • Correct voxel-averaged intensity calculation
    • Ensure 3D model saves relevant data
      • implement multiprocessing
    • Modify single-voxel instance to calculate a column when $f_V > 1$
      • allow for arbitrary $f_V$ $(<1)$
  • Radiative transfer
    • Ensure correct calculation of sythetic datacube
      • implement multiprocessing
      • optimise
    • Implement opacity map in radiative transfer calculation
    • Implement FUV absorption calculation in full 3D model
    • Modify the radiativeTransfer module to work for arbitrary geometry
  • Miscellaneous
    • Include submodule to explore KOSMA-$\tau$ and kosmatau3d properties
    • Include submodule to compare observational data with synthetic datacubes
      • fix regridding of observational error maps
    • Implement function to mimic two-layer model (aka two-voxel model)
    • Implement function to create voxel grid (functions by Yoko Okada)
      • have function fit observational data
    • Include submodule covering the Mathematica routines developed by Markus Röllig
    • Develop the code testing suite
    • Fully document the code using sphinx
    • Implement CI/CD

future development

  • Allow pickling of interpolation functions for faster debugging of the single-voxel model
  • Utilise cython to improve code efficiency
  • Implement numba more fully to optimise the computation time
    • use this to parallelise the code
  • Create a GUI to make it easier to setup/alter the model
  • Implement recursion in radiative transfer calculation

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

kosmatau3d-1.0.10.tar.gz (19.0 MB view details)

Uploaded Source

Built Distribution

kosmatau3d-1.0.10-py3-none-any.whl (19.3 MB view details)

Uploaded Python 3

File details

Details for the file kosmatau3d-1.0.10.tar.gz.

File metadata

  • Download URL: kosmatau3d-1.0.10.tar.gz
  • Upload date:
  • Size: 19.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.64.1 urllib3/1.26.5 CPython/3.10.12

File hashes

Hashes for kosmatau3d-1.0.10.tar.gz
Algorithm Hash digest
SHA256 9a00a5620a116ac524853320284084ef35f6f0b31def2cba4eb3b7cc66146e7a
MD5 a275a029f0c0f26893e056bf937f7bdb
BLAKE2b-256 6b80f423f062bfc28e5cfc0db441b4f58a6bb383b041abe85fd7b65e0fac8cd8

See more details on using hashes here.

File details

Details for the file kosmatau3d-1.0.10-py3-none-any.whl.

File metadata

  • Download URL: kosmatau3d-1.0.10-py3-none-any.whl
  • Upload date:
  • Size: 19.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.64.1 urllib3/1.26.5 CPython/3.10.12

File hashes

Hashes for kosmatau3d-1.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 477ddad34d07e639dc75f325d10918dd8404f472db2f05ebdafb4fddf562468c
MD5 a00cbeb579d60792e5ddcf5121f64248
BLAKE2b-256 22f15dd67c2ca6e1ccd9bfa1c0376e11549b873845929f224771c3b028a78ce5

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