pygmtsar icon indicating copy to clipboard operation
pygmtsar copied to clipboard

[Help]: sbas.compute_align() failed

Open Ay-mo opened this issue 11 months ago • 8 comments

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'

Ay-mo avatar Mar 06 '24 20:03 Ay-mo

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

AlexeyPechnikov avatar Mar 07 '24 05:03 AlexeyPechnikov

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

gals89 avatar Mar 08 '24 21:03 gals89

The notebook is not publicly accessible.

AlexeyPechnikov avatar Mar 09 '24 08:03 AlexeyPechnikov

sorry, I update the link

here is,

https://colab.research.google.com/drive/1H1ApvooTTPz_OSvZqurHxLxswCDFepoE?usp=sharing

gals89 avatar Mar 09 '24 11:03 gals89

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

AlexeyPechnikov avatar Mar 09 '24 13:03 AlexeyPechnikov

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

gals89 avatar Mar 09 '24 15:03 gals89

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.

AlexeyPechnikov avatar Mar 09 '24 15:03 AlexeyPechnikov

Okay, Thank You, I understand

gals89 avatar Mar 09 '24 16:03 gals89