Coder Social home page Coder Social logo

geoscience-community-codes / gismo Goto Github PK

View Code? Open in Web Editor NEW
114.0 114.0 46.0 322.53 MB

GISMO - a seismic data analysis toolbox for MATLAB

Home Page: http://geoscience-community-codes.github.io/GISMO/

MATLAB 99.66% M 0.09% Python 0.05% Roff 0.15% Objective-C 0.05%

gismo's People

Contributors

carltape avatar celsoreyes avatar daneketner avatar gthompson avatar mewest avatar usfseismiclab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gismo's Issues

Make a class for units

From @CelsoReyes on August 1, 2015 22:44

which would be used by waveform & friends,
So it can handle integrate and diff, for example.

Copied from original issue: giseislab/gismotools#47

waveform error on antelope database

Problem encountered by Alex Farrell at USF using latest GISMO:

snum=datenum(2011,8,21,12,46,47);
enum=datenum(2011,8,21,12,47,5);
ds=datasource('antelope','/raid/data/antelope/databases/PLUTONS/dbmerged');
scnl=scnlobject('*','HHZ','PL') ;
w_raw=waveform(ds,scnl,snum,enum)
In an assignment A(:) = B, the number of elements in A and B must be the same.

Error in load_antelope>buildAntelopeCriteria (line 115)
critList(N).group(4) = grabCritList('loc', chanTag(N).location);

Error in load_antelope (line 24)
[criteria, nCriteria] = buildAntelopeCriteria(chanInfo);

Error in load_from_datasource (line 14)
w = getter(request);

Error in waveform/waveformFromDatasource (line 167)
w = load_from_datasource(ds, chans, startt, endt, COMBINE_WAVES, usewkaround);

Error in waveform (line 92)
w = waveformFromDatasource(arg1, as_channeltag(arg2), arg3, arg4);

More load_sac issues ...

From @GoogleCodeExporter on August 1, 2015 21:51

** What steps will reproduce the problem?

ifile = '/home/carltape/gismo_test/10992159.CI.SMM.BHE.sac.d.T003_T030';
w = loadsac(waveform,ifile);


** What is the expected output? What do you see instead?
The network code should be 'CI' since the SAC header KNETWK is CI. Instead 
get(w,'network') returns 'CI 345'. More puzzling is that the network code is 
just 'CI' when displayed with disp: 

>> disp(w)
   station:    SMM       network: CI
   channel:    BHE      location: --
     start: 2001-07-20 12:52:27.600
     ....

