Skip to content

Latest commit

 

History

History
183 lines (152 loc) · 6.73 KB

Outdate README.md

File metadata and controls

183 lines (152 loc) · 6.73 KB

Shockfinder

Author Junxiang H. & C. B. Singh
If you have any questions and suggestions
Please contact: huangjunxiang@mail.ynu.edu.cn

0° Update infomation:

Shockfinder v3.5 (build 2022.06.30), upload: 2023.01.25
Feature:
|----PLUTO data reader
|--------Update PyPLUTO (see http://plutocode.ph.unito.it/userguide.pdf) to support Python>3.7
|--------Quadrant self-replication support (First or first&fourth quadrant support)
|--------Computing complexity support
|--------Multi-mode preset data processing
|--------Advanced quantity support
|--------2D (R)HD/(R)MHD SPH support
|--------Original data output support
|----Shock locator
|--------Interval data selection support
|--------Tolerance value calculation support
|--------Tolerance transonic point auxiliary locating support
|--------Logarithmic analysis support
|--------Multi-data source support
|--------Multi-shock detection
|--------Newtonian star and black hole support
|----Luminosity calculator
|--------Bremsstrahlung calculation support
|--------Luminosity spatial distribution support
|----Multi-process optimizer (v2.3)
|--------Data splitter
|--------Data Integrator
|--------Data accessor
|------------DBMS controller
|------------CSV file controller
|--------Time control support
|--------Luminosity calculation controller
|--------Data analysis environment controller
|--------Logical analysis of depth array
|--------Post-processing dataset generator (v1.0)
|--------Post update support
|--------Multi-functional figuring support
|----Drawing module based on matplotlib
|--------Picture access support
|--------Curve operation support
|--------Curve crossing support
|----Interactive interface
|--------Command tool and pre-command processing
|--------Data pre-analysis parameters error checking
|--------Dataset interaction tools
|--------Dynamic equilibrium calculator
|--------PLUTO grid optimizer
|--------Automatic input check
|--------SQL Interactive
|--------Multi-process data analysis interaction and drawing module interaction
|----Other
|--------Non-matrix divergence calculation
|--------Non-matrix array operation
|--------Text and array conversion support
|--------Data source selector
|--------Command abbreviation recovery
|--------Log Exporter and printer

User Guide

1° Environment and installing

1.1° Enviorment

You must install python (>3.7) in your computer (or in high-performance server cluster), some basic modules need to be used. Please ensure that they have been installed:

sys
math
numpy
scipy
datetime
time
csv
pymysql
matplotlib
mpl_toolkits
random
os
multiprocessing

1.2° Installing

Download and decompress Shockfinder to your computer
(the .tar.gz compression version will be put in the future update)

1.3° Enter Shockfinder environment and pre-command

1.3.1° Shockfinder environment

python (Shockfinder directory)/shock_finder.py [pre-command [pre-command-value]]

For example in Linux, Shockfinder is installed in your home directory

python ~/shock_finder.py

(This command can be added in your .bashrc with a alian command which is easier used for future.)

For Windows is similar to Linux, and a quick operation .bat file in the directory, you can run Shockfinder in one of two

D:
cd Shockfinder
python shock_finder.py

1.3.2° Pre-command:

[r|-r|read]: Read the command set from a file, which is used for non-interactive platforms or batch processing
[cv|-cv|curve]: Load curve from csv file(s)
[o|-o|log]: Log file, used for non-interactive processing
[l|-l|load]: Load a post-analysis result from a csv file
[t|-t|test]: Debug mode (default False), software will crash when is meeting an exception error in debug mode.

E.g., set log file: ~/test_log_file.log, set commands files: ~/command1 and ~/command2

python ~/shock_finder.py o=~/test_log_file.log, r=(~/command1,~/command2)

load a result file ~/result.csv and a curve ~/curve.csv

python ~/shock_finder.py l=~/result.csv cv=~/curve.csv

Debug mode, parameter 't' is abbreviation of 'True'

python ~/shock_finder.py t=t

2° Command line

After entering the Shockfinder environment, all operations can be executed with commands in command line. By the way, you can do data analysis and other operations without touching any source code

2.1° Command format

The command line provides some basic commands that can be executed directly in Shockfinder. Detailed descriptions of these commands will be released later. Some commands also require special parameters, but rest assured that most of these parameters are rewritable and contain error checking functions. You don't need to worry about incorrect input during use. However, as a researcher, it is very necessary to put caution at first:

Command format

Basic_command [parameter[-parameter_type][=[datasource[@datamodel]]]]

Basic_command:

set: set parameter before data analysis
update: update parameter after analysis
curve: curve operation
sql: DBMS operation
save: save current dataset
load: load a dataset
delete: delete a dataset or a curve from DBMS
read: read command set
connect: do analysis
close: close DBMS
exit: exit environment
show: show parameters
reset: reset parameters
draw: draw a figure
help: print help

Spaces are used to separate commands and parameters. However, it is reassuring that Shockfinder integrates redundant space clearing function (if you have spaces in unnecessary places or multiple spaces between commands and parameters, these spaces will be cleared), so there is no need to worry about the impact of redundant spaces.

2.2° Annotation

Shockfinder allows users to enter some commands that do not need to be executed, including wrong or illegal commands, empty commands (which can be composed of pure spaces) and commented commands.

Shockfinder supports line comments starting with # and//

#Command....
//Command....

2.3° Command abbreviation

In order to avoid the use of lengthy names as command names in Shockfinder, "general_parameters. py" is responsible for defining the aliases (or abbreviations) of commands. Users can modify them according to their personal preferences. The data dictionary "g_command_trans" describes the abbreviations of basic commands.

The relevant command abbreviations can be viewed through the help command. For details, see 3 °.

help

3° Help