Skip to content

sfeister/flsuite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flsuite (Scott's FLASH Suite)

flsuite is a set of Python tools (and bash scripts) related to FLASH simulations. They may be useful for certain stages of creating and analyzing the simulations.

The primary use case has been personal, but I'm sharing these tools in case others find them useful.

Setup

Dependencies

This module requires Python 3.6+. Installation requires git.

OS X users: Prior to installing dependencies, ensure an adequate Python installation by following this guide. The Python that ships with OS X may not work well with some required dependencies.

The dependencies may be installed according to the directions on their webpages, or with any Python package manager that supports them. For example, one could use pip to install them as

pip install numpy scipy matplotlib h5py yt

NOTE: If you are on a cluster where you do not have write permissions to the python installation directory, you may need to add "--user" to your pip and setup calls here and below. E.g.

pip install --user numpy scipy matplotlib h5py yt

As an alternate to pip, one could also use Anaconda Python to install the dependencies

conda install numpy scipy matplotlib h5py
conda install -c conda-forge yt

Installation

After installing the required packages, we may install flsuite.

One way to install flsuite is via

pip install git+https://github.com/sfeister/flsuite.git

To update flsuite at a later date

pip install --upgrade git+https://github.com/sfeister/flsuite.git

An alternative way to install flsuite is via

git clone https://github.com/sfeister/flsuite.git
cd flsuite/
python setup.py install

If you installed with the "--user" flag and "/.local/bin" is not on your system path, add it to your path (e.g. by appending the line "PATH=$PATH:$HOME/.local/bin" to "/.bashrc"). Documentation can be read by calling "ffpngs -h" from a bash terminal.

Command-line tools

A useful bash script called "ffpngs" will be added to /bin upon installation (or ~/.local/bin, if --user flag was used). It is a wrapper for ffmpeg that turns a directory of PNG files into a cross-platform .mp4 movie file. This is convenient when trying to share between Powerpoint, MacOS, Linux, etc. Requires bash shell (i.e. works natively with Linux or MacOS) and ffmpeg.

flsuite Python package

Useful subpackages include:

  • flsuite.parLaser (includes a class "parLasers" to programmatically define multiple lasers for a flash.par file). Usage examples found in "examples/laserexamples.py"
  • flsuite.flyt.tstools (parallel analysis of FLASH HDF5 files in a tidy package). Usage examples found in "examples/tsexample1-3.py"
  • flsuite.parIO (includes general methods for reading and writing from flash.par files)
  • flsuite.flyt.flyt (includes the function "get_simdata", a tool for extracting uniform-res arrays from FLASH sims using Yt)
  • flsuite.sftools (includes the function "getH5Outs" which gets a sorted list of FLASH-generated HDF5 plotfiles or checkpoint files in a directory, and the function "subdir" which is a painless way to make a subdirectory while checking if it already exists)

Limited documentation for these modules appears in the source code, as well as in the "examples" folder of this repository.

Uninstalling

To uninstall flsuite

pip uninstall flsuite

About

Scott's FLASH analysis suite

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published