The problem is undoubtedly in the load_sac interpretation of the header fields 
(and dependent functions. It is not hurting anything right now. But the right 
approach is an overhaul of load_sac, loadSacByFilenames, readsacfile and 
sac2waveform. These grew organically for logical reasons. But the current 
structure makes bug isolation very challenging. Unfortunately I just don't have 
time to look into it right now.

Original issue reported on code.google.com by [email protected] on 23 Feb 2012 at 11:54

Copied from original issue: giseislab/gismotools#30

More load_sac issues ...

From @GoogleCodeExporter on August 1, 2015 21:51

** What steps will reproduce the problem?

ifile = '/home/carltape/gismo_test/10992159.CI.SMM.BHE.sac.d.T003_T030';
w = loadsac(waveform,ifile);


** What is the expected output? What do you see instead?
The network code should be 'CI' since the SAC header KNETWK is CI. Instead 
get(w,'network') returns 'CI 345'. More puzzling is that the network code is 
just 'CI' when displayed with disp: 

>> disp(w)
   station:    SMM       network: CI
   channel:    BHE      location: --
     start: 2001-07-20 12:52:27.600
     ....

The problem is undoubtedly in the load_sac interpretation of the header fields 
(and dependent functions. It is not hurting anything right now. But the right 
approach is an overhaul of load_sac, loadSacByFilenames, readsacfile and 
sac2waveform. These grew organically for logical reasons. But the current 
structure makes bug isolation very challenging. Unfortunately I just don't have 
time to look into it right now.

Original issue reported on code.google.com by [email protected] on 23 Feb 2012 at 11:54

Copied from original issue: giseislab/gismotools#30

trload_css workaround by Carl Tape

Carl Tape (with Yun Wang) found that when they make a bulk request for waveform objects, they would either get no waveforms or all the waveforms. I found the same with IceWeb. Mike West documented same issue previously. Desired behaviour is to always return same number of waveform objects as requested, even if some are empty (i.e. a waveform object with metadata but no timeseries data).

Carl & Yun wrote a modified version of waveform which accepts an additional boolean argument. When set to true, it used a function called "load_antelope_workaround". However, Carl reported by email on October 27 that this workaround no longer exists in GISMO. So Carl asked us to use the test script he posted here:

https://code.google.com/p/gismotools/source/detail?r=397

I have put this code into https://github.com/geoscience-community-codes/GISMO/tree/master/tests/trloadcss_test.m. There are 3 sections of code to test. First section is this code:

%% example 1 - station COR is a problem
startTime = 7.338198148159491e+05;
endTime = 7.338198194455787e+05;
chan = 'BHZ*';
scnl = scnlobject('*',chan,'','');
ds = datasource('uaf_continuous');
w = waveform(ds,scnl,startTime,endTime); 
whos w

I ran this example and result is:

Error using cell/ismember>cellismemberR2012a (line 192)
Input A of class cell and input B of class cell must be cell arrays of
strings, unless one is a string.

Error in cell/ismember (line 56)
[varargout{1:max(1,nargout)}] = cellismemberR2012a(A,B);

Error in load_antelope>get_antelope_traces (line 272)
criteriaList = criteriaList(ismember(critFields, dbFields));

Error in load_antelope (line 48)
[tr, database, fdb] = get_antelope_traces(...

Error in load_antelope>@(oneDB)load_antelope(request,oneDB) (line 37)
antelope_load_fn = @(oneDB) load_antelope(request, oneDB);

Error in load_antelope (line 38)
outputWaveforms = cellfun(antelope_load_fn, database,
'uniformOutput',false); % each cell

Error in load_from_datasource (line 14)
w = getter(request);

Error in waveform/waveformFromDatasource (line 167)
w = load_from_datasource(ds, chans, startt, endt,
COMBINE_WAVES, usewkaround);

Error in waveform (line 92)
w = waveformFromDatasource(arg1, as_channeltag(arg2),
arg3, arg4);

Identify how waveform is used in gismo

From @CelsoReyes on August 1, 2015 22:35

See how the waveform is being used or bypassed in GISMO. If appropriate, add functionality to waveform to simplify this.

Copied from original issue: giseislab/gismotools#39

Correlation/plot chokes when there is only one trace

From @GoogleCodeExporter on August 1, 2015 21:51

What steps will reproduce the problem?
1. Create a correlation object with one trace. 
2. Try to plot it

What is the expected output? What do you see instead?
Meaningless error ensues. 

Please provide any additional information below.
Correlation is meaningless on a single trace. However a single trace object 
should at least behave well and not crash. 

Original issue reported on code.google.com by [email protected] on 18 Dec 2010 at 12:42

Copied from original issue: giseislab/gismotools#16

get_antelope_traces fails when data files are missing

From @GoogleCodeExporter on August 1, 2015 21:51

What steps will reproduce the problem?
------------------------------------------------------------
   scnl=scnlobject('SIT','BHZ','','');
   ds = datasource('uaf_continuous');
   startTime = '06-Jan-2000 10:41:42';
   endTime = '06-Jan-2000 10:43:42';
   w = waveform(ds,scnl,startTime,endTime);


What is the expected output? What do you see instead?
-----------------------------------------------------------
The above example errors out in an unintelligible way. I believe this is 
because database entries actual exists for this scnl and time. However the 
waveform files themselves have been taken offline. This failure should happen 
frequently for waveform calls prior to October 2002. It is conceivable that it 
would happen on rare occasions at other times. It is a problem that could occur 
when calling any malformed .wfdisc table. (Ultimately this is the result of 
poor database integrity. The fact is, though, it happens.)

I suspect the fix is a simple additional check in 
load_antelope>get_antelope_traces. There is surely a formal database way to do 
this check. I don't know it however. The question is how to ask the database 
whether or not data claimed in a wfidisc row, actually exists on file?

Any thoughts on this last question would be welcomed.

Original issue reported on code.google.com by [email protected] on 8 Nov 2011 at 9:41

Copied from original issue: giseislab/gismotools#28

allow shortcuts in basic math operations (+,-, .*, .^, etc)

From @CelsoReyes on August 1, 2015 22:36

Operations run faster when I use w.data instead of get(w,'data').
also, checking for identity operator costs very little, yet can provide decent speedup if used.

% example, in waveform/plus
if b == 0
  return
end
a.data = a.data + b;

Copied from original issue: giseislab/gismotools#40

correlation/conv and deconv not functional

From @GoogleCodeExporter on August 1, 2015 21:51

These convolution/deconvolution routines were committed prematurely and are
not yet functional. How to fix it? I am not sure - probably stare at it for
hours.

Please use labels and text to provide additional information.


Original issue reported on code.google.com by [email protected] on 23 Jan 2010 at 8:26

Copied from original issue: giseislab/gismotools#3

Remove globals

From @CelsoReyes on August 1, 2015 22:32

Look for globals that aren't required anymore, clean them up.
Replace globals with getpref / setpref if they belong to some system setup.

Copied from original issue: giseislab/gismotools#37

Reorganize repository directory structure

From @gthompson on August 12, 2015 9:26

Quick suggestion:

GISMO/classes - all core classes go here (both old and new style)

GISMO/packages - any core packages go here unless they are make sense only for a single class, in which case they can go in the respective class directory

GISMO/contributed, GISMO/contributed_antelope, GISMO/contributed_internal as before, but as some point we might need to test/refactor these

Or perhaps change to:

GISMO/contributed
GISMO/contributed/antelope
GISMO/contributed/UAF (since "internal" isn't meaningful to say USF or ETHZ)
or do we need:
GISMO/external or GISMO/dependent or GISMO/thirdparty - for codes that have dependencies other than core MATLAB

startup_gismo.m - the startup file that gets called, as now

GISMO/contributed_antelope/datascope_tools should probably be migrated to a package - but would this be GISMO/packages/+datascope_tools or GISMO/contributed/antelope/+datascope_tools

What is uispecgram.m and uispecgram.fig? Do we want to keep them? Perhaps move to directory like:
GISMO/applications
or
GISMO/guis
?

Copied from original issue: giseislab/gismotools#53

Set preferences

From @CelsoReyes on August 1, 2015 22:34

Move or create preferences for appropriate values.
Implement using getpref / setpref
Related to Issue #37

Note: as tested, getpref('WaveformSuite','UseHistory') has a 0.002s overhead.

Copied from original issue: giseislab/gismotools#38

Options for dealing with gappy data

From @CelsoReyes on August 1, 2015 22:40

From John Lyons

Now that I have been working [...] with gappy data,
I've wondered about improving how the suite deals with gaps, or at least
building-in more options when faced with gaps (zeros, nan, large +/- number
of your choosing, other?).

Copied from original issue: giseislab/gismotools#44

Problems installing Gismo

Hello my name is Roberto,

I would like to install correctly GISMO but I have a problema,

  1. I copy in my directory c:/Sismica/Gismo-master and unzip the program here (following the instructions image 1).
  2. I add the two lines indicated Image 2
  3. I Run startup but Matlab give an error continuosly image 3, Pehaps because core and depreciated are Split??

So I need signal processing toolbox to run GISMO?
How can I get a free versión of signal processing toolbox ?
matlabgismo
matlabgismo
matlabgismo2
matlabgismo3

matlabgismo2
matlabgismo3

thnak you so much for your answer

Plot record section

Plotting record section
Glenn Thompson [email protected] Wed, Mar 15, 2017 at 9:45 PM
To: Mo Mou [email protected]
Does not exist currently. But Carl Tape has his own library of GISMO add-ons, and that includes one. I think that might be hardwired for Alaska data. I can modify it so it works more generally.

On Mar 15, 2017 9:18 PM, "S.Mostafa Mousavi" [email protected] wrote:
yes, a plot as a function of distance. Do you mean such a function does not already exist in GISMO?
Mostafa

On Wed, Mar 15, 2017 at 6:15 PM, Glenn Thompson [email protected] wrote:
You mean a plot of waveforms as a function of distance from an event? If so, it would be easy for me to add to the Catalog class. waveforms can be added for each event in a catalog. Only missing step is to add station lat/Lon info to waveforms.

On Mar 15, 2017 8:19 PM, "S.Mostafa Mousavi" [email protected] wrote:
Dear Glenn and Celso,

Is there any function in GISMO for plotting record section?

Regards
Mostafa

proposed scnlobject changes

From @GoogleCodeExporter on August 1, 2015 21:51

Purpose of code changes:
Clean up code a little and increase usability.

get.m  - modified to make more readable, and reduce # of gyrations.
      - updated help text
      - took out "uppercase" for error message.

char.m - added this function to return "." separated NSLC
ex           
>> char(scnl)
'NET.STA.LOC.CHA'

unique.m - simplified code

set.m - modified for easier reading. Also this scales better (faster when the 
number of scnlobjects increases)

eq.m - implemented. I don't know how "fast" it is... and it expects ONLY  
scnlobjects.

scnlobject - added ability to create scnlobject from text: eg.
             scnlobject('NET.STA.LOC.CHA') 
             This should make it easier to initialize, since you don't need to split a name up.

I based this off r406.

Original issue reported on code.google.com by [email protected] on 5 Sep 2014 at 1:36

Attachments:

Copied from original issue: giseislab/gismotools#35

dbclose error on loading Antelope data with waveform

From @GoogleCodeExporter on August 1, 2015 21:51

What steps will reproduce the problem?
- Calling waveform against live AEIC wfdisc tables at UAF. It does not always 
occur, but is a frequent issue. It seems impossible to try...catch this error - 
so perhaps that is already being done at the waveform method level or 
Antelope-MATLAB toolbox level?

What is the expected output? 
- a valid waveform object

What do you see instead?

   ??? Error using dbclose

   Usage: DBCLOSE ( DBPTR )

Please use labels and text to provide additional information.

   There are no calls to dbclose in my code. Code like:
      try
         w = waveform(...)
      catch ME
         disp(ME)
         %do something with ME...
      end
   Fails to catch this error, suggesting it is already being caught at a deeper level or is perhaps at the MEX-file level.

   The upshot is my code breaks whenever this error is thrown.

Original issue reported on code.google.com by [email protected] on 5 Oct 2011 at 10:43

Copied from original issue: giseislab/gismotools#27

SAC files aren't recording location codes

From @GoogleCodeExporter on August 1, 2015 21:51

What steps will reproduce the problem?
1. create a sac file for a SCNL that includes the location code (IU, for 
example uses 00 and 10 for location codes)
2. load the sac file into a waveform:    w= loadsac(waveform, mysacfilename)
3. look at the resulting waveform :  disp(w)

What is the expected output? What do you see instead?
There should be a location code.  Instead, there is a location code of --

Please use labels and text to provide additional information.

To fix, change getSCNL from within @waveform/private/sac2waveform.m  
include the location, which is stored in header.KHOLE.
I'm not fixing yet because I don't know what ramifications there might be.

Original issue reported on code.google.com by [email protected] on 22 Nov 2011 at 1:23

Copied from original issue: giseislab/gismotools#29

Subsample for plotting

From @CelsoReyes on August 1, 2015 22:39

From Emily with response from Dane

I would second John's thoughts about gaps, but I'm not sure I have anything
useful to contribute to that end right now.

Also, one other thing just came up. Some kind of auto-decimating just for
plotting would be nice. I'm running up on graphics limitations with some
500 Hz data, so being able to say plot(w,'decimate'), or something to that
effect would be really nice! I want to keep the waveforms as they are, but
I don't always want to wait for Matlab plot all of it just to check
something. (I'm working on implementing something like that on my local
copy ... I would be happy to share the code lines, if it works well enough
... )

Copied from original issue: giseislab/gismotools#43

Waveform loading from Winston is complicated by new Swarm files

From @GoogleCodeExporter on August 1, 2015 21:51

swarm-2.3.1 (and probably a few previous versions) have bundled differently, 
and or renamed, jar files.
   http://volcanoes.usgs.gov/software/swarm/download.php

I am a bit confused by how waveform handles this. The 'auto-load' of a stand 
alone usgs.gov jar file seems to still work. However, the instructions to an 
individual user to source this jar file locally will fail.

Likely a very quick fix. But I don't know this architecture well enough to try 
it.

Original issue reported on code.google.com by [email protected] on 28 Aug 2013 at 7:15

Copied from original issue: giseislab/gismotools#34

Tracked waveform loading

From @CelsoReyes on August 1, 2015 22:38

from Mike West's email:

TRACKED WAVEFORM LOADING

The rebuild should provide a way to know which waveforms were successfully loaded and which were skipped. Currently, a call for 50 traces will return however many elements were successfully found in the datasource. This may be 50. It may be 43. Though this sounds like minor, it has huge implications for the non-waveform data being managed concurrently in the script. Here is sample pseudo-code to demonstrate the issue:
- read a catalog of 50 events
- choose a preferred scnl
- read in waveforms for these 50 events on the preferred scnl
- insert the event information as added fields in the waveforms

This last step will fail unless all 50 waveforms were successfully loaded. Worse, it is not possible to tell which waveform(s) were unable to be loaded.

Solution 1

If a waveform call requests 50 traces, the waveform object that is returned should contain 50 elements, even if some of the requested data do not exist. The non-existant traces would appear as empty waveforms.

Solution 2

Provide an optional output argument that indexes which requested trace were (or were not) successfully loaded. This index array could be used against other matrices intended to mirror the waveform object in shape and size.

I find solution 1 to be the more elegant approach. But I could live with either. This is a huge issue for me however. There are hundreds of lines of code in GISMO, and entire functions, written to allow waveform loads that can be validated against the original request. The way waveform and datasource are currently written this is not a trivial retrofit (I tried it). But if this were built into the architecture of a rebuild, I am sure it would be much easier to include.

Copied from original issue: giseislab/gismotools#42

Working with a signal

Hello,

Please, I would like to ask something about import sac files.

Now I ve run GISMO properlu an I loaded a sac file (this sac file come from a miniseed, and using a dataless and the program rdseed I transformed to sac)

  1. The amplitud of this signal (Y-AXIS) it must be in m/s not in counts, right?? because i've used a dataless.
  2. I ve download signal processing toolbox, but it is impossible to open the variable w.
  3. How can I quit the response of the instrument?? I Have also ples&zeros file to do it but I don't know do it in GISMO
    t
    he link to the sac file;

https://www.dropbox.com/s/162u5o4lkvp0q0e/2014.070.00.00.00.2200.WM.UCM..HHZ.D.SAC?dl=0

images;

matlabgismo4
matlabgismo5
matlabgismo6

Thank you for everything

Update Waveform to take advantage of timeseries objects

From @CelsoReyes on August 1, 2015 22:31

I looked into this, and realize that (on r2012b, on Macbook air) timeseries takes significantly longer than the current implementation.

I tested with 1 day of data at 100 samples / second

nsamp = 100*60*60*24;

w = waveform('XXXX', 'SHZ', 100, '5/20/2003', 1:nsamp);

ts = timeseries(1:nsamp);
ts.setuniformtime('Interval',0.01,'StartTime',datenum('5/20/2003'))
ts.Name = '.XXXX..SHZ';

tests:

>> whos
  Name       Size               Bytes  Class         Attributes
  ts         1x1             69120903  timeseries              
  w          1x1             69124076  waveform                

so the size is about the same. good!

>> tic;w2 = w .* 2; toc; clear w2
Elapsed time is 0.029052 seconds.
>> tic;ts2 = ts .* 2; toc; clear ts2
Elapsed time is 0.182587 seconds.
>> tic;w2 = (w .* 2 + 4)/3; toc; clear w2
Elapsed time is 0.081250 seconds.
>> tic;ts2 = (ts .* 2 + 4)/3; toc; clear ts2
Elapsed time is 0.354160 seconds.
>> 

apparently the built-in timeseries is 5-10 times slower for these basic operations.

Copied from original issue: giseislab/gismotools#36

Translate calls to old catalog class to new catalog class

From @gthompson on August 20, 2015 12:13

At USF I overhauled the catalog class, replacing it with Catalog_full and Catalog_lite which are subclasses (I.e. they inherit from) Catalog_base. In old catalog, users called the constructor directly. In new style, users call readCatalog. Formats supported include Seisan S-files, CSS3.0 flat files (e.g. Antelope), irisFetch etc. But to provide backward compatibility between old & new style, I need to add a function catalog which translates calls to old catalog class (now catalog_old) into calls to readCatalog. Methods and atttributes need to be supported too, as far as possible, or at least fail gracefully. Probably only Antelope calls need to be translated as Silvio, Helena, Carl were only using Antelope. I am the only person who has read in other formats, so far as I am aware.

Tasks:

  • Translate constructor calls to Antelope databases
  • Translate attributes
  • Translate methods

Copied from original issue: giseislab/gismotools#55

response_apply

How can I use the function response_apply with a sac file of poles&zeros?

I have also and script to extract the poles and zeros of this kind of sac files, but I don't know use the function "response_apply" to deconvolve.

Fix correlation toolbox documentation

Sypus, Matthew (NRCAN/RNCAN) [email protected] 16 March 2017 at 16:49
To: "[email protected]" [email protected]
Cc: Matthew Sypus [email protected]
Hi Glenn Thompson,

I was wondering if it would be possible to fix the “correlation cookbook” link (https://geoscience-community-codes.github.io/GISMO/tutorials/correlation/cookbook.html).

I just started my MSc program and I am looking at repeat EQ events. Matlab is my language of choice and I have been told good things about GISMO.

Thanks,

Matthew Sypus

Waveform loading from Winston is complicated by new Swarm files

From @GoogleCodeExporter on August 1, 2015 21:51

swarm-2.3.1 (and probably a few previous versions) have bundled differently, 
and or renamed, jar files.
   http://volcanoes.usgs.gov/software/swarm/download.php

I am a bit confused by how waveform handles this. The 'auto-load' of a stand 
alone usgs.gov jar file seems to still work. However, the instructions to an 
individual user to source this jar file locally will fail.

Likely a very quick fix. But I don't know this architecture well enough to try 
it.

Original issue reported on code.google.com by [email protected] on 28 Aug 2013 at 7:15

Copied from original issue: giseislab/gismotools#34

winston waveserver

Has anyone else had this error when accessing data from a Winston inside a parfor loop? The same error isn't generated if I run the same code serially (for loop).
I've had success using this method in the past, so not sure where the problem lies.

I'm running CentOS 6.3, Java version 1.7.0_25, and MATLAB R2015b.

Error using load_winston>getFromWinston (line 81)
Error using load_winston>getFromWinston (line 81)
Java exception occurred:
java.lang.ArrayIndexOutOfBoundsException: 93031
at gov.usgs.earthworm.TraceBuf.traceBufToWave(TraceBuf.java:355)
at gov.usgs.earthworm.WaveServer.getRawData(WaveServer.java:227)

Error in load_winston (line 44)
[w, status] = getFromWinston(scnl,t1,t2,myDataSource);

Error in waveform (line 137)
w = myLoadRoutine( makeDataRequest(ds,scnls,startt,endt) );

Thanks,
John

Bug in correlation toolkit

An issue from Kyle Brill at MTU:

I found a few issues with the GISMO correlation code that were throwing me errors. Not sure if this is the best way to let you know about them or not, but in case these could be useful to anyone else.

I'm using Matlab 2014b and I cloned the repository this morning.

When plotting a correlation object using the 'DEND' option, I got this error:

Error using str2num (line 32)
Requires string or character array input.

Error in dendrogramplot (line 35)
label = 1- str2num(get(gca,'XTickLabel'));

Error in correlation/plot (line 163)
dendrogramplot(c);

I fixed the error by changing line 35 in dendrogramplot to use str2double instead of str2num, so the line now reads:

label = 1- str2double(get(gca,'XTickLabel'));

and the plot label appears correctly.

When trying to plot a correlation object using the 'OCC' option, I got this error:

Undefined function or variable "index".

Error in correlation/stack (line 54)
c1 = subset(c1,index);

Error in occurrenceplot>doplotrow (line 124)
c1 = stack(c1);

Error in occurrenceplot (line 63)
doplotrow(c1,n,nmax,bins,clusternum(n));

Error in correlation/plot (line 171)
occurrenceplot(c,scale,ord);

The error was thrown because line 53 of stack.m has an if statement checking for the existence of 'index', which in this case I believe the intent was to check for the existence of 'index' as the second input to this function. When I was running exist('index'), the command returned 2, and it turns out that MATLAB was finding the index file from the .git folder in my newly cloned GIT repository which I had added to the search path all at once with the rest of the GISMO directory structure. I changed line 53 to read:

if exist('index','var')

which limited the search to variables in the workspace and seemed to allow everything else to still function normally.

Comprehensive list of GISMO functions

From @CelsoReyes on August 1, 2015 22:43

From John Lyons

a more comprehensive list of available functions would be great. I
would often find myself digging around the web for some function or (gasp)
writing my own, but later in digging around in the actual suite functions
would find something similar or better that wasn't documented anywhere.

This corresponds to GISMO in general, I would think.

Copied from original issue: giseislab/gismotools#46

Remove/replace loadsac?

From @GoogleCodeExporter on August 1, 2015 21:51

I propose that waveform/loadsac be either removed or reworked. It is legacy. 
loadsac bypasses scnlobjects and datasouces and does not fails inelegantly (for 
example if the desired file does not exist.) Both options are trivial, but 
deserves wider consideration. Loading SAC files is causing confusion in the 
community.

OPTION 1
Officially deprecate loadsac. Push users toward datasource/scnlobject approach. 
For dumb file loading suggest contrib/sac_file_tools/loadsacfile.m

OPTION 2
Bring contrib/sac_file_tools/loadsacfile.m inside @waveform and rename it to 
replace existing loadsac.

Thoughts? 

Original issue reported on code.google.com by [email protected] on 17 Feb 2011 at 5:00

Copied from original issue: giseislab/gismotools#23

Waveform not spanning Antelope day database boundaries

From @GoogleCodeExporter on August 1, 2015 21:51

What steps will reproduce the problem?

ds = datasource('uaf_continuous');
scnl = scnlobject('RDWB','BHZ','','');
time = datenum(['04/01/2009 00:00' ; '04/01/2009 01:00']);
w = waveform(ds,scnl,time-600/86400,time+600/86400)

The problem arises because the first set of start/end times fails to grab data 
from both sides of the day boundary. Example should be pretty self explanatory.





Original issue reported on code.google.com by [email protected] on 10 Feb 2011 at 11:11

Copied from original issue: giseislab/gismotools#22

medfilt1 namespace clash

When Carl Tape runs this:

fs = 100;
t = 0:1/fs:1;
x = sin(2_pi_t_3)+0.25_sin(2_pi_t*40);
y = medfilt1(x,10);
figure,clf
plot(t,x,t,y),grid on
xlabel 'Time (s)',ylabel Signal
legend('Original','Filtered')
legend boxoff

He gets this error:

Error using hg.root/get
The name 'start' is not an accessible property for an instance of class 'root'.
Error in medfilt1 (line 18)
s = get(w(n),'start');

Matlab doesn't even "see" the built-in version of medfilt1 -- all it
can see is the GISMO version.


tests not running

I'm not able to run tests now that they've been put into a package, even after trying to import tests. do they run for you?

runtests()
runtests('test_TraceData')

correlation cookbook no longer works

c = correlation('DEMO');
Error using correlation/check (line 66)
CHECK requires a valid method as second parameter.

Error in correlation (line 375)
elseif ~check(c,'SAMP')

Has "samp" been renamed to something like "samplerate"?

Rip out history

From @CelsoReyes on August 1, 2015 22:37

Remove automatic history tracking from the waveform objects.

Reasoning: Bloat, processing time, and code maintainability.

Copied from original issue: giseislab/gismotools#41

Catalog not subsetting magnitudes properly

Hello Dr. Thompson,

My name is Marlon and I'm a MS Geophysics grad student at Boise State looking at an Alaska earthquake catalog.

I've installed GISMO and it's working great at helping me quantify the robustness at the earthquake catalog I am interested. However, I was wondering if there is a way of using GISMO to produce a map of b-values (map view, not just the standard G-R relationship), which I know the older matlab package ZMAP can do.

And I noticed that the cookbook way to only parse out a catalog by magnitude type isn't working
e.g. :
data = Catalog.retrieve('iris', 'starttime', '2014-01-01', 'endtime', '2015-12-30','magnitudeType', 'ml', 'maximumdepth', maxDepth ,'boxcoordinates', region1);

should just extract local magnitude ('ml') events, but all magnitude types are included in the catalog upon inspection afterwards. Is there a work around for this?

Thanks for entertaining my questions!

Cheers,

Marlon

Broken tutorial links

bug in wiggleplot.m ?

From @GoogleCodeExporter on August 1, 2015 21:51

In wiggleplot.m from line 53 on, should we use get(c(ord),'sta'), instead of 
get(c,'sta')?

% replace dates with station names if stations are different
if ~check(c,'STA')
    sta  = get(c,'STA');
    chan = get(c,'CHAN');

    for i=1:get(c,'TRACES')
        labels(i) = strcat( sta(i) , '_' , chan(i) );
    end
    set( gca , 'YTick' , [1:1:get(c,'TRACES')] );
    set( gca , 'YTickLabel' , labels );
end



Original issue reported on code.google.com by [email protected] on 17 Sep 2012 at 4:37

Copied from original issue: giseislab/gismotools#33

RSAM features

  • add tutorial

Ideas from INETER:

  • stack, subtract & divide RSAM objects from each other
  • same for mean frequency data as in Shishaldin paper
  • plot Seisan catalog data on top of RSAM - make example

waveform not loading any data from Antelope

Here is a minimal example which should load 1 hour of data from the EHZ channel at station RSO on Redoubt on 2009/03/20:

scnl = scnlobject('RSO','EHZ')
ds = datasource('uaf_continuous')
w=waveform(ds,scnl,datenum(2009,3,20),datenum(2009,3,20,1,0,0))

Result:

Error using cell/ismember>cellismemberR2012a (line 192)
Input A of class cell and input B of class cell must be cell arrays of
strings, unless one is a string.

Error in cell/ismember (line 56)
[varargout{1:max(1,nargout)}] = cellismemberR2012a(A,B);

Error in load_antelope>get_antelope_traces (line 272)
criteriaList = criteriaList(ismember(critFields, dbFields));

Error in load_antelope (line 48)
[tr, database, fdb] = get_antelope_traces(...

Error in load_antelope>@(oneDB)load_antelope(request,oneDB) (line 37)
antelope_load_fn = @(oneDB) load_antelope(request, oneDB);

Error in load_antelope (line 38)
outputWaveforms = cellfun(antelope_load_fn, database,
'uniformOutput',false); % each cell

Error in load_from_datasource (line 14)
w = getter(request);

Error in waveform/waveformFromDatasource (line 167)
w = load_from_datasource(ds, chans, startt, endt,
COMBINE_WAVES, usewkaround);

Error in waveform (line 92)
w = waveformFromDatasource(arg1, as_channeltag(arg2),
arg3, arg4);

correlation constructor misbehaving on gappy waveforms.

From @GoogleCodeExporter on August 1, 2015 21:51

c = correlation(waveform) appears to fail when waveform is gappy. I don't
understand this as I have attempted to be gap aware. correlation does issue
a warning, but clearly it needs something more. Should be a quick fix. I'll
get to it ...


Original issue reported on code.google.com by [email protected] on 6 Apr 2010 at 12:32

Copied from original issue: giseislab/gismotools#11

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.