How shengfu2022/swade works
Main Components
• Data Acquisition/Preparation:
• “DownloadNDVIFromGEETranslatedFromAxelCode.ipynb” as an optional module that downloads the NDVI training data.
• That the README recommends running the “CodeShengFu2022Landslides” folder, which contains all the processing code.
• Data Processing:
• b_read_Act_Axel_Lr.py: Likely responsible for reading and preparing the data from the input files.
• c_deno_wave.py: Implements the denoising stage using wavelet techniques.
• d_step_wise.py: Performs the stepwise linear fitting as part of the landslide dating technique.
• SWADE.py: This appears to be the central script that ties together the above modules to run the overall SWADE workflow.
• Output Generation:
• The final stage produces a figure (as indicated in the README) which is saved, most likely to an "output" subfolder (even if not shown in the file tree explicitly).
Relationships and Interactions
• Data flows from the acquisition module into the data reader (b_read_Act_Axel_Lr.py), which preps the raw NDVI time series.
• The preprocessed data is then sent to the denoising component (c_deno_wave.py), where wavelet-based noise reduction refines the signal.
• Next, the denoised data enters the stepwise linear fitting stage (d_step_wise.py) to detect changes associated with landslide events.
• Finally, the SWADE.py script functions as the orchestrator, calling each of these components sequentially and managing input/output processes.
Architectural Patterns and Design Principles
• Modular Design: Each script addresses a specific part of the workflow (data reading, denoising, fitting), supporting code separation and easier maintenance or upgrades.
• Pipeline Structure: The overall flow represents a data processing pipeline where each stage receives input, processes it, and passes results downstream.
• Reusability and Extensibility: With clearly delineated stages (and an optional NDVI download module), the system is designed for future adaptations or incorporating additional preprocessing steps.
Incorporate Relevant Technologies
• Python is the main programming language.
• Jupyter Notebook (for the NDVI download) and standard Python modules for data processing.
• Likely libraries include numpy, pandas, matplotlib (for plotting the results), and potentially pywavelets or similar for the denoising algorithms—although not explicitly stated, these are common choices in such contexts.