Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Help]: sbas.compute_align() failed #110

Open
Ay-mo opened this issue Mar 6, 2024 · 8 comments
Open

[Help]: sbas.compute_align() failed #110

Ay-mo opened this issue Mar 6, 2024 · 8 comments

Comments

@Ay-mo
Copy link

Ay-mo commented Mar 6, 2024

AttributeError: 'NoneType' object has no attribute 'bounds'
"""

The above exception was the direct cause of the following exception:

AttributeError Traceback (most recent call last)
in <cell line: 1>()
3 sbas.compute_align(joblib_aligning_backend='threading')
4 else:
----> 5 sbas.compute_align()

6 frames
/usr/local/lib/python3.10/dist-packages/joblib/parallel.py in _return_or_raise(self)
752 try:
753 if self.status == TASK_ERROR:
--> 754 raise self._result
755 return self._result
756 finally:

AttributeError: 'NoneType' object has no attribute 'bounds'

@AlexeyPechnikov
Copy link
Owner

But how can I reproduce your case? Please share an example notebook on Google Colab so I can check.

@gals89
Copy link

gals89 commented Mar 8, 2024

Hi, Alex
I got the error in sbas.compute_align()

I have attached the link. https://colab.research.google.com/drive/11RTV1efvymFkAmfL_ju7MuYHQPXq2HWG?usp=drive_link

please advise

Thanks


_RemoteTraceback Traceback (most recent call last)
_RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/joblib/externals/loky/process_executor.py", line 463, in _process_worker
r = call_item()
File "/usr/local/lib/python3.10/dist-packages/joblib/externals/loky/process_executor.py", line 291, in call
return self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.10/dist-packages/joblib/parallel.py", line 589, in call
return [func(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/joblib/parallel.py", line 589, in
return [func(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pygmtsar/Stack_align.py", line 232, in _align_rep_subswath
offset_dat = np.apply_along_axis(func, 1, offset_dat0)
File "/usr/local/lib/python3.10/dist-packages/numpy/lib/shape_base.py", line 376, in apply_along_axis
raise ValueError(
ValueError: Cannot apply_along_axis when any iteration dimensions are 0
"""

The above exception was the direct cause of the following exception:

ValueError Traceback (most recent call last)
in <cell line: 1>()
3 sbas.compute_align(joblib_aligning_backend='threading')
4 else:
----> 5 sbas.compute_align()

6 frames
/usr/local/lib/python3.10/dist-packages/pygmtsar/Stack_align.py in compute_align(self, geometry, dates, n_jobs, degrees, joblib_aligning_backend, debug)
867 with self.tqdm_joblib(tqdm(desc='Aligning Repeat', total=len(dates_rep)*len(subswaths))) as progress_bar:
868 # threading backend is the only one working inside Docker container to run multiple binaries in parallel
--> 869 joblib.Parallel(n_jobs=n_jobs, backend=joblib_aligning_backend)(joblib.delayed(self._align_rep_subswath)(subswath, date, degrees=degrees, debug=debug)
870 for date in dates_rep for subswath in subswaths)
871

/usr/local/lib/python3.10/dist-packages/joblib/parallel.py in call(self, iterable)
1950 next(output)
1951
-> 1952 return output if self.return_generator else list(output)
1953
1954 def repr(self):

/usr/local/lib/python3.10/dist-packages/joblib/parallel.py in _get_outputs(self, iterator, pre_dispatch)
1593
1594 with self._backend.retrieval_context():
-> 1595 yield from self._retrieve()
1596
1597 except GeneratorExit:

/usr/local/lib/python3.10/dist-packages/joblib/parallel.py in _retrieve(self)
1697 # worker traceback.
1698 if self._aborting:
-> 1699 self._raise_error_fast()
1700 break
1701

/usr/local/lib/python3.10/dist-packages/joblib/parallel.py in _raise_error_fast(self)
1732 # called directly or if the generator is gc'ed.
1733 if error_job is not None:
-> 1734 error_job.get_result(self.timeout)
1735
1736 def _warn_exit_early(self):

/usr/local/lib/python3.10/dist-packages/joblib/parallel.py in get_result(self, timeout)
734 # callback thread, and is stored internally. It's just waiting to
735 # be returned.
--> 736 return self._return_or_raise()
737
738 # For other backends, the main thread needs to run the retrieval step.

/usr/local/lib/python3.10/dist-packages/joblib/parallel.py in _return_or_raise(self)
752 try:
753 if self.status == TASK_ERROR:
--> 754 raise self._result
755 return self._result
756 finally:

ValueError: Cannot apply_along_axis when any iteration dimensions are 0

@AlexeyPechnikov
Copy link
Owner

The notebook is not publicly accessible.

@gals89
Copy link

gals89 commented Mar 9, 2024

@AlexeyPechnikov
Copy link
Owner

You are trying to calculate an interferogram for a 10-year interval, which does not make sense.

@gals89
Copy link

gals89 commented Mar 9, 2024

Is it just the reason why the error is occurring?, or is there another reason?, I can change it to other years if that solves the problem. let say 3 years back, sorry this is the first time I was using pygmtsar and I also brought your Kindle book as reference

@AlexeyPechnikov
Copy link
Owner

No, the error is related to an incomplete DEM. Sentinel-1 alignment is purely geometrical based on a digital elevation model, but some Copernicus DEM tiles are missing for your area. You might use SRTM DEM or another alternative to resolve the issue.

@gals89
Copy link

gals89 commented Mar 9, 2024

Okay, Thank You, I understand

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants