chenk2017 / plot_fargo Goto Github PK
View Code? Open in Web Editor NEWThis project forked from aarondavidschneider/plot_fargo
a Python3 class for the visualization of FARGO3D output
License: MIT License
This project forked from aarondavidschneider/plot_fargo
a Python3 class for the visualization of FARGO3D output
License: MIT License
#------------------------------------------------------------------------------------------ # PLOT_FARGO # A PYTHON PLOTTING CLASS TO VISUALIZE THE OUTPUT OF FARGO3D # A. D. SCHNEIDER # 2018 # # The class Plot_FARGO can be used for the visualisation of FARGO3D Output # # Capabilities: # - simplified 2D ploting # - creating of 2D plots using ffmpeg # # Design philosophy: # The complexity and the possibilitys provided by Matplotlib is great. This code tries to shorten unnescessary things # without loosing the possibilities of Matplotlib. Therefore after apllying the routines one can still access # fig, ax to continue individual ploting. # # Dependancies: # - Python 3 # - matplotlib, numpy # - ffmpeg (if plot_2D_video is used) # - the multiprocessing module of python might be used in future # # There is no guarante that these routines work in every case. # # # # Todo: parallelise plot_2D_video using multiprocessing # Todo: make 3D Plots (maybe in future) # Todo: spherical Plots (not nescescary for my work) ############################### # __init__ ############################### # reads in the setup.par file to initialise the plotting # # arguments: # - (string) path_to_fargo: absolute directory of fargo (without "/" at end) # - (string) setup: name of setup that is plotted. # Needs to be identical (case-sensitive) to the setupname used in FARGO3D # - (string) setup_dir (optional): if a different location for the setup files is used, take this directory # instead. Nevertheless the directory still needs to be a subfolder of the # fargo directory ############################### # set_clim ############################### # analogue to matplotlib.pyplot.set_clim, mainly needed for plot_2D_video # # arguments: # - (number) cm_min: minimum value of the colormap # - (number) cm_max: maximum value of the colormap ############################### # plot_2D ############################### # main Method that takes the output number and output type (gasdens, etc) and creates a 2D plot # plot_2D only works with cubic or cylindrical coordinates # # returns (if filename = ""): # - fig: returned figure # - ax: returnes axes # # arguments: # - (number) output_number: number of the output being ploted # - (list of chars) direct (optional): only needed in 3D! gives the direction in which the plot is done # - (number) ax (optional): only needed in 3D! gives the indicee in perpendicular directionat which # the profile is ploted # - (string) tp (optional): tp specifys the variable that is ploted. by default this is the density # important: tp needs to be the exact same as the relating filename # - (string) filename (optional): specifies the filename for saving the plot. # - (Bool) log10 (optional): set log10 = False to get a linear Plot # - (Bool) polar (optional): if true the returned figure is ploted in cylindrical coordinates ############################### # plot_2D_video (needs ffmpeg) ############################### # Method that creates a video of the output files using ffmpeg # Please note: this routine needs the subfolders "single_frames" and "videos" # Warning: needs time, CPU power und storage (for temporary pictures and video) # # arguments (see also plot_2D): # - (string) filename: the filename of the created video (and its temporary files) # - (number) framesteps (optional): can be set >1 if one doesn't want to plot every picture # - (number) N (optional): can be set, if the total number of outputs isn't the same as in setup.par
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.