Comments (3)
Okay so turns out it's just a change in behaviour when number of 1-days CCFs is less than mov_stack size.
i.e. for the tests, which use only 1-day of data, having mov_stack = 5 would not return an error in old codes as it would output the 1-day CCF in the place of the 5-day stack based on setting low and high indexing.
old code:
for mov_stack in mov_stacks:
if i < mov_stack:
low = 0
high = mov_stack
else:
low = i - mov_stack + 1
high = i + 1
newdata = False
for uday in datelist[low:high]:
if uday in updated_days:
newdata = True
break
if newdata:
corr = stack_total[low:high]
whereas in the new code, it returns an error if mov_stack is larger than number of ccfs, which is why test failing i.e.
new code:
for mov_stack in mov_stacks:
#print(mov_stack, mov_stacks, len(dr.times))
if mov_stack > len(dr.times):
logger.error("not enough data for mov_stack=%i" % mov_stack)
continue
So not an issue really, but still tests should be updated so will leave open (and have updated title). Perhaps to include 2 days of data and set mov_stack = 2 for example... or even just mov_stack = 1?
from msnoise.
I'm thinking of adding a larger test dataset, but that should be automagically downloaded with https://github.com/fatiando/pooch , making the default code base super light (and not 30 MB as now). Include more than 5 days of data, and also horizontal components, what do you think?
from msnoise.
Related Issues (20)
- Improving move2obpsy.whiten2 (when fft is zero leading to NaNs) HOT 3
- ModuleNotFoundError: No module named 'scipy.fftpack._fftpack HOT 11
- Attempt Rocket-FFT?
- issue when populating data availability from SDS data structure HOT 2
- msnoise stack -r HOT 2
- Import errors with latest werkzeuf and flask versions (msnoise admin) HOT 2
- msnoise cc stack: TypeError due to pandas update HOT 1
- msnoise cc stack -m errors HOT 2
- problem with msnoise
- problem about Scan Archive
- problem about config HOT 2
- problem about Populating station table HOT 5
- the issue about c_c jobs HOT 1
- populating station coordinates HOT 2
- AttributeError: module 'scipy.fftpack' has no attribute 'destroy_zfft_cache' HOT 1
- What does *analysis_duration* controls? HOT 1
- AttributeError: 'DataFrame' object has no attribute 'times' And scary Test HOT 6
- MSNoise - SciPy version compatible HOT 1
- Pandas 2.2.0 and SQL mismatch when importing a database HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msnoise.