-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ `version.py`: add release tag for v0.2.2 * `__init__`: explicit list of top-level functions + `tests`: remove "test_SET_" prefix for the testing scripts, to reflect the same naming in the src directory. + `tests`: add `__main__` function in the testing scripts. + `circleci/README`: update the new testing script names
- Loading branch information
Showing
10 changed files
with
121 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
*.DS_Store | ||
tests/*.png | ||
tests/*/*.png | ||
solid.txt | ||
|
||
# Byte-compiled / optimized / DLL files | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
from pysolid.grid import * | ||
from pysolid.point import * | ||
|
||
# get version info | ||
from pysolid.version import * | ||
__version__ = release_version | ||
from pysolid.version import release_version as __version__ | ||
|
||
# top-level functions | ||
from pysolid.grid import ( | ||
calc_solid_earth_tides_grid, | ||
plot_solid_earth_tides_grid, | ||
) | ||
from pysolid.point import ( | ||
TIDES, | ||
calc_solid_earth_tides_point, | ||
plot_solid_earth_tides_point, | ||
plot_power_spectral_density4tides, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/usr/bin/env python3 | ||
# Author: Zhang Yunjun, Jan 2021 | ||
# Copyright 2020, by the California Institute of Technology. | ||
|
||
|
||
import os | ||
import sys | ||
import datetime as dt | ||
|
||
import pysolid | ||
|
||
|
||
if __name__ == '__main__': | ||
|
||
# print the file/module path | ||
print('-'*50) | ||
print(os.path.abspath(__file__)) | ||
|
||
# prepare inputs | ||
dt_obj = dt.datetime(2020, 12, 25, 14, 7, 44) | ||
atr = { | ||
'LENGTH' : 400, | ||
'WIDTH' : 500, | ||
'X_FIRST' : -118.2, | ||
'Y_FIRST' : 33.8, | ||
'X_STEP' : 0.000833333, | ||
'Y_STEP' : -0.000833333, | ||
} | ||
|
||
# calculate | ||
(tide_e, | ||
tide_n, | ||
tide_u) = pysolid.calc_solid_earth_tides_grid(dt_obj, atr, verbose=True) | ||
|
||
# plot | ||
out_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'pic')) | ||
os.makedirs(out_dir, exist_ok=True) | ||
|
||
out_fig = os.path.join(out_dir, 'grid.png') | ||
pysolid.plot_solid_earth_tides_grid( | ||
tide_e, tide_n, tide_u, dt_obj, | ||
out_fig=out_fig, | ||
display=False) | ||
|
||
# open the plotted figures | ||
if sys.platform in ['linux']: | ||
os.system(f'display {out_fig}') | ||
elif sys.platform in ['darwin']: | ||
os.system(f'open {out_fig}') | ||
elif sys.platform.startswith('win'): | ||
os.system(out_fig) | ||
else: | ||
print(f'Unknown OS system ({sys.platform}). Check results in file: {out_fig}.') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/usr/bin/env python3 | ||
# Author: Zhang Yunjun, Jan 2021 | ||
# Copyright 2020, by the California Institute of Technology. | ||
|
||
|
||
import os | ||
import sys | ||
import datetime as dt | ||
|
||
import pysolid | ||
|
||
|
||
if __name__ == '__main__': | ||
|
||
# print the file/module path | ||
print('-'*50) | ||
print(os.path.abspath(__file__)) | ||
|
||
# prepare inputs | ||
lat, lon = 34.0, -118.0 # Los Angles, CA | ||
dt_obj0 = dt.datetime(2020, 11, 1, 4, 0, 0) | ||
dt_obj1 = dt.datetime(2020, 12, 31, 2, 0, 0) | ||
|
||
# calculate | ||
(dt_out, | ||
tide_e, | ||
tide_n, | ||
tide_u) = pysolid.calc_solid_earth_tides_point(lat, lon, dt_obj0, dt_obj1, verbose=False) | ||
|
||
# plot | ||
out_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'pic')) | ||
os.makedirs(out_dir, exist_ok=True) | ||
|
||
out_fig = os.path.join(out_dir, 'point.png') | ||
pysolid.plot_solid_earth_tides_point( | ||
dt_out, tide_e, tide_n, tide_u, | ||
lalo=[lat, lon], | ||
out_fig=out_fig, | ||
display=False) | ||
|
||
# open the saved figure | ||
if sys.platform in ['linux']: | ||
os.system(f'display {out_fig}') | ||
elif sys.platform in ['darwin']: | ||
os.system(f'open {out_fig}') | ||
elif sys.platform.startswith('win'): | ||
os.system(out_fig) | ||
else: | ||
print(f'Unknown OS system ({sys.platform}). Check results in file: {out_fig}.') |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.