Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
swmfpy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SWMF_software
swmfpy
Commits
3937b3bf
Commit
3937b3bf
authored
Sep 01, 2020
by
Camilla Dodge Koslowsky Harris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Figured out how I think keyword ards are supposed to be represented
parent
8e5b81b0
Changes
2
Hide whitespace changes
Inline
Sidebyside
Showing
2 changed files
with
73 additions
and
91 deletions
+73
91
DOCUMENTATION.markdown
DOCUMENTATION.markdown
+33
42
swmfpy/tecplottools.py
swmfpy/tecplottools.py
+40
49
No files found.
DOCUMENTATION.markdown
View file @
3937b3bf
...
...
@@ 669,9 +669,8 @@ Writes a tecplot zone to various formats.
`csv`
,
`tecplot_ascii`
, and
`tecplot_plt`
.

`filename`
_str_  Name of the file to write to.
variables : (Optional) Specify a subset of the dataset variables to
save. This option may decrease the size of the
output. Default behavior is to save all
variables.
save. This option may decrease the size of the output. Default
behavior is to save all variables.

`verbose`
 (Optional) Print diagnostic information. Defaults to False.
...
...
@@ 724,49 +723,41 @@ Interpolates Tecplot binary data onto various geometries.

`dataset`
 The loaded Tecplot dataset.

`source_zone`
 The Tecplot zone to interpolate onto the geometry.

`geometry`
_str_  Type of geometry for interpolation. Supported geometries
are
`shell`
,
`line`
,
`rectprism`
, or
`trajectory`
. See
below for the required keyword arguments for each
geometry.
are
`shell`
,
`line`
,
`rectprism`
, or
`trajectory`
. See below for the
required keyword arguments for each geometry.

`variables`
_list_  (Optional) Subset of variables to interpolate. Default
behavior is to interpolate all variables.

`verbose`
 (Optional) Print diagnostic information. Defaults to False.

`verbose`
_bool_  (Optional) Print diagnostic information. Defaults to
False.

`**center`
_arraylike_  Argument for the
`shell`
geometry. Contains the
X, Y, and Z positions of the shell. Defaults to
(0,0,0).
**
kwargs:

`radius`
_float_  Argument for the
`shell`
geometry. Required.

`npoints`
_arraylike_  Argument for the
`shell`
geometry. Contains the
number of points in the azimuthal and polar
directions to interpolate onto, excluding the
north and south polar points. Defaults to
(360,179).

`r1`
_arraylike_  Argument for the
`line`
geometry. Contains the X, Y,
and Z positions of the point where the line starts.
Required.

`r2`
_arraylike_  Argument for the
`line`
geometry. Contains the X, Y,
and Z positions of the point where the line ends.
Required.

`npoints`
_int_  Argument for the
`line`
geometry. The number of points
X, Y, and Z positions of the shell. Defaults to (0,0,0).

`**radius`
_float_  Argument for the
`shell`
geometry. Required.

`**npoints`
_arraylike_  Argument for the
`shell`
geometry. Contains the
number of points in the azimuthal and polar directions to interpolate
onto, excluding the north and south polar points. Defaults to
(360, 179).

`**r1`
_arraylike_  Argument for the
`line`
geometry. Contains the X, Y,
and Z positions of the point where the line starts. Required.

`**r2`
_arraylike_  Argument for the
`line`
geometry. Contains the X, Y,
and Z positions of the point where the line ends. Required.

`**npoints`
_int_  Argument for the
`line`
geometry. The number of points
along the line to interpolate onto. Required.

`center`
_arraylike_  Argument for the
`rectprism`
geometry. Contains the
X, Y, and Z positions of the center of the
rectangular prism. Defaults to (0,0,0).

`halfwidths`
_arraylike_  Argument for the
`rectprism`
geometry. Contains
the half widths of the rectangular prism in the
X, Y, and Z directions. Required.

`npoints`
_arraylike_  Argument for the
`rectprism`
geometry. Contains
the number of points in the X, Y, and Z directions
to interpolate onto. Required.

`trajectory_data`
_str_  Argument for the
`trajectory`
geometry. The path
to the ASCII trajectory data file. Required.

`trajectory_format`
_str_  Argument for the
`trajectory`
geometry. The
format of the trajectory data file. Supported
formats are
`tecplot`
(data is a tecplot zone
with 3D positional variables) and
`batsrus`
(data is formatted as described for the
``SATELLITE``
command, see SWMF documentation).
Required.

`**center`
_arraylike_  Argument for the
`rectprism`
geometry. Contains
the X, Y, and Z positions of the center of the rectangular prism.
Defaults to (0,0,0).

`**halfwidths`
_arraylike_  Argument for the
`rectprism`
geometry.
Contains the half widths of the rectangular prism in the X, Y, and Z
directions. Required.

`**npoints`
_arraylike_  Argument for the
`rectprism`
geometry. Contains
the number of points in the X, Y, and Z directions to interpolate
onto. Required.

`**trajectory_data`
_str_  Argument for the
`trajectory`
geometry. The
path to the ASCII trajectory data file. Required.

