Skip to content

Commit

Permalink
minor gui updates, vernum and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
RJbalikian committed Oct 11, 2023
1 parent 9670c9e commit 4548d8f
Show file tree
Hide file tree
Showing 8 changed files with 4,802 additions and 14 deletions.
4 changes: 2 additions & 2 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package:
name: sprit
version: 0.1.41
version: 0.1.42

source:
git_url: https://github.com/RJbalikian/SPRIT-HVSR
git_tag: v0.1.41
git_tag: v0.1.42

build:
number: 0
Expand Down
2 changes: 1 addition & 1 deletion docs/generate_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#Whether to convert_md using markdown library (True), or let github do it (False)
convert_md=True
rtd_theme=False #Not currently working
release_version= '0.1.41'
release_version= '0.1.42'

currentDir = pathlib.Path((__file__)).parent
docsDir = currentDir
Expand Down
4,776 changes: 4,776 additions & 0 deletions docs/main.html

Large diffs are not rendered by default.

21 changes: 15 additions & 6 deletions docs/sprit_gui.html
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,7 @@ <h1 class="title">Module <code>sprit.sprit_gui</code></h1>
#self.update_idletasks()

def update_input_params_call():
self.data_read = False
self.input_params_call.configure(text=&#34;input_params( datapath=&#39;{}&#39;, metapath={}, site=&#39;{}&#39;, instrument=&#39;{}&#39;,\n\tnetwork=&#39;{}&#39;, station=&#39;{}&#39;, loc=&#39;{}&#39;, channels=[{}, {}, {}], \n\tacq_date=&#39;{}&#39;, starttime=&#39;{}&#39;, endttime=&#39;{}&#39;, tzone=&#39;{}&#39;, \n\txcoord={}, ycoord={}, elevation={}, input_crs=&#39;{}&#39;, output_crs=&#39;{}&#39;, elev_unit=&#39;{}&#39;, \n\thvsr_band=[{}, {}], peak_freq_range=[{}, {}])&#34;.format(
self.data_path.get(), self.meta_path.get(), self.site_name.get(), self.instrumentSel.get(),
self.network.get(), self.station.get(), self.location.get(),
Expand All @@ -672,7 +673,6 @@ <h1 class="title">Module <code>sprit.sprit_gui</code></h1>

def on_source_select():
self.data_read = False
print(self.file_source.get())
try:
str(self.file_source.get())
sourceLabel.configure(text=&#34;source=&#39;{}&#39;&#34;.format(self.file_source.get()))
Expand Down Expand Up @@ -752,8 +752,8 @@ <h1 class="title">Module <code>sprit.sprit_gui</code></h1>
#This is primarily so that if just the Run button is pushed, it will know to first read the data
self.data_read = False


def filepath_update():
self.data_read = False
self.fpath = self.data_path.get()
self.data_read = False
update_input_params_call()
Expand Down Expand Up @@ -799,6 +799,7 @@ <h1 class="title">Module <code>sprit.sprit_gui</code></h1>


def browse_metadata_filepath():
self.data_read = False #New file will not have been read, set to False
filepath = filedialog.askopenfilename()
if filepath:
self.metadata_filepath_entry.delete(0, &#39;end&#39;)
Expand Down Expand Up @@ -889,6 +890,7 @@ <h1 class="title">Module <code>sprit.sprit_gui</code></h1>


def any_time_change():
self.data_read = False #New file will not have been read, set to False
self.acq_date = self.date_entry.get_date()
self.starttime, self.endtime = get_times()
update_input_params_call()
Expand Down Expand Up @@ -1152,6 +1154,7 @@ <h1 class="title">Module <code>sprit.sprit_gui</code></h1>
else:
trim_dir = self.trim_dir.get()

self.data_read = False #New file will not have been read, set to False
self.fetch_data_call.configure(text=&#34;fetch_data(params, source=&#39;{}&#39;, trim_dir={}, export_format=&#39;{}&#39;, detrend=&#39;{}&#39;, detrend_order={})&#34;
.format(self.file_source.get(), trim_dir, self.export_format.get(), self.detrend.get(), self.detrend_order.get()))

Expand Down Expand Up @@ -3715,6 +3718,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
#self.update_idletasks()

def update_input_params_call():
self.data_read = False
self.input_params_call.configure(text=&#34;input_params( datapath=&#39;{}&#39;, metapath={}, site=&#39;{}&#39;, instrument=&#39;{}&#39;,\n\tnetwork=&#39;{}&#39;, station=&#39;{}&#39;, loc=&#39;{}&#39;, channels=[{}, {}, {}], \n\tacq_date=&#39;{}&#39;, starttime=&#39;{}&#39;, endttime=&#39;{}&#39;, tzone=&#39;{}&#39;, \n\txcoord={}, ycoord={}, elevation={}, input_crs=&#39;{}&#39;, output_crs=&#39;{}&#39;, elev_unit=&#39;{}&#39;, \n\thvsr_band=[{}, {}], peak_freq_range=[{}, {}])&#34;.format(
self.data_path.get(), self.meta_path.get(), self.site_name.get(), self.instrumentSel.get(),
self.network.get(), self.station.get(), self.location.get(),
Expand All @@ -3735,7 +3739,6 @@ <h2 class="section-title" id="header-classes">Classes</h2>

def on_source_select():
self.data_read = False
print(self.file_source.get())
try:
str(self.file_source.get())
sourceLabel.configure(text=&#34;source=&#39;{}&#39;&#34;.format(self.file_source.get()))
Expand Down Expand Up @@ -3815,8 +3818,8 @@ <h2 class="section-title" id="header-classes">Classes</h2>
#This is primarily so that if just the Run button is pushed, it will know to first read the data
self.data_read = False


def filepath_update():
self.data_read = False
self.fpath = self.data_path.get()
self.data_read = False
update_input_params_call()
Expand Down Expand Up @@ -3862,6 +3865,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>


def browse_metadata_filepath():
self.data_read = False #New file will not have been read, set to False
filepath = filedialog.askopenfilename()
if filepath:
self.metadata_filepath_entry.delete(0, &#39;end&#39;)
Expand Down Expand Up @@ -3952,6 +3956,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>


def any_time_change():
self.data_read = False #New file will not have been read, set to False
self.acq_date = self.date_entry.get_date()
self.starttime, self.endtime = get_times()
update_input_params_call()
Expand Down Expand Up @@ -4215,6 +4220,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
else:
trim_dir = self.trim_dir.get()

self.data_read = False #New file will not have been read, set to False
self.fetch_data_call.configure(text=&#34;fetch_data(params, source=&#39;{}&#39;, trim_dir={}, export_format=&#39;{}&#39;, detrend=&#39;{}&#39;, detrend_order={})&#34;
.format(self.file_source.get(), trim_dir, self.export_format.get(), self.detrend.get(), self.detrend_order.get()))

Expand Down Expand Up @@ -6562,6 +6568,7 @@ <h3>Methods</h3>
#self.update_idletasks()

def update_input_params_call():
self.data_read = False
self.input_params_call.configure(text=&#34;input_params( datapath=&#39;{}&#39;, metapath={}, site=&#39;{}&#39;, instrument=&#39;{}&#39;,\n\tnetwork=&#39;{}&#39;, station=&#39;{}&#39;, loc=&#39;{}&#39;, channels=[{}, {}, {}], \n\tacq_date=&#39;{}&#39;, starttime=&#39;{}&#39;, endttime=&#39;{}&#39;, tzone=&#39;{}&#39;, \n\txcoord={}, ycoord={}, elevation={}, input_crs=&#39;{}&#39;, output_crs=&#39;{}&#39;, elev_unit=&#39;{}&#39;, \n\thvsr_band=[{}, {}], peak_freq_range=[{}, {}])&#34;.format(
self.data_path.get(), self.meta_path.get(), self.site_name.get(), self.instrumentSel.get(),
self.network.get(), self.station.get(), self.location.get(),
Expand All @@ -6582,7 +6589,6 @@ <h3>Methods</h3>

def on_source_select():
self.data_read = False
print(self.file_source.get())
try:
str(self.file_source.get())
sourceLabel.configure(text=&#34;source=&#39;{}&#39;&#34;.format(self.file_source.get()))
Expand Down Expand Up @@ -6662,8 +6668,8 @@ <h3>Methods</h3>
#This is primarily so that if just the Run button is pushed, it will know to first read the data
self.data_read = False


def filepath_update():
self.data_read = False
self.fpath = self.data_path.get()
self.data_read = False
update_input_params_call()
Expand Down Expand Up @@ -6709,6 +6715,7 @@ <h3>Methods</h3>


def browse_metadata_filepath():
self.data_read = False #New file will not have been read, set to False
filepath = filedialog.askopenfilename()
if filepath:
self.metadata_filepath_entry.delete(0, &#39;end&#39;)
Expand Down Expand Up @@ -6799,6 +6806,7 @@ <h3>Methods</h3>


def any_time_change():
self.data_read = False #New file will not have been read, set to False
self.acq_date = self.date_entry.get_date()
self.starttime, self.endtime = get_times()
update_input_params_call()
Expand Down Expand Up @@ -7062,6 +7070,7 @@ <h3>Methods</h3>
else:
trim_dir = self.trim_dir.get()

self.data_read = False #New file will not have been read, set to False
self.fetch_data_call.configure(text=&#34;fetch_data(params, source=&#39;{}&#39;, trim_dir={}, export_format=&#39;{}&#39;, detrend=&#39;{}&#39;, detrend_order={})&#34;
.format(self.file_source.get(), trim_dir, self.export_format.get(), self.detrend.get(), self.detrend_order.get()))

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
author = "Riley Balikian"
name = "sprit"
authors = [{name="Riley Balikian"}, {name="Hongyu Xaio"}]
dynamic = ["readme"]
license = {file = "LICENSE"}
version="0.1.41"
version="0.1.42"
description = "A package for processing and analyzing HVSR (Horizontal to Vertical Spectral Ratio) data"
keywords = ["HVSR", "seismic", "horizontal to vertical spectral ratio", "obspy", 'geology', 'geophysics', 'geotechnical']
requires-python = ">=3.9"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
name="sprit",
author= "Riley Balikian",
author_email = "[email protected]",
version="0.1.41",
version="0.1.42",
package_data={'sprit': ['resources/*', 'resources/icon/*', 'resources/themes/*', 'resources/themes/forest-dark/*', 'resources/themes/forest-light/*', 'resources/sample_data/*',]},
long_description_content_type="text/markdown",
long_description=long_description,
Expand Down
Binary file modified sprit/__pycache__/sprit_gui.cpython-311.pyc
Binary file not shown.
7 changes: 5 additions & 2 deletions sprit/sprit_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,7 @@ def prog_bar_update(progBarListList, progPercent, processName):
#self.update_idletasks()

def update_input_params_call():
self.data_read = False
self.input_params_call.configure(text="input_params( datapath='{}', metapath={}, site='{}', instrument='{}',\n\tnetwork='{}', station='{}', loc='{}', channels=[{}, {}, {}], \n\tacq_date='{}', starttime='{}', endttime='{}', tzone='{}', \n\txcoord={}, ycoord={}, elevation={}, input_crs='{}', output_crs='{}', elev_unit='{}', \n\thvsr_band=[{}, {}], peak_freq_range=[{}, {}])".format(
self.data_path.get(), self.meta_path.get(), self.site_name.get(), self.instrumentSel.get(),
self.network.get(), self.station.get(), self.location.get(),
Expand All @@ -643,7 +644,6 @@ def update_input_params_call():

def on_source_select():
self.data_read = False
print(self.file_source.get())
try:
str(self.file_source.get())
sourceLabel.configure(text="source='{}'".format(self.file_source.get()))
Expand Down Expand Up @@ -723,8 +723,8 @@ def on_data_path_change(data_path, index, trace_mode):
#This is primarily so that if just the Run button is pushed, it will know to first read the data
self.data_read = False


def filepath_update():
self.data_read = False
self.fpath = self.data_path.get()
self.data_read = False
update_input_params_call()
Expand Down Expand Up @@ -770,6 +770,7 @@ def browse_data_filepath():


def browse_metadata_filepath():
self.data_read = False #New file will not have been read, set to False
filepath = filedialog.askopenfilename()
if filepath:
self.metadata_filepath_entry.delete(0, 'end')
Expand Down Expand Up @@ -860,6 +861,7 @@ def get_times():


def any_time_change():
self.data_read = False #New file will not have been read, set to False
self.acq_date = self.date_entry.get_date()
self.starttime, self.endtime = get_times()
update_input_params_call()
Expand Down Expand Up @@ -1123,6 +1125,7 @@ def update_fetch_call():
else:
trim_dir = self.trim_dir.get()

self.data_read = False #New file will not have been read, set to False
self.fetch_data_call.configure(text="fetch_data(params, source='{}', trim_dir={}, export_format='{}', detrend='{}', detrend_order={})"
.format(self.file_source.get(), trim_dir, self.export_format.get(), self.detrend.get(), self.detrend_order.get()))

Expand Down

0 comments on commit 4548d8f

Please sign in to comment.