Comments (3)
Hint on error 2:
On a file that does read in fine, when we hit the function _read_element
in metadata_helpers.py, the value of element dict is:
element_dict
Out[3]:
{'orientation': OrderedDict([('angle_to_geographic_north', '0.000'),
('value', 'orthogonal')])}
But in the failing case, we have:
element_dict
Out[6]: {'orientation': 'sitelayout'}, and since the value of orienation is not a dict, we get the error, since the string has no items() method.
So, starting from emtfxml.py, when element == site
(around line 306),
the attr is ______ and this goes into attr.read_dict()
read_dict loops over site keys, and when it gets to orientation, for the workng case in site.py,
lines ~95-110 we have this output
element
Out[3]: 'orientation'
attr
Out[4]:
{
"orientation": {
"angle_to_geographic_north": 0.0,
"layout": "orthogonal"
}
}
But in the broken case I also see (and cut and paste):
element
Out[6]: 'orientation'
attr
Out[7]:
{
"orientation": {
"angle_to_geographic_north": 0.0,
"layout": "orthogonal"
}
}
from mt_metadata.
In orientation.py, in the read_dict
method in the working case, we have:
input_dict
Python 3.10.10 (main, Mar 21 2023, 18:45:11) [GCC 11.2.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.12.0 -- An enhanced Interactive Python. Type '?' for help.
PyDev console: using IPython 8.12.0
Out[1]:
OrderedDict([('project', 'USMTArray'),
('survey', 'CONUS SoCal'),
('year_collected', '2019'),
('country', 'USA'),
('id', 'CAR04'),
('name', 'The Meadows Slough, CA, USA'),
('location',
OrderedDict([('latitude', '38.245768'),
('longitude', '-121.489255'),
('elevation', '0.000'),
('declination',
OrderedDict([('epoch', '1995.0'),
('value', '13.200')])),
('datum', 'WGS84')])),
('orientation',
OrderedDict([('angle_to_geographic_north', '0.000'),
('value', 'orthogonal')])),
('acquired_by', 'National Geoelectromagnetic Facility'),
('start', '2019-05-03T22:29:40'),
('end', '2019-05-09T00:25:42'),
('run_list', 'CAR04a'),
('data_quality_notes',
OrderedDict([('rating', '1'),
('good_from_period', '20.000'),
('good_to_period', '400.000'),
('comments',
OrderedDict([('author',
'Adam Schultz and Esteban Bowles-Martinez'),
('value',
'Very poor data quality will require careful removal of large frequency bands before inverting.')]))])),
('data_quality_warnings',
OrderedDict([('flag', '1'),
('comments',
OrderedDict([('author',
'Adam Schultz and Esteban Bowles-Martinez')]))]))])
but in the broken case we have:
input_dict
Out[2]:
OrderedDict([('project', 'USMTArray'),
('survey', 'CONUS SoCal'),
('year_collected', '2019'),
('country', 'USA'),
('id', 'CAS03'),
('name', 'Pleasanton Ridge, CA, USA'),
('location',
OrderedDict([('latitude', '37.658830'),
('longitude', '-121.959752'),
('elevation', '484.050'),
('declination',
OrderedDict([('epoch', '1995.0'),
('value', '15.000')])),
('datum', 'WGS84')])),
('orientation', 'sitelayout'),
('acquired_by', 'National Geoelectromagnetic Facility'),
('start', '2019-10-24T22:07:08'),
('end', '2019-11-08T00:49:32'),
('run_list', 'CAS03a CAS03b'),
('data_quality_notes',
OrderedDict([('rating', '1'),
('good_from_period', '30.000'),
('good_to_period', '100.000'),
('comments',
OrderedDict([('author',
'Adam Schultz and Esteban Bowles-Martinez'),
('value',
'Signal overwhelmed by cultural noise near electric train in San Francisco Bay Area. Very poor data quality that will require careful removal of large frequency bands before inverting.')]))])),
('data_quality_warnings',
OrderedDict([('flag', '1'),
('comments',
OrderedDict([('author',
'Adam Schultz and Esteban Bowles-Martinez')]))]))])
from mt_metadata.
Both now pass with commit cd25167
from mt_metadata.
Related Issues (20)
- List of next level objects should become an OrderedDict HOT 1
- Should Auxiliary channels require component field? HOT 1
- Make validation more efficient
- MTime does not support nanoseconds
- pandas Timestamp does not support years greater than 2600 or so
- remove aurora dependencies from processing config HOT 2
- Aurora not passing since merge HOT 1
- No attribute period error HOT 2
- Replace ListDict with Box
- TF instance has different values for self.transfer_function and self.dataset.transfer_function HOT 1
- TF XML Ingest HOT 13
- Z-file headers HOT 3
- write/read tf broken by "comments" HOT 1
- Add mt_metadata version in summary of metadata standards.
- TF should use SurveyMetadata as sole metadata object
- time and frequency axes are permuted in FC HOT 2
- Use Loguru for logging
- dataless mth5 from fdsn HOT 16
- python 3.7 install failing on fcs branch HOT 1
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 mt_metadata.