'Survey' object has no attribute '_data'
eqfwrg424535 opened this issue · comments
To someone who knows it,
I am currently testing my CSEM code based on FE method, and also testing EMG3D for comparison. Since I was not that expertise with Python, I encountered following problem when testing Example 4(Adjoint-state vs. FD gradient) from the Gallery:
AttributeError Traceback (most recent call last)
<ipython-input-7-9618786023c8> in <module>()
5 frequencies=1.0,
6 noise_floor=1e-15,
----> 7 relative_error=0.05,
8 )
D:\Program Files (x86)\anaconda\lib\site-packages\emg3d\surveys.py in __init__(self, sources, receivers, frequencies, data, **kwargs)
131
132 # Get the optional keywords related to standard deviation.
--> 133 self.noise_floor = kwargs.pop('noise_floor', None)
134 self.relative_error = kwargs.pop('relative_error', None)
135
D:\Program Files (x86)\anaconda\lib\site-packages\emg3d\surveys.py in noise_floor(self, noise_floor)
569 def noise_floor(self, noise_floor):
570 """Update noise floor."""
--> 571 self._set_nf_re('noise_floor', noise_floor)
572
573 @property
D:\Program Files (x86)\anaconda\lib\site-packages\emg3d\surveys.py in _set_nf_re(self, name, value)
679 value = 'data._'+name # str-flag on attrs.
680
--> 681 self._data.attrs[name] = value
682
683 @property
AttributeError: 'Survey' object has no attribute '_data'
I don't know if it is a bug. I would appericiate if someone could help me with it!
Hm, hard to say if it is a bug or another problem without any further information.
Do you have xarray
installed?
Could you install scooby
(pip install scooby
or conda install -c conda-forge scooby
) and post here the output of emg3d.Report()
?
Cool, that works! Thanks a lot!
| |
***@***.***
|
|
***@***.***
|
…---- Replied Message ----
| From | Dieter ***@***.***> |
| Date | 06/20/2023 22:56 |
| To | ***@***.***> |
| Cc | ***@***.***>***@***.***> |
| Subject | Re: [emsig/emg3d] 'Survey' object has no attribute '_data' (Issue #316) |
Hm, hard to say if it is a bug or another problem without any further information.
Do you have xarray installed?
Could you install scooby (pip install scooby or conda install -c conda-forge scooby) and post here the output of emg3d.Report()?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>