Hi,
The following line:
cat in.station.xml |\
yasmine-cli --level_station=*.* --field=latitude --value=yml:example_latitude.yaml --dont_validate -o out.station.xml
with the following yaml file:
Latitude: {
lower_uncertainty: 0.00018, upper_uncertainty: 0.00018, value: -12.962362}
returns the error:
Traceback (most recent call last):
File "/opt/anaconda3/envs/obsinfo/bin/yasmine-cli", line 8, in <module>
sys.exit(main())
File "/opt/anaconda3/envs/obsinfo/lib/python3.10/site-packages/yasmine_cli/yasmine_cli.py", line 66, in main
args, scnl_filter = processCmdLine(fname)
File "/opt/anaconda3/envs/obsinfo/lib/python3.10/site-packages/yasmine_cli/libs/libs_util.py", line 261, in processCmdLine
value = read_yml_file(ymlfile)
File "/opt/anaconda3/envs/obsinfo/lib/python3.10/site-packages/yasmine_cli/libs/libs_obs.py", line 220, in read_yml_file
return eval(func)(obj_key, obj_dict)
File "/opt/anaconda3/envs/obsinfo/lib/python3.10/site-packages/yasmine_cli/libs/libs_obs.py", line 344, in obspy_simple_type
return _make_obj(obj_key, obj_dict)
File "/opt/anaconda3/envs/obsinfo/lib/python3.10/site-packages/yasmine_cli/libs/libs_obs.py", line 364, in _make_obj
obj = eval(obj_key)(**obj_dict)
File "<string>", line 1, in <module>
NameError: name 'Latitude' is not defined
(the error message is a bit cryptic also, for neophytes)
The same goes for Longitude and Elevation (and maybe some others, too)
This can fixed by adding Latitude, Longitude , Distance as Elevation to from obspy.core.inventory.util import at the top of libs_obs.py
A secondary problem is that, once these are added, they do not accept "measurement_method" as a field, which I suspect is due to yasmine-cli using an old version of obspy. Below is a latitude yaml file that should work with the latest versions of obspy:
Latitude: {
measurement_method: 'Short baseline transponder, near-seafloor release',
lower_uncertainty: 0.00018, upper_uncertainty: 0.00018, value: -12.962362}
Regards
Wayne Crawford
Hi,
The following line:
with the following yaml file:
returns the error:
(the error message is a bit cryptic also, for neophytes)
The same goes for
LongitudeandElevation(and maybe some others, too)This can fixed by adding
Latitude, Longitude , Distance as Elevationtofrom obspy.core.inventory.util importat the top oflibs_obs.pyA secondary problem is that, once these are added, they do not accept "measurement_method" as a field, which I suspect is due to yasmine-cli using an old version of obspy. Below is a latitude yaml file that should work with the latest versions of obspy:
Regards
Wayne Crawford