Hello,
I have successfully run 'msnoise compute_cc' for my data so that I now have a file of 1 day long cross-correlations. I would now like to stack them for the whole time period (~2 years). However, when I try to run 'msnoise stack -r' it fails and I get an error message. I have pasted this below. Would you be able to shed some light onto it? How can I resolve this?
Thanks in advance,
Emily
root@COPS-023603-L:/home/rpgsbs/r01ec15/Documents/BASS_DATA/sorted# msnoise stack -r
Lets STACK !
2016-08-25 15:02:55 [DEBUG] Starting the ref stack
[]
2016-08-25 15:02:55 [DEBUG] Processing BA_BA01:BA_BA02-TT-1
Traceback (most recent call last):
File "/root/anaconda2/bin/msnoise", line 11, in <module>
sys.exit(run())
File "/root/anaconda2/lib/python2.7/site-packages/msnoise/scripts/msnoise.py", line 614, in run
cli(obj={})
File "/root/anaconda2/lib/python2.7/site-packages/click/core.py", line 716, in __call__
return self.main(*args, **kwargs)
File "/root/anaconda2/lib/python2.7/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/root/anaconda2/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/root/anaconda2/lib/python2.7/site-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/root/anaconda2/lib/python2.7/site-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/root/anaconda2/lib/python2.7/site-packages/msnoise/scripts/msnoise.py", line 301, in stack
main('ref', interval)
File "/root/anaconda2/lib/python2.7/site-packages/msnoise/s04stack.py", line 203, in main
updated_days = updated_days_for_dates(db, start, end, pair.replace('_', '.'), jobtype='CC', interval=datetime.timedelta(days=interval),returndays=True)
File "/root/anaconda2/lib/python2.7/site-packages/msnoise/api.py", line 1189, in updated_days_for_dates
days = session.query(Job).filter(Job.pair == pair).filter(Job.day >= date1).filter(Job.day <= date2).filter(Job.jobtype == jobtype).filter(Job.lastmod >= lastmod).group_by(Job.day).order_by(Job.day).all()
File "/root/anaconda2/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2613, in all
return list(self)
File "/root/anaconda2/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2761, in __iter__
return self._execute_and_instances(context)
File "/root/anaconda2/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2776, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/root/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute
return meth(self, multiparams, params)
File "/root/anaconda2/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/root/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
compiled_sql, distilled_params
File "/root/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
context)
File "/root/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
exc_info
File "/root/anaconda2/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/root/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
context)
File "/root/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
cursor.execute(statement, parameters)
File "/root/anaconda2/lib/python2.7/site-packages/pymysql/cursors.py", line 161, in execute
result = self._query(query)
File "/root/anaconda2/lib/python2.7/site-packages/pymysql/cursors.py", line 317, in _query
conn.query(q)
File "/root/anaconda2/lib/python2.7/site-packages/pymysql/connections.py", line 837, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "/root/anaconda2/lib/python2.7/site-packages/pymysql/connections.py", line 1021, in _read_query_result
result.read()
File "/root/anaconda2/lib/python2.7/site-packages/pymysql/connections.py", line 1304, in read
first_packet = self.connection._read_packet()
File "/root/anaconda2/lib/python2.7/site-packages/pymysql/connections.py", line 983, in _read_packet
packet.check_error()
File "/root/anaconda2/lib/python2.7/site-packages/pymysql/connections.py", line 395, in check_error
err.raise_mysql_exception(self._data)
File "/root/anaconda2/lib/python2.7/site-packages/pymysql/err.py", line 120, in raise_mysql_exception
_check_mysql_exception(errinfo)
File "/root/anaconda2/lib/python2.7/site-packages/pymysql/err.py", line 115, in _check_mysql_exception
raise InternalError(errno, errorvalue)
sqlalchemy.exc.InternalError: (pymysql.err.InternalError) (1055, u"Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'msnoise.jobs.ref' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by") [SQL: u'SELECT jobs.ref AS jobs_ref, jobs.day AS jobs_day, jobs.pair AS jobs_pair, jobs.jobtype AS jobs_jobtype, jobs.flag AS jobs_flag, jobs.lastmod AS jobs_lastmod \nFROM jobs \nWHERE jobs.pair = %(pair_1)s AND jobs.day >= %(day_1)s AND jobs.day <= %(day_2)s AND jobs.jobtype = %(jobtype_1)s AND jobs.lastmod >= %(lastmod_1)s GROUP BY jobs.day ORDER BY jobs.day'] [parameters: {u'day_2': datetime.date(2013, 4, 29), u'lastmod_1': datetime.datetime(2016, 8, 24, 15, 2, 55, 233936), u'day_1': datetime.date(2011, 5, 22), u'jobtype_1': 'CC', u'pair_1': 'BA.BA01:BA.BA02'}]
~~~~~~~~~~~~~~~~~~~~~~~~~
Emily Crowder MSc BSc
PhD Student
School of Geosciences
University of Aberdeen
Aberdeen AB24 3UE
Scotland
Em: emily.crowder(a)abdn.ac.uk
~~~~~~~~~~~~~~~~~~~~~~~~~
The University of Aberdeen is a charity registered in Scotland, No SC013683.
Tha Oilthigh Obar Dheathain na charthannas clàraichte ann an Alba, Àir. SC013683.
Hello,
I have used MSNoise's new feature PWS to get some excellent-looking cross-correlations of ambient noise. My problem is that the zero time mark is located at the left edge of the CC graph, rather than at the centre. I wanted to have + to - 300 s but instead I have 0 to 600 s. Has anyone else come across this problem? Is there any fix you can recommend to solve it?
Kind regards,
Emily
~~~~~~~~~~~~~~~~~~~~~~~~~
Emily Crowder MSc BSc
PhD Student
School of Geosciences
University of Aberdeen
Aberdeen AB24 3UE
Scotland
Em: emily.crowder(a)abdn.ac.uk
~~~~~~~~~~~~~~~~~~~~~~~~~
The University of Aberdeen is a charity registered in Scotland, No SC013683.
Tha Oilthigh Obar Dheathain na charthannas clàraichte ann an Alba, Àir. SC013683.