204 Commits

Author SHA1 Message Date
Darius Arnold
790cf803d7 Add init to ARZcf that extracts parameters from pickparams
t1, t2 cant be extracted in the init function since they are not the same during the first and the second instantiation.
2019-04-09 17:43:30 +02:00
Darius Arnold
ab6e74c482 Add init to HOScf that extracts parameters from pickparams 2019-04-09 17:30:05 +02:00
Darius Arnold
d45a5ccf0d Change checkZ4S so it extracts the required parameters 2019-04-09 17:05:51 +02:00
Darius Arnold
c45f52510b Change checksignallength so it extracts the required parameters
from the PylotParameter instance itself. The function is only used in one place, so this change wont break anything else.
2019-04-09 17:00:43 +02:00
Darius Arnold
6936cfcfa6 [bugfix] Taupy didn't check return of get_coordinates
For a station not in the metadata, get_coordinates would return None which wasn't checked for.
This includes a test for a station which is not in metadata.
2018-08-13 22:42:19 +02:00
Darius Arnold
96adbddeba [remove] unused parameter in create_arrivals
The station id is no longer passed into the function and used to retrieve the station coordinates, but the id is taken from the vertical stream instead.
2018-08-13 22:37:48 +02:00
Darius Arnold
dcd0bc40d7 [remove] old autopickstation code 2018-08-13 22:35:38 +02:00
Darius Arnold
b7d3568498 [bugfix] Taupy used even if disabled when p start time > 0
If Taupy was disabled, but pstart was larger than zero, the and would lead to the function that modifies starttimes not exiting. This resulted in taupy being used even though it was disabled when the p starttime was above 0.
2018-08-09 10:03:25 +02:00
Darius Arnold
45370e2c67 [bugfix] PickingResults raised incorrect error on missing attribute
Accessing a non existing attribute raised a KeyError instead of an AttributeError, breaking methods that relied on the correct error type. Maybe this fixes the __setstate__ bug during event picking from GUI.
2018-08-08 19:25:11 +02:00
e46c0fb862 [minor] typos 2018-08-07 10:06:39 +02:00
Darius Arnold
0c4085ed76 [bugfix] station name was in dictionary instead of a list item for autopickstations return value
Old implementation of autopickstation returned a list containing a dcitionary with results as a first value and a string with the station name as a second value. The new version used to return a single dict with a key/value station name pair, which the calling code could not unpack. The new implementation now also returns a list with picking results and station name.
2018-08-03 13:50:14 +02:00
Darius Arnold
2b9cf655ae [change] autopickstation works with new Metadata class 2018-08-03 13:47:46 +02:00
Darius Arnold
a45e817213 Merge remote-tracking branch 'origin/develop' into feature/refactor 2018-08-03 11:55:13 +02:00
Darius Arnold
b9cf219b39 Adding/modifying documentation in autopick.py 2018-08-03 11:05:42 +02:00
Darius Arnold
8dcea2a8c3 [change] PickingResults now only stores actual results, PickingContainer stores intermediary values
PickingResults now stores only the actual results of picking, which are returned from the autopickstation function. 
To store intermediary results during picking, the new class PickingContainer is used.
2018-08-03 10:59:10 +02:00
Darius Arnold
7bbcb489bf [refactor] add current_figure attribute
This instance attribute holds the current figure,which removes the need for an external function to extract the correct figure from the fig_dict and the need to pass the figure into instance methods (it can now be directly accessed by the attribute).
2018-07-30 14:28:21 +02:00
Darius Arnold
97458b5b42 [minor] small code changes 2018-07-30 14:08:49 +02:00
Darius Arnold
b4316ae717 [refactor] improving S pick code by extracting functions 2018-07-30 13:36:09 +02:00
Darius Arnold
c89e47ac43 [change] Extract function that calculates cuttimes 2018-07-30 12:43:56 +02:00
Darius Arnold
da2b1ed133 [change] Enable picking on traces with only one vertical component
Only the P pick will be calculated
2018-07-30 12:03:33 +02:00
bf5c371459 [bugfix] various bugfixes originating from changes (more picks) in dictionary (refs #233 refs #234) 2018-07-25 14:05:15 +02:00
bfc745dd30 Merge branch 'develop'
Conflicts:
	pylot/core/pick/autopick.py
2018-07-25 10:53:08 +02:00
146ef7098c [bugfix] closes #233 closes #234
can cope with stations without horizontal components now, removed dangerous try/except construct
2018-07-25 10:48:43 +02:00
Darius Arnold
7fe5d0f7a3 [remove] Redundant checks for missing waveform data
Missing waveform data is now handled before picking starts, so it is not necessary to check during picking.
2018-07-20 14:50:27 +02:00
Darius Arnold
61b14dc770 [change] Create clean PickingResults instance with only required values
During picking, intermediary values were saved in p_results or s_results PickingResults instance.
Additionally the PickingResults class contained members that were only used during picking but not when returning the results, thus wasting space after picking, because they stayed in the instance. 
Now autopickstation generates a clean PickingResults containing only the members that are expected in the results.
2018-07-20 14:49:10 +02:00
Darius Arnold
153beff663 [add] tests for picking with missing trace in stream 2018-07-20 13:02:57 +02:00
Darius Arnold
318ca25ef8 [add] handling missing traces
either a missing vertical or missing both vertical traces in the wfstream will fail picking and return None. This is the same behaviour as before refactoring.
2018-07-20 13:00:19 +02:00
1fc62a5e9d [bugfix] add trace starttime to metadata.get_coordinates call 2018-07-17 14:49:37 +02:00
7a0d3486a6 [cleanup] code cleanup by PyCharm 2018-07-17 14:49:34 +02:00
b22d04db47 [cleanup] replace equality by "is" 2018-07-17 14:45:50 +02:00
0e70520a78 [bugfix] Spick quality check doing random stuff caused by copy paste errors 2018-07-17 14:45:48 +02:00
Darius Arnold
27f5a0d50c [remove] unused function, check was moved to init method
In the init method of autopickstation the N trace will be copied to the E trace or reversed if one of them is missing, so checking for it during S picking has become redundant.
2018-07-17 14:01:23 +02:00
Darius Arnold
85b34177c4 [add] default values for parameters of AutoPickStation init method 2018-07-17 13:59:46 +02:00
Darius Arnold
775d3de46c Change whitespace, add comments/documentation 2018-07-17 13:59:13 +02:00
Darius Arnold
6d26338f2e Decrease indentation in pick_s_phase
Instead of checking if(condition){DoSomething()}; check if (!condition){ErrorOut()}; DoSomething();.
This allows to decrease the indentation of the potentially large codeblock DoSomething().
2018-07-17 13:56:25 +02:00
Darius Arnold
2c92f6f2fd Merge branch 'develop' into feature/refactor 2018-07-13 09:28:50 +02:00
3b52b7a28f [bugfix] fixed some bugs resulting from restructuring of serial/parallel picking 2018-07-12 15:56:34 +02:00
9f1672d793 [hotfix] something went wrong trying to merge/rebase develop 2018-07-12 14:17:06 +02:00
319343499b [bugfix] parallel picking called accidently 2018-07-12 14:14:22 +02:00
9a5624c951 [change] return values of autopickstation 2018-07-12 14:13:19 +02:00
3bd5243f2a [minor] typo 2018-07-12 10:04:35 +02:00
6c162fc94a [new] first use of Metadata class in autoPyLoT, largely increasing read performance using obspyDMT (single DATALESS-Seed files) 2018-07-12 09:42:35 +02:00
c3e8b2c03d /metadata_class: Auto stash before merge of "feature/metadata_class" and "develop" 2018-07-11 14:01:47 +02:00
a0fcf03c1e [update] add try/except to autopickstation call 2018-07-11 09:42:28 +02:00
1de1dc71f8 [bugfix] reinstated ludgers changes, added bugfix for GUI 2018-07-10 11:47:45 +02:00
ccec76b8a1 [revert] iplot = iplot for wadati/jackknife not showing plots anymore in GUI
Note: Are not Wadati and Jackknife figures meant to be shown always? Independent of iplot flag?
2018-07-09 11:06:19 +02:00
Darius Arnold
1ff50c000e Decrease indentation by returning from error condition 2018-07-06 16:17:07 +02:00
Darius Arnold
71d8626fa3 [bugfix] parameters tpred2z and tdet2z were unused 2018-07-06 11:10:02 +02:00
Darius Arnold
5258a7e9b4 Merge remote-tracking branch 'origin/develop' into feature/refactor 2018-07-06 09:49:52 +02:00
df0f059ff3 [bugfix] parameters tpred2z and tdet2z were unused 2018-07-05 14:37:32 +02:00