`**trajectory_format`
_str_  Argument for the
`trajectory`
geometry. The
format of the trajectory data file. Supported formats are
`tecplot`
(data is a tecplot zone with 3D positional variables) and
`batsrus`
(data is formatted as described for the
``SATELLITE``
command, see SWMF
documentation). Required.
**Examples**
:
...
...
swmfpy/tecplottools.py
View file @
3937b3bf
...
...
@@ 201,9 +201,9 @@ def apply_equations(eqn_path: str, verbose: bool = False) > None:
Args:
eqn_file_path (str): The path to the equation macro file (typically with
extension `.eqn`).
extension `.eqn`).
verbose (bool): (Optional) Whether or not to print the equations as they
are applied. Default behavior is silent.
are applied. Default behavior is silent.
Examples:
```python
...
...
@@ 260,7 +260,7 @@ def bracketify(variable_name: str) > str:
Args:
variable_name (str): A string which may contain the metacharacters * ?
[ or ].
[ or ].
Examples:
In a dataset which contains the variable 'X [R]',
...
...
@@ 304,12 +304,11 @@ def write_zone(
tecplot_dataset (tecplot.data.dataset.Dataset): The dataset to save.
tecplot_zone (tecplot.data.dataset.Zone): The zone to save.
write_as (str): Type of file to write to. Supported options are `hdf5`,
`csv`, `tecplot_ascii`, and `tecplot_plt`.
`csv`, `tecplot_ascii`, and `tecplot_plt`.
filename (str): Name of the file to write to.
variables : (Optional) Specify a subset of the dataset variables to
save. This option may decrease the size of the
output. Default behavior is to save all
variables.
save. This option may decrease the size of the output. Default
behavior is to save all variables.
verbose: (Optional) Print diagnostic information. Defaults to False.
Examples:
...
...
@@ 404,7 +403,7 @@ def _assign_geometry_defaults(
geometry (str): String identifying the geometry to look for.
default_params (dict): Dictionary of the default parameters.
geomatry_params (dict): Dictionary in which to look for and set
parameters.
parameters.
"""
if
geometry
in
geometry_params
[
'geometry'
]:
for
key
,
value
in
default_params
.
items
():
...
...
@@ 463,49 +462,41 @@ def interpolate_zone_to_geometry(
dataset: The loaded Tecplot dataset.
source_zone: The Tecplot zone to interpolate onto the geometry.
geometry (str): Type of geometry for interpolation. Supported geometries
are `shell`, `line`, `rectprism`, or `trajectory`. See
below for the required keyword arguments for each
geometry.
are `shell`, `line`, `rectprism`, or `trajectory`. See below for the
required keyword arguments for each geometry.
variables (list): (Optional) Subset of variables to interpolate. Default
behavior is to interpolate all variables.
verbose: (Optional) Print diagnostic information. Defaults to False.
behavior is to interpolate all variables.
verbose (bool): (Optional) Print diagnostic information. Defaults to
False.
**center (arraylike): Argument for the `shell` geometry. Contains the
X, Y, and Z positions of the shell. Defaults to
(0,0,0).
**kwargs:
radius (float): Argument for the `shell` geometry. Required.
npoints (arraylike): Argument for the `shell` geometry. Contains the
number of points in the azimuthal and polar
directions to interpolate onto, excluding the
north and south polar points. Defaults to
(360,179).
r1 (arraylike): Argument for the `line` geometry. Contains the X, Y,
and Z positions of the point where the line starts.
Required.
r2 (arraylike): Argument for the `line` geometry. Contains the X, Y,
and Z positions of the point where the line ends.
Required.
npoints (int): Argument for the `line` geometry. The number of points
along the line to interpolate onto. Required.
center (arraylike): Argument for the `rectprism` geometry. Contains the
X, Y, and Z positions of the center of the
rectangular prism. Defaults to (0,0,0).
halfwidths (arraylike): Argument for the `rectprism` geometry. Contains
the half widths of the rectangular prism in the
X, Y, and Z directions. Required.
npoints (arraylike): Argument for the `rectprism` geometry. Contains
the number of points in the X, Y, and Z directions
to interpolate onto. Required.
trajectory_data (str): Argument for the `trajectory` geometry. The path
to the ASCII trajectory data file. Required.
trajectory_format (str): Argument for the `trajectory` geometry. The
format of the trajectory data file. Supported
formats are `tecplot` (data is a tecplot zone
with 3D positional variables) and `batsrus`
(data is formatted as described for the
`#SATELLITE` command, see SWMF documentation).
Required.
X, Y, and Z positions of the shell. Defaults to (0,0,0).
**radius (float): Argument for the `shell` geometry. Required.
**npoints (arraylike): Argument for the `shell` geometry. Contains the
number of points in the azimuthal and polar directions to interpolate
onto, excluding the north and south polar points. Defaults to
(360, 179).
**r1 (arraylike): Argument for the `line` geometry. Contains the X, Y,
and Z positions of the point where the line starts. Required.
**r2 (arraylike): Argument for the `line` geometry. Contains the X, Y,
and Z positions of the point where the line ends. Required.
**npoints (int): Argument for the `line` geometry. The number of points
along the line to interpolate onto. Required.
**center (arraylike): Argument for the `rectprism` geometry. Contains
the X, Y, and Z positions of the center of the rectangular prism.
Defaults to (0,0,0).
**halfwidths (arraylike): Argument for the `rectprism` geometry.
Contains the half widths of the rectangular prism in the X, Y, and Z
directions. Required.
**npoints (arraylike): Argument for the `rectprism` geometry. Contains
the number of points in the X, Y, and Z directions to interpolate
onto. Required.
**trajectory_data (str): Argument for the `trajectory` geometry. The
path to the ASCII trajectory data file. Required.
**trajectory_format (str): Argument for the `trajectory` geometry. The
format of the trajectory data file. Supported formats are `tecplot`
(data is a tecplot zone with 3D positional variables) and `batsrus`
(data is formatted as described for the `#SATELLITE` command, see SWMF
documentation). Required.
Examples:
```python
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment