Skip to main content

Make a realistic visualisation of a star cluster

Project description

DOI

Fresco

Fresco aims to simulate observations of particle-based simulations, such as those of a star cluster. It creates an observation-like image from a list of stars and/or gas particles. Supported filetypes include AMUSE-type hdf5 files, Starlab files and plaintext files.

For stars, the temperature and radius are calculated using a stellar evolution code, if these are not already present in the dataset.

Gas particles may also be read. In combination with stars, these will cause reflection from nearby stars and optionally extinction of light from background. Without stars, Fresco will make a density plot of the gas. Optionally, the gas may also be indicated with contour lines.

A random field of background and foreground stars may be added to the image, as a way to make the image more natural looking and/or to provide a background that may be obscured by the gas/dust particles.

Example image

Requirements

  • Python 2.7 (3.x experimental)
  • Numpy
  • Matplotlib
  • AMUSE (https://github.com/amusecode/amuse)
    • FIMap (optional, for extinction)
    • SSE or SeBa (optional, for calculating stellar luminosities and radii)
  • Astropy
  • amuse-masc (recommended)

Usage

import matplotlib.pyplot as plt
from amuse.datamodel import Particles
from amuse.units import units, nbody_system
from amuse.community.sse.interface import SSE
from amuse.ext.masc import make_a_star_cluster
from amuse.ext.fresco import make_fresco_image
?make_fresco_image  # See options
stars = make_a_star_cluster.new_cluster()
gas = Particles()
se = SSE()
se.particles.add_particles(stars)
from_se = se.particles.new_channel_to(stars)
from_se.copy()
image, vmax = make_fresco_image(
    stars, gas,
    mode=["stars"],
    return_vmax=True,
)
plt.imshow(image)
plt.show()

Authors

Fresco is developed by Inti Pelupessy and Steven Rieder

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

amuse-fresco-0.5.2.tar.gz (2.0 MB view details)

Uploaded Source

File details

Details for the file amuse-fresco-0.5.2.tar.gz.

File metadata

  • Download URL: amuse-fresco-0.5.2.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.16

File hashes

Hashes for amuse-fresco-0.5.2.tar.gz
Algorithm Hash digest
SHA256 73563c59ece6bad1a5d4eb88462ce7d07f8d7b9e2dcdea1d684478f4ab9869c1
MD5 f56778624dcf33990b4e719c8bb00b08
BLAKE2b-256 65ad2d6c1a1f6b4f77b12d3beb37e0ab6c7cfbb8a5206091418b443690b7a8d9

See more details on using hashes here.

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