Git Product home page Git Product logo

cgm-sim-analysis's Introduction

Contents

A collection of scripts for plotting & extracting data from my CGM simulations.

File prefix Purpose
calc Helper functions that can be imported by "save" files
gen Generate files for simulation manangement (no data extraction)
plot Save plots!
save Extract data from simulation outputs and save it, either as ASCII tables or Python 3 pickled dictionaries of dictionaries
sightline_analysis See below

Misc Files

  • annotate_phase_plot - semi-automatedly add lines of constant pressure & entropy to a density-temperature phase plot from yt.
  • test_HSE.py - explore deviations from hydrostatic equilibrium that may be present in initial conditions
  • manual_profile_snippet.txt - an exerpt of code showing how to make yt-esque profiles with SciPy (more flexible, too).

Running on Expanse (SLURM)

Use sbatch python.slurm to submit.

Importantly, Expanse doesn't like it when you analyze data on the Lustre Scratch filesystem (to many file accesses). Instead, this script will use the parallel module to copy and untar compressed outputs from the Project storage to node local NVMe storage, and then copy the analysis products to Lustre scratch.

Un/comment the lines according to which script you want to run. It's low tech, man. If you're someone else using this code, consider this file a template.

Sightline Analysis Scripts

There are a pair of scripts with this prefix. The file sightline_analysis.py is executed by subprocesses launched and managed by sightline_analysis_subproc_manager.py. This is because the data extraction in sightline_analysis.py can 1) fail due to bad handling of the simulation grids, requiring a reload of the dataset and 2) segfault. When running sightline_analysis_subproc_manager.py in parallel, ask for twice as many processes as you would like to have handling the data. This is because half of the set will be "minding" the other half.

Use collate_pkls.py to combine the resulting individual pickle files into one.

cgm-sim-analysis's People

Contributors

clairekope avatar

Stargazers

Brian O'Shea avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.