提交 0ea096ae 编辑于 作者: Mijian Xu's avatar Mijian Xu 😷 提交者: Mijian Xu
浏览文件

update

上级 ac7d3828
*.iml
*.pyc
/dist/
/*.egg*/
/.idea/
/.vscode/
/build/
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="edeb6f02-0e8c-4c72-8baa-b897be95e5dc" name="Default" comment="update" />
<list default="true" id="edeb6f02-0e8c-4c72-8baa-b897be95e5dc" name="Default" comment="update">
<change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/build/lib/mgpro/__init__.py" beforeDir="false" afterPath="$PROJECT_DIR$/build/lib/mgpro/__init__.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/build/lib/mgpro/expand.py" beforeDir="false" afterPath="$PROJECT_DIR$/build/lib/mgpro/expand.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/build/lib/mgpro/mgui.py" beforeDir="false" afterPath="$PROJECT_DIR$/build/lib/mgpro/mgui.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/mag_geod.dat" beforeDir="false" afterPath="$PROJECT_DIR$/emaple/mag_geod.dat" afterDir="false" />
<change beforePath="$PROJECT_DIR$/mag_proj.dat" beforeDir="false" afterPath="$PROJECT_DIR$/emaple/mag_proj.dat" afterDir="false" />
<change beforePath="$PROJECT_DIR$/mag_test.dat" beforeDir="false" afterPath="$PROJECT_DIR$/emaple/mag_test.dat" afterDir="false" />
<change beforePath="$PROJECT_DIR$/mag_up0_diff1.dat" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/mag_up10_diff1.dat" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/magproj.eps" beforeDir="false" afterPath="$PROJECT_DIR$/emaple/magproj.eps" afterDir="false" />
<change beforePath="$PROJECT_DIR$/mgpro/__init__.py" beforeDir="false" afterPath="$PROJECT_DIR$/mgpro/__init__.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/mgpro/expand.py" beforeDir="false" afterPath="$PROJECT_DIR$/mgpro/expand.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/mgpro/mgmat.py" beforeDir="false" afterPath="$PROJECT_DIR$/mgpro/mgpro.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/mgpro/mgui.py" beforeDir="false" afterPath="$PROJECT_DIR$/mgpro/mgui.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/new.dat" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/ps_proj.sh" beforeDir="false" afterPath="$PROJECT_DIR$/mgpro/ps_proj.sh" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FUSProjectUsageTrigger">
<session id="355405479">
<usages-collector id="statistics.file.extensions.edit">
<counts>
<entry key="dummy" value="3" />
<entry key="gitignore" value="42" />
<entry key="py" value="710" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.edit">
<counts>
<entry key="PLAIN_TEXT" value="45" />
<entry key="Python" value="710" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.open">
<counts>
<entry key="py" value="1" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.open">
<counts>
<entry key="Python" value="1" />
</counts>
</usages-collector>
</session>
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/mgpro/expand.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="880">
<caret line="47" selection-start-line="47" selection-end-line="47" />
<state relative-caret-position="420">
<caret line="20" column="6" selection-start-line="20" selection-start-column="6" selection-end-line="20" selection-end-column="6" />
<folding>
<element signature="e#0#16#0" expanded="true" />
</folding>
......@@ -22,46 +67,78 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/mgpro/__init__.py">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/mgpro/proj.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="40">
<caret line="2" selection-start-line="2" selection-end-line="2" />
<state relative-caret-position="573">
<caret line="29" column="29" selection-start-line="22" selection-start-column="4" selection-end-line="29" selection-end-column="29" />
<folding>
<element signature="e#0#13#0" expanded="true" />
<marker date="1547201904674" expanded="true" signature="94:99" ph="..." />
<marker date="1547201904674" expanded="true" signature="514:1586" ph="..." />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/mgpro/mgmat.py">
<entry file="file://$PROJECT_DIR$/mgpro/mgpro.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="474">
<caret line="120" column="20" selection-start-line="120" selection-start-column="20" selection-end-line="120" selection-end-column="20" />
<state relative-caret-position="783">
<caret line="140" selection-start-line="140" selection-end-line="140" />
<folding>
<element signature="e#0#18#0" expanded="true" />
<marker date="1547291183375" expanded="true" signature="225:346" ph="..." />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/mag_up0_diff1.dat">
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="620">
<caret line="58" column="41" lean-forward="true" selection-start-line="58" selection-start-column="41" selection-end-line="58" selection-end-column="41" />
<state relative-caret-position="126">
<caret line="6" column="7" selection-start-line="6" selection-start-column="7" selection-end-line="6" selection-end-column="7" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/mag_up10_diff1.dat">
<entry file="file://$PROJECT_DIR$/../seispy/seispy/ccp.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-38760" />
<state relative-caret-position="540">
<caret line="221" column="29" selection-start-line="221" selection-start-column="4" selection-end-line="221" selection-end-column="29" />
<folding>
<element signature="e#0#18#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/mag_geod.dat">
<provider selected="true" editor-type-id="LargeFileEditor" />
<entry file="file://$PROJECT_DIR$/mgpro/ps_proj.sh">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="231">
<caret line="11" column="23" selection-start-line="11" selection-start-column="23" selection-end-line="11" selection-end-column="23" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$USER_HOME$/Documents/GMT/geo3al/latlonconvert.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="672">
<caret line="32" column="106" selection-start-line="31" selection-start-column="11" selection-end-line="32" selection-end-column="106" />
<folding>
<element signature="e#0#13#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
......@@ -90,13 +167,15 @@
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/mgpro/expand.py" />
<option value="$PROJECT_DIR$/mgpro/xy2mat.py" />
<option value="$USER_HOME$/Documents/GMT/geo3al/latlonconvert.py" />
<option value="$PROJECT_DIR$/ps_proj.sh" />
<option value="$PROJECT_DIR$/mgpro/proj.py" />
<option value="$PROJECT_DIR$/mgpro/mgmat.py" />
<option value="$PROJECT_DIR$/mag_up0_diff1.dat" />
<option value="$PROJECT_DIR$/mgpro/expand.py" />
<option value="$PROJECT_DIR$/mgpro/__init__.py" />
<option value="$PROJECT_DIR$/mgpro/mgmat.py" />
<option value="$PROJECT_DIR$/.gitignore" />
</list>
</option>
</component>
......@@ -106,9 +185,6 @@
<option name="width" value="2227" />
<option name="height" value="1239" />
</component>
<component name="ProjectLevelVcsManager">
<ConfirmationsSetting value="1" id="Add" />
</component>
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
......@@ -139,8 +215,9 @@
</component>
<component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$" />
<recent name="$PROJECT_DIR$/emaple" />
<recent name="$PROJECT_DIR$/mgpro" />
<recent name="$PROJECT_DIR$" />
</key>
</component>
<component name="RunDashboard">
......@@ -189,7 +266,7 @@
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/mgpro/mgmat.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/mgpro/mgpro.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
......@@ -291,20 +368,21 @@
<servers />
</component>
<component name="ToolWindowManager">
<frame x="70" y="27" width="2490" height="1386" extended-state="6" />
<frame x="68" y="23" width="2492" height="1417" extended-state="0" />
<editor active="true" />
<layout>
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.14152473" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.06717928" />
<window_info id="Structure" order="1" weight="0.25" />
<window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Find" order="1" weight="0.32981133" />
<window_info anchor="bottom" id="Run" order="2" weight="0.3282989" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.399841" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Version Control" order="7" show_stripe_button="false" />
<window_info active="true" anchor="bottom" id="Terminal" order="8" visible="true" weight="0.2154213" />
<window_info anchor="bottom" id="Terminal" order="8" visible="true" weight="0.21509434" />
<window_info anchor="bottom" id="Event Log" order="9" side_tool="true" />
<window_info anchor="bottom" id="Python Console" order="10" weight="0.3282989" />
<window_info anchor="right" id="Commander" order="0" weight="0.4" />
......@@ -313,6 +391,9 @@
<window_info anchor="right" id="Data View" order="3" />
</layout>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="update" />
<option name="LAST_COMMIT_MESSAGE" value="update" />
......@@ -322,60 +403,94 @@
<entry file="file://$PROJECT_DIR$/new.dat">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/magproj.eps" />
<entry file="file://$PROJECT_DIR$/emaple/magproj.eps" />
<entry file="file://$PROJECT_DIR$/../seispy/seispy/psrayp.py" />
<entry file="file://$PROJECT_DIR$/ps_proj.sh" />
<entry file="file://$USER_HOME$/Documents/GMT/geo3al/latlonconvert.py" />
<entry file="file://$PROJECT_DIR$/../seispy/seispy/ccp.py" />
<entry file="file://$PROJECT_DIR$/mgpro/expand.py">
<entry file="file://$PROJECT_DIR$/mgpro/ps_proj.sh">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="231">
<caret line="11" column="23" selection-start-line="11" selection-start-column="23" selection-end-line="11" selection-end-column="23" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/Documents/GMT/geo3al/latlonconvert.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="880">
<caret line="47" selection-start-line="47" selection-end-line="47" />
<state relative-caret-position="672">
<caret line="32" column="106" selection-start-line="31" selection-start-column="11" selection-end-line="32" selection-end-column="106" />
<folding>
<element signature="e#0#16#0" expanded="true" />
<element signature="e#0#13#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/mgpro/proj.py">
<entry file="file://$PROJECT_DIR$/../seispy/seispy/ccp.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="40">
<caret line="2" selection-start-line="2" selection-end-line="2" />
<state relative-caret-position="540">
<caret line="221" column="29" selection-start-line="221" selection-start-column="4" selection-end-line="221" selection-end-column="29" />
<folding>
<element signature="e#0#18#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/mag_test.dat">
<entry file="file://$PROJECT_DIR$/emaple/mag_test.dat">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$USER_HOME$/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/site-packages/scipy/interpolate/ndgriddata.py">
<entry file="file://$USER_HOME$/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/site-packages/scipy/interpolate/ndgriddata.py" />
<entry file="file://$PROJECT_DIR$/emaple/mag_geod.dat">
<provider selected="true" editor-type-id="LargeFileEditor" />
</entry>
<entry file="file://$PROJECT_DIR$/mag_up10_diff1.dat">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="563">
<caret line="229" selection-start-line="229" selection-end-line="229" />
<state relative-caret-position="-38760" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/mag_up0_diff1.dat">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="620">
<caret line="58" column="41" lean-forward="true" selection-start-line="58" selection-start-column="41" selection-end-line="58" selection-end-column="41" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/mag_geod.dat">
<provider selected="true" editor-type-id="LargeFileEditor" />
<entry file="file://$PROJECT_DIR$/mgpro/proj.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="573">
<caret line="29" column="29" selection-start-line="22" selection-start-column="4" selection-end-line="29" selection-end-column="29" />
<folding>
<element signature="e#0#13#0" expanded="true" />
<marker date="1547201904674" expanded="true" signature="94:99" ph="..." />
<marker date="1547201904674" expanded="true" signature="514:1586" ph="..." />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/mag_up10_diff1.dat">
<entry file="file://$PROJECT_DIR$/mgpro/__init__.py">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/mgpro/expand.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-38760" />
<state relative-caret-position="420">
<caret line="20" column="6" selection-start-line="20" selection-start-column="6" selection-end-line="20" selection-end-column="6" />
<folding>
<element signature="e#0#16#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/mgpro/mgmat.py">
<entry file="file://$PROJECT_DIR$/mgpro/mgpro.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="474">
<caret line="120" column="20" selection-start-line="120" selection-start-column="20" selection-end-line="120" selection-end-column="20" />
<state relative-caret-position="783">
<caret line="140" selection-start-line="140" selection-end-line="140" />
<folding>
<element signature="e#0#18#0" expanded="true" />
<marker date="1547291183375" expanded="true" signature="225:346" ph="..." />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/mag_up0_diff1.dat">
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="620">
<caret line="58" column="41" lean-forward="true" selection-start-line="58" selection-start-column="41" selection-end-line="58" selection-end-column="41" />
<state relative-caret-position="126">
<caret line="6" column="7" selection-start-line="6" selection-start-column="7" selection-end-line="6" selection-end-column="7" />
</state>
</provider>
</entry>
......
from mgpro import expand, mgmat
from mgpro import expand, mgpro
import math as M
import numpy as np
from mgpro.mgmat import mgmat
from mgpro.mgpro import mgmat
import matplotlib.pyplot as plt
......
......@@ -9,7 +9,7 @@ import sys
import os
from datetime import datetime
import numpy as np
from mgpro.mgmat import mgmat
from mgpro.mgpro import mgmat
from PyQt5.QtWidgets import QMainWindow, QApplication, \
QAction, QMenu, QFileDialog, QGridLayout,QLineEdit, QLabel, \
QWidget, QHBoxLayout, QPushButton, QVBoxLayout,QFrame, \
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
from mgpro import expand, mgmat
import math as M
import numpy as np
from mgpro.mgmat import mgmat
from mgmat import mgmat
import matplotlib.pyplot as plt
......
import numpy as np
from mgpro import expand
import expand
import matplotlib.pyplot as plt
import matplotlib.colors as colors
from scipy.fftpack import fft2, fftshift, ifft2, ifftshift
from scipy.interpolate import griddata
import argparse
def msg():
return '''
Usage: mgpro.py -c<conti>/<diff> -d <dx>/<dy> -o <out_path> [-R <xmin/<xmax>/<ymix>/<ymax>]
'''
def cal_pos(max_len, len_x, len_y):
if max_len > 1 or max_len < 0:
......@@ -117,23 +121,24 @@ class mgmat(object):
def exec():
pass
parser = argparse.ArgumentParser(description="Continuation and derivative for 2d data", usage=msg())
parser.add_argument('-c', help='<conti>: value for continuation; <diff>: order for derivative', required=True, type=str)
parser.add_argument('-d', help='<dx>/<dy>: grid interval in X and Y axis.', required=True, type=str)
parser.add_argument('-o', help='Path to output file ', required=True, dest='path', type=str)
parser.add_argument('-R', help='Specify the region of the study', type=str, default=None)
parser.add_argument('in_file', help='Path to input table file', type=str)
arg = parser.parse_args()
try:
h, order = [float(v) for v in arg.c.split('/')]
dx, dy = [float(v) for v in arg.d.spllt('/')]
if arg.R is not None:
arg.R = [float(v) for v in arg.R.spllt('/')]
except Exception as e:
raise ValueError('{}\nError in parsing arguments.'.format(e))
mg = mgmat(arg.in_file, dx, dy, xy_limit=arg.R)
mg.continuation(h, order)
mg.savetxt(arg.path)
if __name__ == '__main__':
filename = '../mag_geod.dat'
mg = mgmat(filename, 2000, 2000)
mg.continuation(0, 1)
mg.savetxt('../mag_up0_diff1.dat')
# f=plt.figure(figsize=(7, 5))
# mg.pltmap(f, mg.result)
# plt.show()
# ax = f.gca()
# pcm = ax.pcolor(mg.data)
#
# print(ax.get_position())
# cb = f.colorbar(pcm, extend='both')
# ax.set_position([.1,.1] + list(cal_pos(0.7, len(mg.x), len(mg.y))), which='original')
# cb.ax.set_position([.8, .1, 0.1250, 0.78375])
# #mg.pltmap(breakpoint=[-8000, -800, 800, 8000])
# plt.show()
exec()
......@@ -9,7 +9,7 @@ import sys
import os
from datetime import datetime
import numpy as np
from mgpro.mgmat import mgmat
from mgpro.mgpro import mgmat
from PyQt5.QtWidgets import QMainWindow, QApplication, \
QAction, QMenu, QFileDialog, QGridLayout,QLineEdit, QLabel, \
QWidget, QHBoxLayout, QPushButton, QVBoxLayout,QFrame, \
......
......@@ -9,5 +9,5 @@ gmt grd2cpt out.grd -Cjet -Z > tc1.cpt
gmt grdimage out.grd -Ctc1.cpt -R -J -O -K >> $ps
gmt psbasemap -R -J -O -K -Bg >> $ps
rm out.grd tc1.cpt
rm out.grd tc1.cpt gmt*
open $ps
\ No newline at end of file
此差异已折叠。
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册