This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
framerate=60 | |
i=0 | |
padtowidth=6 | |
for plot in plot-??????.png; do | |
ln -s $plot `printf "frame-%0*d.png \n" $padtowidth $i`; | |
let i=i+1 | |
done | |
ffmpeg -framerate $framerate \ | |
-i frame-%06d.png \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import ads | |
# from amuse.support.version import major_version, minor_version | |
major_version = 12 | |
minor_version = 1 | |
ver = "%s.%s" % (major_version, minor_version) | |
bibcodes = sys.argv[1:] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 | |
PortSystem 1.0 | |
PortGroup python 1.0 | |
name py-amuse-framework | |
version 12.1.3.post1 | |
revision 0 | |
checksums rmd160 ef2892ab08fad3131e0da715d4bd7df95af71510 \ | |
sha256 8a787aec81a7fada78891b326a4ff74bb57b71c056677f2dd34236afda931c4f \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Plot hydro and/or stars | |
""" | |
import os | |
import logging | |
import numpy | |
import copy | |
import argparse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Example of combining gas and stars via Bridge with a dedicated kicker code. | |
""" | |
from amuse.units import nbody_system, units | |
from amuse.couple.bridge import Bridge, CalculateFieldForCodes | |
from amuse.community.bhtree import Bhtree | |
from amuse.community.fastkick import Fastkick | |
from amuse.community.ph4 import Ph4 | |
from amuse.community.gadget2 import Gadget2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Script to compare Clustertools analysis to native AMUSE analysis | |
""" | |
# requires amuse-framework, amuse-masc and clustertool to be installed | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import clustertools as ctools | |
from amuse.units import units, nbody_system | |
from amuse.units.quantities import VectorQuantity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from amuse.units import units, nbody_system | |
from amuse.io import read_set_from_file | |
from amuse.io import write_set_to_file | |
from amuse.community.ph4 import Ph4 | |
def main(): | |
time_step = 0.01 | units.Myr | |
time_end = 10 | units.Myr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from amuse.units import units | |
from amuse.io import read_set_from_file | |
import matplotlib.pyplot as plt | |
def plot_stars(stars, length_unit=units.pc, plot_by_luminosity=True, scale=1/40): | |
fig = plt.figure() | |
ax = fig.add_subplot(1, 1, 1) | |
if plot_by_luminosity: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
import sys | |
import numpy | |
import argparse | |
from amuse.units import nbody_system, units, constants | |
from amuse.ic.plummer import new_plummer_model | |
from amuse.community.ph4 import Ph4 | |
from amuse.community.smalln import Smalln |