-
Notifications
You must be signed in to change notification settings - Fork 22
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
mintpy.subset.lalo is not supported if 1) no lookup file AND 2) radar/unkonwn coded dataset ignore it and continue. #102
Comments
Potential solutionThe plan to solve the bug involves ensuring that the application can handle cases where the What is causing this bug?The bug is caused by the CodeTo address this issue, we need to implement the following changes:
def read_initial_info(work_dir, templateFile):
# ... existing code ...
if box is None:
raise ValueError("The 'box' variable is None. Please check the configuration or provide a valid subset.")
num_pixels = (box[2] - box[0]) * (box[3] - box[1])
# ... existing code ...
def open(self):
# ... existing code ...
# Check for the presence of a lookup file
if not self.lookup_file_exists():
print("WARNING: No lookup file found. 'mintpy.subset.lalo' is not supported. Skipping this step.")
# Provide default handling or skip the operation
return
# ... existing code ...
def lookup_file_exists(self):
# Implement logic to check if the lookup file exists
# Return True if it exists, False otherwise
pass
def read_options(self):
# ... existing code ...
# Validate 'mintpy.subset.lalo' support
if 'mintpy.subset.lalo' in self.options and not self.lookup_file_exists():
raise ValueError("The 'mintpy.subset.lalo' option is not supported without a lookup file.")
# ... existing code ... How to replicate the bug
By implementing these changes, the application will handle unsupported Click here to create a Pull Request with the proposed solution Files used for this task: Changes on src/miaplpy/objects/utils.pyAnalysis Report for
|
Using default MintPy Path: /home/deskay/miniconda3/envs/miaplpy-env/lib/python3.11/site-packages
MiaplPy version v0.2.1, date 2023-08-22
--RUN-at-2024-12-20 04:42:53.848564--
Current directory: /home/deskay/sarvey/PichinchaSenDT142
Run routine processing with arg_parser.py on steps: ['load_data']
Remaining steps: ['phase_linking', 'concatenate_patches', 'generate_ifgram', 'unwrap_ifgram', 'load_ifgram', 'ifgram_correction', 'invert_network', 'timeseries_correction']
Project name: PichinchaSenDT142
20241220:044253 * miaplpyApp.py /home/deskay/sarvey/PichinchaSenDT142/PichinchaSenDT142.txt --dir /home/deskay/sarvey/PichinchaSenDT142 --dostep load_data
Project name: custom_smallbaselineApp
Go to work directory: /home/deskay/sarvey/PichinchaSenDT142
copy default template file /home/deskay/miniconda3/envs/miaplpy-env/lib/python3.11/site-packages/mintpy/defaults/smallbaselineApp.cfg to work directory
read custom template file: /home/deskay/sarvey/PichinchaSenDT142/custom_smallbaselineApp.cfg
update default template based on input custom template
mintpy.compute.cluster: auto --> local
mintpy.compute.numWorker: auto --> 8
mintpy.load.processor: auto --> isce
mintpy.reference.lalo: auto --> -0.1786, -78.5933
mintpy.troposphericDelay.method: auto --> no
copy custom_smallbaselineApp.cfg to inputs directory for backup.
copy smallbaselineApp.cfg to inputs directory for backup.
copy custom_smallbaselineApp.cfg to pic directory for backup.
copy smallbaselineApp.cfg to pic directory for backup.
read default template file: /home/deskay/sarvey/PichinchaSenDT142/smallbaselineApp.cfg
update default template based on input custom template
No new option value found, skip updating /home/deskay/sarvey/PichinchaSenDT142/miaplpyApp.cfg
No new option value found, skip updating /home/deskay/sarvey/PichinchaSenDT142/custom_smallbaselineApp.cfg
read default template file: /home/deskay/sarvey/PichinchaSenDT142/miaplpyApp.cfg
There are 16 workers available, numWorker is changed to 16
SAR platform/sensor : None
processor: isce
check auto path setting for Univ of Miami users for processor: isce
prepare metadata files for isce products
WARNING: mintpy.subset.lalo is not supported if 1) no lookup file AND 2) radar/unkonwn coded dataset
ignore it and continue.
box to read for datasets in y/x: None
Traceback (most recent call last):
File "/home/deskay/miniconda3/envs/miaplpy-env/bin/miaplpyApp", line 8, in
sys.exit(main())
^^^^^^
File "/home/deskay/miniconda3/envs/miaplpy-env/lib/python3.11/site-packages/miaplpy/miaplpyApp.py", line 82, in main
app.open()
File "/home/deskay/miniconda3/envs/miaplpy-env/lib/python3.11/site-packages/miaplpy/miaplpyApp.py", line 170, in open
self.date_list, self.num_pixels, self.metadata = read_initial_info(self.workDir, self.templateFile)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/deskay/miniconda3/envs/miaplpy-env/lib/python3.11/site-packages/miaplpy/objects/utils.py", line 1264, in read_initial_info
num_pixels = (box[2] - box[0]) * (box[3] - box[1])
~~~^^^
TypeError: 'NoneType' object is not subscriptable
(miaplpy-env) deskay@deskay:~/sarvey/PichinchaSenDT142$ , please help me
The text was updated successfully, but these errors were encountered: