About RSMeM
RSMeM is an MCP server published by AI9Stars in the Science category: [ACL 2026] RSMeM: Knowledge-Enhanced Memory Evolution for Remote Sensing Agents with Systematic Evaluation. Conduid read 107 tools from its source: ATI, BRIGHT_DamageAssessment, ChangeOS, InstructSAM, RemoteCLIP, RemoteSAM and 101 more. No package is published for it, so it installs from a source checkout.
The repository has 13 stars and 2 forks, and its last commit was on 24 Nov 2026. Conduid has no tagged release on record for it. Its topics include remote-sensing.
Install
git clone https://github.com/AI9Stars/RSMeMTools (107)
ATIEstimate Apparent Thermal Inertia (ATI) using the Thermal Inertia Method. This method calculates ATI as (1 - albedo) / (day_temp - night_temp), which serves as a proxy for land surface temperature stability over diurnal cycles. Parameters: day_temp_path (str): File path to daytime brightness temperature GeoTIFF. night_temp_path (str): File path to nighttime brightness temperature GeoTIFF. albedo_path (str): File path to surface albedo GeoTIFF. output_path (str): Relative path for the output raster file, e.g. "question17/thermal_inertia_2022-01-16.tif" Returns: str: Path to the exported ATI GeoTIFF.| Parameter | Type | Description |
|---|---|---|
| albedo_path * | string | Path to the surface albedo GeoTIFF. |
| day_temp_path * | string | Path to the daytime brightness temperature (BT) GeoTIFF. |
| night_temp_path * | string | Path to the nighttime brightness temperature (BT) GeoTIFF. |
| output_path * | string | Relative path to save the ATI raster, e.g. "question17/thermal_inertia_2022-01-16.tif". |
BRIGHT_DamageAssessmentBRIGHT (SiamCRNN) is a model for Building Damage Assessment in remote sensing images. It compares pre-event and post-event images to generate a damage classification map (e.g., No Damage, Minor, Major, Destroyed). --- Damage Classes and Colors (RGB) --- - **0: No damage** (255, 255, 255) -> White - **1: Minor damage** (70, 181, 121) -> Green - **2: Major damage** (228, 189, 139) -> Yellow/Tan - **3: Destroyed** (182, 70, 69) -> Red Parameters: - pre_image_path (str): Path to the pre-event image (must be provided). - post_image_path (str): Path to the post-event image (must be provided). - output_path (str): Path to save the output damage classification visualization (e.g., /path/to/result.png). Returns: - str: Path to the saved output colored damage map image.| Parameter | Type | Description |
|---|---|---|
| output_path * | string | |
| post_image_path * | string | |
| pre_image_path * | string |
ChangeOSChangeOS is a change detection and building extraction model for remote sensing images. It can detect changes between two images or extract buildings from a single image. Parameters: - pre_image_path (str): Path to the pre-event image. - post_image_path (str): Path to the post-event image. (Use the same path as pre_image_path for building extraction) - output_path (str): Path to save the output visualization. Returns: - str: Path to the saved output image.| Parameter | Type | Description |
|---|---|---|
| output_path * | string | |
| post_image_path * | string | |
| pre_image_path * | string |
InstructSAMInstructSAM is an instruction-guided counting model for remote sensing images. Given an input image and a natural language prompt specifying the target object (e.g., "storage tank", "football field"), it detects and counts the number of instances matching the description. Parameters: - input_image_path (str): Path to the input image. - text_prompt (str): Natural language description of the object to count. Returns: - int: The number of objects in the image that match the text prompt. Example: Input: input_image_path = "benchmark/data/question231/B.jpg" text_prompt = "storage tank" Output: 8| Parameter | Type | Description |
|---|---|---|
| input_image_path * | any | |
| text_prompt * | any |
RemoteCLIPRemoteCLIP is a scene and land-use image classifier, specialized for categories such as Airport, Beach, Bridge, Commercial, Desert, Farmland, FootballField, Forest, Industrial, Meadow, Mountain, Park, Parking, Pond, Port, RailwayStation, Residential, River, and Viaduct. Parameters: - input_image_path (str): Path to the input image. Returns: - np.ndarray: [model_name, image_path, predicted_class, confidence, top-5 predictions] Example: array([ 'RemoteCLIP', 'benchmark/data/question189/J.jpg', 'Resort', 0.7052103281021118, [ ('Resort', 0.7052103281021118), ('StorageTanks', 0.11459718644618988), ('Desert', 0.019159140065312386), ('Meadow', 0.013844668865203857), ('Beach', 0.013844599016010761) ] ], dtype=object)| Parameter | Type | Description |
|---|---|---|
| input_image_path * | any |
RemoteSAMRemoteSAM is a remote sensing visual grounding model. Given an input image and a text prompt describing a region of interest (e.g., "the football field located on the westernmost side"), it outputs the corresponding bounding box coordinates. Parameters: - input_image_path (str): Path to the input image. - text_prompt (str): Natural language description of the target object/region. Returns: - list[int]: Bounding box [x_min, y_min, x_max, y_max] Example: Input: input_image_path = "benchmark/data/question226/478549_4934011_2048_32610_sport_soccer.jpg" text_prompt = "the football field located on the westernmost side" Output: [0, 264, 127, 342]| Parameter | Type | Description |
|---|---|---|
| input_image_path * | any | |
| text_prompt * | any |
SAM2Use SAM2 to segment the input image and return the bounding box. Parameters: input_image_path (str): Path to the input image. bbox (list): Bounding box of the segmented object. Returns: str: Path to the segmented image.| Parameter | Type | Description |
|---|---|---|
| bbox * | any | |
| input_image_path * | any | |
| output_path * | any |
SM3DetSM3Det is a remote sensing object detection model. Given an input image and a natural language prompt specifying the target object (e.g., "plane", "ship", "storage tank"), it detects all instances of that object and returns their bounding boxes. This model is particularly strong at detecting and localizing the following categories: - plane - ship - storage tank - baseball diamond - tennis court - basketball court - ground track field - harbor - bridge - large vehicle - small vehicles - helicopter - roundabout - soccer ball field - swimming pool Parameters: - input_image_path (str): Path to the input image. - text_prompt (str): Natural language description of the object to detect. Returns: - list[list[float]]: A list of bounding boxes, each represented as [x_min, y_min, x_max, y_max].| Parameter | Type | Description |
|---|---|---|
| input_image_path * | string | |
| text_prompt * | string |
Strip_R_CNNThe Strip R-CNN is a general-purpose oriented object detector specifically engineered for complex aerial and satellite imagery. Its core Strip Pooling mechanism efficiently addresses the large scale and extreme aspect ratio variations common in remote sensing. Compared to SM3Det, it is particularly specialized in detecting and localizing different types of ships and naval vessels. This model is highly effective at detecting the following categories: Aircraft: PassengerAircraft, FighterAircraft, Helicopter, TransportAircraft, TrainerAircraft, OthersAircraft, ExecutiveAircraft, UAV, CargoAircraft, BomberAircraft Vessel: EngineeringShip, FishingVessel, Motorboat, Tugboat, SailingShip, WarShip, Destroyer, CargoShip, AircraftCarrier, OthersVessel Vehicle: Bus, Truck, EngineeringVehicle, Trailer, Motorhome, Excavator, DumpTruck, Tank, OthersVehicle, Tractor Port Facilities: Crane, ContainerStack, OilTank, LightTower, Bridge, OthersFacility, BaseballField Parameters: - input_image_path (str): Path to the input image. - text_prompt (str): Natural language description of the ship type to detect. Returns: - list[list[float]]: A list of bounding boxes, each represented as [x_min, y_min, x_max, y_max]. Example: Input: input_image_path = "benchmark/data/questionXXX/ship_example.png" text_prompt = "L3 aircraft carrier" Output: [ [120.5, 340.7, 480.2, 600.9], [700.3, 220.1, 950.6, 400.4] ]| Parameter | Type | Description |
|---|---|---|
| input_image_path * | any | |
| text_prompt * | any |
analyze_hotspot_directionDescription: Analyze the main directional concentration of hotspots in a binary hotspot map. The function counts the number of hotspot pixels (value=1) in each cardinal direction relative to the map center, and returns the dominant direction. Parameters: - hotspot_map_path (str): Path to the binary hotspot map GeoTIFF. Hotspot pixels must be encoded as value=1. Returns: - str: Main direction of hotspot concentration, one of: * "north" * "south" * "east" * "west" * "no hotspots found" (if no hotspot pixels are present)| Parameter | Type | Description |
|---|---|---|
| hotspot_map_path * | string | Path to the binary hotspot map GeoTIFF file. Hotspot pixels should be encoded with value=1; all other values are ignored. |
apply_cloud_maskApply cloud/shadow mask to a single Landsat 8 surface reflectance band using QA_PIXEL band. Parameters: sr_band_path (str): Path to surface reflectance band (e.g., SR_B3 or SR_B5). qa_pixel_path (str): Path to QA_PIXEL band. output_path (str): relative path for the output raster file, e.g. "question17/cloud_mask_2022-01-16.tif" Returns: str: Path to the saved masked raster file.| Parameter | Type | Description |
|---|---|---|
| output_path * | any | relative path for the output raster file, e.g. "question17/cloud_mask_2022-01-16.tif" |
| qa_pixel_path * | any | Path to QA_PIXEL band. |
| sr_band_path * | any | Path to surface reflectance band (e.g., SR_B3 or SR_B5). |
autocorrelation_functionDescription: Compute the Autocorrelation Function (ACF) for a univariate time series. The ACF measures the correlation of the series with its own lags, which is useful for detecting seasonality, persistence, and lag dependence. Parameters: - x (list[float]): Input time series data. - nlags (int, optional): Number of lags to compute. Default = 20. Returns: - acf (list[float]): List of autocorrelation values from lag 0 up to lag `nlags`. Value at lag 0 is always 1.0.| Parameter | Type | Description |
|---|---|---|
| nlags | integer | The number of lags to compute autocorrelation for. |
| x * | array | Input time series data as a list of floats or ints. |
average_ratio_exceeding_thresholdCalculate the average percentage of pixels exceeding a value threshold, considering only images where the ratio is greater than a specified ratio threshold. Parameters: image_paths (str or list): Path(s) to image file(s). value_threshold (float): Pixel value threshold (e.g., NDVI > 0.7). ratio_threshold (float): Minimum percentage threshold for inclusion (e.g., 20.0 means 20%). mode (str): - 'above': pixels > value_threshold - 'below': pixels < value_threshold Default is 'above'. verbose (bool): If True, prints detailed ratio results per image. Returns: float: Average percentage of qualifying images. Returns 0.0 if no image meets the criteria. Example: >>> average_ratio_exceeding_threshold( ... ["ndvi_1.tif", "ndvi_2.tif"], ... value_threshold=0.3, ... ratio_threshold=10.0, ... mode="above" ... ) 18.5| Parameter | Type | Description |
|---|---|---|
| image_paths * | any | Path(s) to image file(s). |
| ratio_threshold | number | Minimum percentage threshold for inclusion (e.g., 20.0 means 20%). |
| value_threshold | number | Pixel value threshold (e.g., NDVI > 0.7). |
band_ratioCompute Precipitable Water Vapor (PWV) image from local MODIS surface reflectance band files using the band ratio method. This method uses surface reflectance bands: - sur_refl_b02 (0.865 μm), sur_refl_b05 (1.240 μm): atmospheric window bands - sur_refl_b17, sur_refl_b18, sur_refl_b19: water vapor absorption bands Data Source : - Bands used: * "sur_refl_b02": 0.865 μm (NIR window) * "sur_refl_b05": 1.240 μm (SWIR window) * "sur_refl_b17": 0.905 μm (H₂O absorption) * "sur_refl_b18": 0.936 μm (H₂O absorption) * "sur_refl_b19": 0.940 μm (H₂O absorption) Parameters: sur_refl_b02_path (str): File path to band sur_refl_b02 (0.865 um) GeoTIFF. sur_refl_b05_path (str): File path to band sur_refl_b05 (1.240 um) GeoTIFF. sur_refl_b17_path (str): File path to band sur_refl_b17 GeoTIFF. sur_refl_b18_path (str): File path to band sur_refl_b18 GeoTIFF. sur_refl_b19_path (str): File path to band sur_refl_b19 GeoTIFF. output_path (str): relative path for the output raster file, e.g. "question17/pwv_2022-01-16.tif" Returns: str: Path to the saved PWV GeoTIFF.| Parameter | Type | Description |
|---|---|---|
| output_path * | string | Relative output path for the PWV GeoTIFF, e.g. "question17/pwv_2022-01-16.tif". |
| sur_refl_b02_path * | string | Path to MODIS surface reflectance band sur_refl_b02 (0.865 µm) GeoTIFF. |
| sur_refl_b05_path * | string | Path to MODIS surface reflectance band sur_refl_b05 (1.240 µm) GeoTIFF. |
| sur_refl_b17_path * | string | Path to MODIS surface reflectance band sur_refl_b17 (0.905 µm) GeoTIFF. |
| sur_refl_b18_path * | string | Path to MODIS surface reflectance band sur_refl_b18 (0.936 µm) GeoTIFF. |
| sur_refl_b19_path * | string | Path to MODIS surface reflectance band sur_refl_b19 (0.940 µm) GeoTIFF. |
bbox_expansionExpands bounding boxes by a given radius and returns the expanded bounding boxes. Parameters: bboxes (list[list[float]]): List of bounding boxes, each represented as [x1, y1, x2, y2]. radius (float): Expansion radius in the same unit as the GSD. gsd (float): Ground Sampling Distance in the same unit as the radius. Returns: list[list[float]]: List of expanded bounding boxes, each represented as [x1, y1, x2, y2].| Parameter | Type | Description |
|---|---|---|
| bboxes * | array | List of bounding boxes, each represented as [x1, y1, x2, y2]. |
| gsd * | number | Ground Sampling Distance in the same unit as the radius. |
| radius * | number | Expansion radius in the same unit as the GSD. |
bboxes2centroidsDescription: Convert bounding boxes from [x_min, y_min, x_max, y_max] format to centroid coordinates (x, y). Parameters: bboxes (list[list[float]]): A list of bounding boxes, each defined as [x_min, y_min, x_max, y_max]. Returns: centroids (list[tuple[float, float]]): A list of centroid coordinates, each in (x, y) format. Example: >>> bboxes2centroids([[0, 0, 10, 20], [5, 5, 15, 15]]) [(5.0, 10.0), (10.0, 10.0)]| Parameter | Type | Description |
|---|---|---|
| bboxes * | any | A list of bounding boxes, each defined as [x_min, y_min, x_max, y_max]. |
calc_batch_fire_pixelsDescription: Compute the number of fire pixels (FRP > threshold) for a batch of images. Parameters: file_list (list[str]): Paths to input images. fire_threshold (float, optional): Minimum FRP value to be considered as fire. Default = 0. Returns: fire_pixels (list[int]): A list of fire pixel counts, one per input image. Example: >>> calc_batch_fire_pixels(["img1.tif", "img2.tif"], fire_threshold=50) [123, 89]| Parameter | Type | Description |
|---|---|---|
| file_list * | array | Paths to input images. |
| fire_threshold | number | Minimum FRP value to be considered as fire. Default = 0. |
calc_batch_image_hotspot_percentageDescription: Compute the hotspot percentage (fraction of pixels above a threshold) for a batch of images. Parameters: - file_list (list[str]): List of input image file paths. - threshold (float): Threshold value for hotspot detection. Pixels with values greater than this threshold are counted as hotspots. - uint8 (bool, optional): Whether to convert images to uint8 format before computation. Default = False. Returns: - percentage (list[float]): List of hotspot area percentages (0.0–1.0), one for each input image.| Parameter | Type | Description |
|---|---|---|
| file_list * | array | |
| threshold * | number | |
| uint8 | boolean |
calc_batch_image_hotspot_tifDescription: Create binary hotspot maps for a batch of images, where pixels below a specified threshold are set to 1 (hotspot) and others set to 0. The output is saved as GeoTIFF files, preserving georeference metadata from the input images. Parameters: - file_list (list[str]): List of input image file paths. - threshold (float): Threshold value for hotspot detection. Pixels below this threshold are marked as hotspots. - output_path_list (list[str]): List of output file paths for the generated GeoTIFF hotspot maps. - uint8 (bool, optional): Whether to convert images to uint8 format before computation. Default = False. Returns: - list[str]: Paths to the saved GeoTIFF images containing the binary hotspot maps.| Parameter | Type | Description |
|---|---|---|
| file_list * | array | |
| output_path_list * | array | |
| threshold * | number | |
| uint8 | boolean |
calc_batch_image_kurtosisDescription: Compute the kurtosis of pixel value distributions for a batch of images. Kurtosis measures the "tailedness" of the distribution relative to a normal distribution. Parameters: - file_list (list[str]): List of input image file paths. - uint8 (bool, optional): Whether to convert images to uint8 format before computation. Default = False. Returns: - kurtosis (list[float]): List of kurtosis values, one for each input image. * Normal distribution → kurtosis ≈ 3 * Higher values → heavier tails * Lower values → lighter tails| Parameter | Type | Description |
|---|---|---|
| file_list * | array | |
| uint8 | boolean |
calc_batch_image_maxDescription: Compute the maximum pixel value for a batch of images. Parameters: - file_list (list[str]): List of input image file paths. - uint8 (bool, optional): Whether to convert images to uint8 format before computation. Default = False. Returns: - max (list[float]): List of maximum pixel values, one for each input image.| Parameter | Type | Description |
|---|---|---|
| file_list * | array | |
| uint8 | boolean |
calc_batch_image_meanCompute mean value of an batch of images. Args: file_list (list): List of image file paths. uint8 (bool): Whether to convert image to uint8 format. Returns: mean (list): List of mean pixel values.| Parameter | Type | Description |
|---|---|---|
| file_list * | array | |
| uint8 | boolean |
calc_batch_image_mean_maxDescription: Compute the mean pixel values of a batch of images and return the maximum mean. Parameters: file_list (list[str]): Paths to input images. uint8 (bool, optional): Whether to treat image as uint8 (0–255 normalization). Default = False. Returns: max_mean (float): The maximum mean pixel value among all images. Example: >>> calc_batch_image_mean_max(["img1.tif", "img2.tif"]) 145.32| Parameter | Type | Description |
|---|---|---|
| file_list * | array | Paths to input images. |
| uint8 | boolean | Whether to treat image as uint8 (0–255 normalization). Default = False. |
calc_batch_image_mean_max_minDescription: Compute the batch-wise statistics across multiple images, including: - Mean of mean values - Maximum of maximum values - Minimum of minimum values Parameters: file_list (list[str]): List of image file paths. uint8 (bool, optional): Whether to convert the data to uint8 range (0–255). Default = False. Returns: result (tuple[float, float, float]): A tuple containing: (mean of means, max of maxs, min of mins) Example: >>> calc_batch_image_mean_max_min(["img1.tif", "img2.tif"]) (110.5, 243.0, 5.0)| Parameter | Type | Description |
|---|---|---|
| file_list * | array | List of image file paths. |
| uint8 | boolean | Whether to convert the data to uint8 range (0–255). Default = False. |
calc_batch_image_mean_meanDescription: Compute the average of mean pixel values across a batch of images. Parameters: file_list (list[str]): List of image file paths. uint8 (bool, optional): Whether to convert images to uint8 format (0–255). Default = False. Returns: mean_of_means (float): The average of the mean pixel values across all images. Example: >>> calc_batch_image_mean_mean(["img1.tif", "img2.tif"]) 105.67| Parameter | Type | Description |
|---|---|---|
| file_list * | array | List of image file paths. |
| uint8 | boolean | Whether to convert images to uint8 format (0–255). Default = False. |
calc_batch_image_mean_thresholdDescription: Calculate the percentage or count of images whose mean pixel values (in a specified band) are above or below a given threshold. Parameters: file_list (list[str]): List of image file paths. threshold (float): Threshold value for comparison. above (bool, optional): If True, count images with mean > threshold; if False, mean < threshold. Default = True. uint8 (bool, optional): If True, rescale image data to 0–255 range. Default = False. band_index (int, optional): Index of the band to read (0-based). Default = 0. return_type (str, optional): - "ratio": return percentage (float, 0–100). - "count": return number of images (int). Default = "ratio". Returns: float | int: Percentage (0–100) or count of images satisfying the condition. Example: >>> calc_batch_image_mean_threshold(["img1.tif", "img2.tif"], threshold=100, above=True) 50.0| Parameter | Type | Description |
|---|---|---|
| above | boolean | If True, count images with mean > threshold; if False, mean < threshold. Default = True. |
| band_index | integer | Index of the band to read (0-based). Default = 0. |
| file_list * | array | List of image file paths. |
| return_type | string | - "ratio": return percentage (float, 0–100). - "count": return number of images (int). Default = "ratio". |
| threshold * | number | Threshold value for comparison. |
| uint8 | boolean | If True, rescale image data to 0–255 range. Default = False. |
calc_batch_image_medianDescription: Compute the median pixel value for a batch of images. Parameters: - file_list (list[str]): List of input image file paths. - uint8 (bool, optional): Whether to convert images to uint8 format before computation. Default = False. Returns: - median (list[float]): List of median pixel values, one for each input image.| Parameter | Type | Description |
|---|---|---|
| file_list * | array | |
| uint8 | boolean |
calc_batch_image_skewnessDescription: Compute the skewness of pixel value distributions for a batch of images. Skewness quantifies the asymmetry of the distribution: - Positive skew → longer right tail - Negative skew → longer left tail - Zero skew → symmetric distribution Parameters: - file_list (list[str]): List of input image file paths. - uint8 (bool, optional): Whether to convert images to uint8 format before computation. Default = False. Returns: - skewness (list[float]): List of skewness values, one for each input image.| Parameter | Type | Description |
|---|---|---|
| file_list * | array | |
| uint8 | boolean |
calc_batch_image_stdDescription: Compute the standard deviation (spread of pixel values) for a batch of images. Parameters: - file_list (list[str]): List of input image file paths. - uint8 (bool, optional): Whether to convert images to uint8 format before computation. Default = False. Returns: - std (list[float]): List of standard deviation values, one for each input image.| Parameter | Type | Description |
|---|---|---|
| file_list * | array | |
| uint8 | boolean |
calc_batch_image_sumDescription: Compute the sum of pixel values for a batch of images. Parameters: - file_list (list[str]): List of input image file paths. - uint8 (bool, optional): Whether to convert images to uint8 format before computation. Default = False. Returns: - sum (list[float]): List of pixel sum values, one for each input image.| Parameter | Type | Description |
|---|---|---|
| file_list * | array | |
| uint8 | boolean |
calc_extreme_snow_loss_percentage_from_binary_mapCalculate the percentage of extreme snow and ice loss areas from a binary map. Parameters: binary_map_path (str): Path to the binary raster image where pixels with value 1.0 represent extreme snow/ice loss areas. Returns: float: The percentage of extreme snow/ice loss pixels relative to all valid pixels (range: 0.0–1.0). Example: >>> calc_extreme_snow_loss_percentage_from_binary_map("snow_loss_binary.tif") 0.27| Parameter | Type | Description |
|---|---|---|
| binary_map_path * | string | Path to the binary raster image where pixels with value 1.0 represent extreme snow/ice loss areas. |
calc_single_image_kurtosisCompute kurtosis value of an image.| Parameter | Type | Description |
|---|---|---|
| file_path * | string | Path to input image. |
| uint8 | boolean |
calc_single_image_maxCompute max value of an image.| Parameter | Type | Description |
|---|---|---|
| file_path * | string | Path to input image. |
| uint8 | boolean |
calc_single_image_medianCompute median value of an image.| Parameter | Type | Description |
|---|---|---|
| file_path * | string | Path to input image. |
| uint8 | boolean |
calc_single_image_minCompute min value of an image.| Parameter | Type | Description |
|---|---|---|
| file_path * | string | Path to input image. |
| uint8 | boolean |
calc_single_image_skewnessCompute skewness value of an image.| Parameter | Type | Description |
|---|---|---|
| file_path * | string | Path to input image. |
| uint8 | boolean |
calc_threshold_value_meanCalculate the mean value of corresponding raster pixels in path2 where the raster values in path1 exceed the given threshold. Parameters: path1 (Path or List[Path]): Path(s) to the first set of raster files (e.g., LST). path2 (Path or List[Path]): Path(s) to the second set of raster files (e.g., TVDI). threshold (float): Threshold for values in path1 (e.g., LST in Kelvin). Returns: float: Mean value of path2 pixels that meet the threshold condition in path1. Returns np.nan if no valid data is found.| Parameter | Type | Description |
|---|---|---|
| path1 * | any | Path(s) to the first set of raster files (e.g., LST). |
| path2 * | any | Path(s) to the second set of raster files (e.g., TVDI). |
| threshold | number | Threshold for values in path1 (e.g., LST in Kelvin). |
calculate_areaDescription: This function calculates the area of non-zero pixels in the input image and returns the result. Parameters: input_image_path (str): Path to the input image file (TIFF, PNG, JPG, etc.). gsd (float): Ground sample distance in meters per pixel, if None, the function will return the number of non-zero pixels. Returns: area (int): The area of non-zero pixels in the input image.| Parameter | Type | Description |
|---|---|---|
| gsd * | any | Ground sample distance in meters per pixel, if None, the function will return the number of non-zero pixels. |
| input_image_path * | any | Path to the input image file (TIFF, PNG, JPG, etc.). |
calculate_band_mean_by_conditionCalculate the mean value of a target band over pixels where a condition band satisfies a threshold. Parameters: image_path (str): Path to the multi-band raster image. condition_band_index (int): Zero-based index of the band used for thresholding. condition_threshold (float): Threshold value to apply on the condition band. condition_mode (str, default='above'): - 'above': select pixels where condition_band >= threshold - 'below': select pixels where condition_band < threshold target_band_index (int, default=0): Zero-based index of the band for which the mean is calculated. Returns: float: Mean value of the target band over selected pixels. Example: >>> calculate_band_mean_by_condition( ... "multiband_image.tif", ... condition_band_index=1, ... condition_threshold=0.3, ... condition_mode="above", ... target_band_index=2 ... ) 0.5471| Parameter | Type | Description |
|---|---|---|
| condition_band_index * | integer | Zero-based index of the band used for thresholding. |
| condition_mode | string | - 'above': select pixels where condition_band >= threshold - 'below': select pixels where condition_band < threshold |
| condition_threshold * | number | Threshold value to apply on the condition band. |
| image_path * | string | Path to the multi-band raster image. |
| target_band_index | integer | Zero-based index of the band for which the mean is calculated. |
calculate_batch_eviBatch-calculate EVI from multiple sets of NIR/Red/Blue raster files and save results. Parameters: input_nir_paths (list[str]): Paths to Near-Infrared (NIR) band raster files. input_red_paths (list[str]): Paths to Red band raster files. input_blue_paths (list[str]): Paths to Blue band raster files. output_paths (list[str]): Relative output paths (e.g., "question17/evi_2022-01-16.tif") for each set. Returns: list[str]: A list of result messages (one per output), as returned by `calculate_evi`.| Parameter | Type | Description |
|---|---|---|
| C1 | number | |
| C2 | number | |
| G | number | |
| L | number | |
| input_blue_paths * | array | Paths to Blue band rasters. |
| input_nir_paths * | array | Paths to NIR band rasters. |
| input_red_paths * | array | Paths to Red band rasters. |
| output_paths * | array | Relative output paths. |
calculate_batch_frpBatch-calculate Fire Radiative Power (FRP) masks from multiple raster files and save results. Parameters: input_frp_paths (list[str]): Paths to FRP raster files. output_paths (list[str]): Relative output paths (e.g., "question17/frp_2022-01-16.tif") for each file. fire_threshold (float, optional): Minimum FRP value to be considered as fire (default: 0). Returns: list[str]: A list of result messages (one per output), as returned by `calculate_frp`.| Parameter | Type | Description |
|---|---|---|
| fire_threshold | number | Minimum FRP value to be considered as fire. Defaults to 0. |
| input_frp_paths * | array | Paths to FRP raster files. |
| output_paths * | array | Relative output paths (e.g., "question17/frp_2022-01-16.tif"). |
calculate_batch_fvcBatch-calculate FVC from multiple pairs of NIR/Red raster files and save results. Parameters: input_nir_paths (list[str]): Paths to Near-Infrared (NIR) band raster files. input_red_paths (list[str]): Paths to Red band raster files. output_paths (list[str]): Relative output paths (e.g., "question17/fvc_2022-01-16.tif") for each pair. ndvi_min (float, optional): Minimum NDVI value for non-vegetated areas (default: 0.1). ndvi_max (float, optional): Maximum NDVI value for fully vegetated areas (default: 0.9). Returns: list[str]: A list of result messages (one per output), as returned by `calculate_fvc`.| Parameter | Type | Description |
|---|---|---|
| input_nir_paths * | array | Paths to NIR band rasters. |
| input_red_paths * | array | Paths to Red band rasters. |
| ndvi_max | number | Maximum NDVI value for fully vegetated areas. Defaults to 0.9. |
| ndvi_min | number | Minimum NDVI value for non-vegetated areas. Defaults to 0.1. |
| output_paths * | array | Relative output paths (e.g., "question17/fvc_2022-01-16.tif"). |
calculate_batch_nbrBatch-calculate NBR from multiple pairs of NIR/SWIR raster files and save results. Parameters: input_nir_paths (list[str]): Paths to Near-Infrared (NIR) band raster files. input_swir_paths (list[str]): Paths to Short-Wave Infrared (SWIR) band raster files. output_paths (list[str]): Relative output paths (e.g., "question17/nbr_2022-01-16.tif") for each pair. Returns: list[str]: A list of result messages (one per output), as returned by `calculate_nbr`.| Parameter | Type | Description |
|---|---|---|
| input_nir_paths * | array | Paths to NIR band rasters. |
| input_swir_paths * | array | Paths to SWIR band rasters. |
| output_paths * | array | Relative output paths (e.g., "question17/nbr_2022-01-16.tif"). |
calculate_batch_ndbiBatch-calculate NDBI from multiple pairs of SWIR/NIR raster files and save results. Parameters: input_swir_paths (list[str]): Paths to Short-Wave Infrared (SWIR) band raster files. input_nir_paths (list[str]): Paths to Near-Infrared (NIR) band raster files. output_paths (list[str]): Relative output paths (e.g., "question17/ndbi_2022-01-16.tif") for each pair. Returns: list[str]: A list of result messages (one per output), as returned by `calculate_ndbi`.| Parameter | Type | Description |
|---|---|---|
| input_nir_paths * | array | Paths to NIR band rasters. |
| input_swir_paths * | array | Paths to SWIR band rasters. |
| output_paths * | array | Relative output paths (e.g., "question17/ndbi_2022-01-16.tif"). |
calculate_batch_ndsiCalculate NDSI for multiple pairs of Green and SWIR band images. Parameters: green_file_list (list[str]): List of paths to Green band raster files. swir_file_list (list[str]): List of paths to SWIR band raster files. output_path_list (list[str]): relative path for the output raster file, e.g. ["question17/ndsi_2022-01-16.tif", "question17/ndsi_2022-01-16.tif"] Returns: list[str]: List of paths to the output NDSI raster files.| Parameter | Type | Description |
|---|---|---|
| green_file_list * | array | List of paths to Green band raster files. |
| output_path_list * | array | relative path for the output raster file, e.g. ["question17/ndsi_2022-01-16.tif", "question17/ndsi_2022-01-16.tif"] |
| swir_file_list * | array | List of paths to SWIR band raster files. |
calculate_batch_ndtiBatch-calculate NDTI from multiple pairs of Red/Green raster files and save results. Parameters: input_red_paths (list[str]): Paths to Red band raster files. input_green_paths (list[str]): Paths to Green band raster files. output_paths (list[str]): Relative output paths (e.g., "question17/ndti_2022-01-16.tif") for each pair. Returns: list[str]: A list of result messages (one per output), as returned by `calculate_ndti`.| Parameter | Type | Description |
|---|---|---|
| input_green_paths * | array | Paths to Green band rasters. |
| input_red_paths * | array | Paths to Red band rasters. |
| output_paths * | array | Relative output paths (e.g., "question17/ndti_2022-01-16.tif"). |
calculate_batch_ndviBatch-calculate NDVI from multiple pairs of NIR/Red raster files and save results. Parameters: input_nir_paths (list[str]): Paths to Near-Infrared (NIR) band raster files. input_red_paths (list[str]): Paths to Red band raster files. output_paths (list[str]): Relative output paths (e.g., "question17/ndvi_2022-01-16.tif") for each pair. Returns: list[str]: A list of result messages (one per output), as returned by `calculate_ndvi`.| Parameter | Type | Description |
|---|---|---|
| input_nir_paths * | array | Paths to NIR band rasters. |
| input_red_paths * | array | Paths to Red band rasters. |
| output_paths * | array | Relative output paths (e.g., "question17/ndvi_2022-01-16.tif"). |
calculate_batch_ndwiBatch-calculate NDWI from multiple pairs of NIR/SWIR raster files and save results. Parameters: input_nir_paths (list[str]): Paths to Near-Infrared (NIR) band raster files. input_swir_paths (list[str]): Paths to Short-Wave Infrared (SWIR) band raster files. output_paths (list[str]): Relative output paths (e.g., "question17/ndwi_2022-01-16.tif") for each pair. Returns: list[str]: A list of result messages (one per output), as returned by `calculate_ndwi`.| Parameter | Type | Description |
|---|---|---|
| input_nir_paths * | array | Paths to NIR band rasters. |
| input_swir_paths * | array | Paths to SWIR band rasters. |
| output_paths * | array | Relative output paths (e.g., "question17/ndwi_2022-01-16.tif"). |
calculate_batch_wriBatch-calculate WRI from multiple sets of Green/Red/NIR/SWIR raster files and save results. Parameters: input_green_paths (list[str]): Paths to Green band raster files. input_red_paths (list[str]): Paths to Red band raster files. input_nir_paths (list[str]): Paths to Near-Infrared (NIR) band raster files. input_swir_paths (list[str]): Paths to Short-Wave Infrared (SWIR) band raster files. output_paths (list[str]): Relative output paths (e.g., "question17/wri_2022-01-16.tif") for each set. Returns: list[str]: A list of result messages (one per output), as returned by `calculate_wri`.| Parameter | Type | Description |
|---|---|---|
| input_green_paths * | array | Paths to Green band rasters. |
| input_nir_paths * | array | Paths to NIR band rasters. |
| input_red_paths * | array | Paths to Red band rasters. |
| input_swir_paths * | array | Paths to SWIR band rasters. |
| output_paths * | array | Relative output paths (e.g., "question17/wri_2022-01-16.tif"). |
calculate_bbox_areaDescription: Calculate the total area of a list of bounding boxes in [x, y, w, h] format. Parameters: bboxes (list[list[float]]): A list of bounding boxes, where each box is defined as [x, y, w, h]. - x, y → top-left corner coordinates - w, h → width and height of the box gsd (float, optional): Ground sample distance (meters per pixel). - If provided, the result is in square meters (m²). - If None, the result is in square pixels (pixel²). Default = None. Returns: total_area (float): The total area of all bounding boxes, in m² if gsd is provided, otherwise in pixel². Example: >>> calculate_bbox_area([[0, 0, 10, 20], [5, 5, 15, 10]]) 350.0 >>> calculate_bbox_area([[0, 0, 10, 20]], gsd=0.5) 50.0| Parameter | Type | Description |
|---|---|---|
| bboxes * | any | A list of bounding boxes, where each box is defined as [x, y, w, h]. - x, y → top-left corner coordinates - w, h → width and height of the box |
| gsd | any | Ground sample distance (meters per pixel). - If provided, the result is in square meters (m²). - If None, the result is in square pixels (pixel²). Default = None. |
calculate_intersection_percentageDescription: Calculate the percentage of pixels that simultaneously satisfy threshold conditions in two raster images. Parameters: path1 (str): Path to the first raster image (e.g., NDVI). threshold1 (float): Threshold value for the first image (e.g., NDVI > 0.3). path2 (str): Path to the second raster image (e.g., TVDI). threshold2 (float): Threshold value for the second image (e.g., TVDI > 0.7). Returns: percentage (float): Percentage of pixels that satisfy both conditions over the total valid pixels. Example: >>> calculate_intersection_percentage("ndvi.tif", 0.3, "tvdi.tif", 0.7) 12.54| Parameter | Type | Description |
|---|---|---|
| path1 * | any | Path to the first raster image (e.g., NDVI). |
| path2 * | any | Path to the second raster image (e.g., TVDI). |
| threshold1 * | any | Threshold value for the first image (e.g., NDVI > 0.3). |
| threshold2 * | any | Threshold value for the second image (e.g., TVDI > 0.7). |
calculate_max_lst_by_ndviCalculate the maximum Land Surface Temperature (LST) in areas where NDVI is above or below a given threshold. Parameters: red_path (str): Path to the red band image. nir_path (str): Path to the near-infrared (NIR) band image. lst_path (str): Path to the land surface temperature (LST) image. ndvi_threshold (float): Threshold value for NDVI. mode (str): 'above' to select NDVI >= threshold, 'below' for NDVI < threshold. Default is 'above'. Returns: float: Maximum LST value over the selected NDVI region. Returns np.nan if no valid data.| Parameter | Type | Description |
|---|---|---|
| lst_path * | any | Path to the land surface temperature (LST) image. |
| mode | any | 'above' to select NDVI >= threshold, 'below' for NDVI < threshold. Default is 'above'. |
| ndvi_threshold * | any | Threshold value for NDVI. |
| nir_path * | any | Path to the near-infrared (NIR) band image. |
| red_path * | any | Path to the red band image. |
calculate_mean_lst_by_ndviCalculate the average Land Surface Temperature (LST) across multiple images where NDVI is either above or below a given threshold. Parameters: red_paths (str or list): Path(s) to red band image(s). nir_paths (str or list): Path(s) to near-infrared (NIR) image(s). lst_paths (str or list): Path(s) to land surface temperature (LST) image(s). ndvi_threshold (float): Threshold value for NDVI. mode (str): 'above' for NDVI >= threshold, 'below' for NDVI < threshold. Returns: float: Mean of LST values over selected NDVI regions across all image sets. Returns np.nan if no valid pixels found.| Parameter | Type | Description |
|---|---|---|
| lst_paths * | any | Path(s) to land surface temperature (LST) image(s). |
| mode | string | 'above' for NDVI >= threshold, 'below' for NDVI < threshold. |
| ndvi_threshold * | number | Threshold value for NDVI. |
| nir_paths * | any | Path(s) to near-infrared (NIR) image(s). |
| red_paths * | any | Path(s) to red band image(s). |
calculate_multi_band_threshold_ratioDescription: Calculate the percentage of pixels that simultaneously satisfy multiple band threshold conditions. Parameters: image_path (str): Path to the multi-band image file. band_conditions (list[tuple[int, float, str]]): A list of conditions in the form (band_index, threshold_value, compare_type): - band_index (int): Zero-based band index. - threshold_value (float): Threshold to apply. - compare_type (str): "above" or "below". Returns: float: Percentage of pixels satisfying all conditions (intersection). Example: >>> calculate_multi_band_threshold_ratio( ... "multi_band_image.tif", ... [(0, 0.3, "above"), (1, 0.7, "below")] ... ) 42.5| Parameter | Type | Description |
|---|---|---|
| band_conditions * | array | A list of conditions in the form (band_index, threshold_value, compare_type): - band_index (int): Zero-based band index. - threshold_value (float): Threshold to apply. - compare_type (str): "above" or "below". |
| image_path * | string | Path to the multi-band image file. |
calculate_threshold_ratioDescription: Calculate the average percentage of pixels above a given threshold for one or more images and a specified band. Parameters: image_paths (str or list[str]): Path or list of image file paths. threshold (float, optional): Threshold value. Default = 0.75. band_index (int, optional): Band index to use (0-based). Default = 0 (first band). Returns: percentage (float): Average percentage of pixels above the threshold across all images. Example: >>> calculate_threshold_ratio("image1.tif", threshold=0.5) 42.37 >>> calculate_threshold_ratio(["img1.tif", "img2.tif"], threshold=0.8, band_index=1) 33.12| Parameter | Type | Description |
|---|---|---|
| band_index | integer | Band index to use (0-based). Default = 0 (first band). |
| image_paths * | any | Path or list of image file paths. |
| threshold | number | Threshold value. Default = 0.75. |
calculate_tif_averageCalculate average of multiple tif files and save result to same directory. Parameters: file_list (list[str]): List of tif file paths. output_filename (str): Output filename, default "avg_result.tif". uint8 (bool): Convert to uint8 format, default False. Returns: output_path (str): Full path of output file.| Parameter | Type | Description |
|---|---|---|
| file_list * | array | List of tif file paths. |
| output_path * | string | relative path for the output raster file, e.g. "benchmark/data/question17/avg_result.tif" |
| uint8 | boolean | Convert to uint8 format, default False. |
calculate_tif_differenceCalculate difference between two tif files (image_b - image_a) and save result. Parameters: image_a_path (str): Path to first image (will be subtracted from). image_b_path (str): Path to second image (will subtract from). output_path (str): relative path for the output raster file, e.g. "question17/difference_result.tif" uint8 (bool): Convert to uint8 format, default False. Returns: output_path (str): Full path of output file.| Parameter | Type | Description |
|---|---|---|
| image_a_path * | string | Path to first image (will be subtracted from). |
| image_b_path * | string | Path to second image (will subtract from). |
| output_path * | string | relative path for the output raster file, e.g. "question17/difference_result.tif" |
| uint8 | boolean | Convert to uint8 format, default False. |
calculate_water_turbidity_ntuCalculate water turbidity in NTU (Nephelometric Turbidity Units) from red band raster file and save the result to a specified output path. Parameters: input_red_path (str): Path to the Red band raster file. output_path (str): relative path for the output raster file, e.g. "benchmark/data/question17/turbidity_2022-01-16.tif" method (str): Calculation method - "linear" (a*Red+b), "power" (a*Red^n+b), or "log" (a*log(Red)+b). a (float): Coefficient parameter, default 1.0. b (float): Offset parameter, default 0.0. n (float): Power parameter for power method, default 1.0. Returns: str: Path to the output NTU raster file.| Parameter | Type | Description |
|---|---|---|
| a | number | Coefficient parameter, default 1.0. |
| b | number | Offset parameter, default 0.0. |
| input_red_path * | string | Path to the Red band raster file. |
| method | string | Calculation method - "linear" (a*Red+b), "power" (a*Red^n+b), or "log" (a*log(Red)+b). |
| n | number | Power parameter for power method, default 1.0. |
| output_path * | string | relative path for the output raster file, e.g. "benchmark/data/question17/turbidity_2022-01-16.tif" |
ceil_numberDescription: Return the ceiling (rounded up integer) of a given number. Parameters: n (float): A numeric value. Returns: result (int): The smallest integer greater than or equal to n. Example: >>> ceil_number(4.2) 5 >>> ceil_number(-3.7) -3| Parameter | Type | Description |
|---|---|---|
| n * | number | A numeric value. |
celsius_to_kelvinDescription: Convert temperature from Celsius to Kelvin. Parameters: celsius (float): Temperature in Celsius. Returns: kelvin (float): Temperature in Kelvin, computed as: Kelvin = Celsius + 273.15 Example: >>> celsius_to_kelvin(0) 273.15 >>> celsius_to_kelvin(26.85) 300.0| Parameter | Type | Description |
|---|---|---|
| celsius * | number | Temperature in Celsius. |
centroid_distance_extremesDescription: Compute pairwise distances between centroids and return both the closest and farthest pairs with their indices and distances. Parameters: centroids (list[tuple[float, float]] or np.ndarray): A list or NumPy array of centroid coordinates in (x, y) format. Returns: result (dict): A dictionary containing: - 'min': (index1, index2, distance) Indices of the closest centroid pair and their distance. - 'max': (index1, index2, distance) Indices of the farthest centroid pair and their distance. Example: >>> centroids = [(0, 0), (3, 4), (10, 0)] >>> centroid_distance_extremes(centroids) {'min': (0, 1, 5.0), 'max': (1, 2, 7.211102550927978)}| Parameter | Type | Description |
|---|---|---|
| centroids * | any | A list or NumPy array of centroid coordinates in (x, y) format. |
chang_single_param_inversionChang algorithm for inversion of a single parameter using multi-frequency dual-polarized microwave brightness temperatures from local raster files. Parameters: bt_paths (list[str]): List of local GeoTIFF file paths for brightness temperature bands (e.g., ["BT_10V.tif", "BT_10H.tif", "BT_19V.tif", "BT_19H.tif"]). diff_pairs (list[list[int]]): List of index pairs for brightness temperature differences. parameter (str): Parameter to invert (e.g., "SM", "VWC"). output_path (str): relative path for the output raster file, e.g. "question17/thermal_inertia_2022-01-16.tif" Returns: str: File path to saved GeoTIFF with inverted parameter band.| Parameter | Type | Description |
|---|---|---|
| bt_paths * | array | List of local GeoTIFF file paths for brightness temperature bands (e.g., ["BT_10V.tif", "BT_10H.tif", "BT_19V.tif", "BT_19H.tif"]). |
| diff_pairs * | array | List of index pairs for brightness temperature differences. |
| output_path * | string | relative path for the output raster file, e.g. "question17/thermal_inertia_2022-01-16.tif" |
| parameter * | string | Parameter to invert (e.g., "SM", "VWC"). |
coefficient_of_variationDescription: Compute the Coefficient of Variation (CV) for a dataset. The CV is defined as the ratio of the standard deviation to the mean and is commonly used as a normalized measure of dispersion. Parameters: - x (list[float]): Input data values. - ddof (int, optional): Delta Degrees of Freedom for standard deviation calculation. * ddof = 0 → population std * ddof = 1 → sample std (default) Returns: - cv (float): Coefficient of Variation. Returns NaN if mean == 0.| Parameter | Type | Description |
|---|---|---|
| ddof | integer | Delta Degrees of Freedom for standard deviation calculation: - ddof=0 → population standard deviation - ddof=1 → sample standard deviation (default) |
| x * | array | Input dataset values (numeric). |
compute_linear_trendDescription Computes the linear trend (slope and intercept) of a time series by fitting a line of the form: y = a \cdot x + b using the least squares method. Parameters • y (list): The dependent variable — typically your time series data. • x (list): The independent variable — usually time indices. If not provided, the function will use np.arange(len(y)) as a default. Returns • slope (float): The coefficient a — represents the trend. • > 0: upward trend • < 0: downward trend • ≈ 0: no trend • intercept (float): The y-intercept b of the fitted line.| Parameter | Type | Description |
|---|---|---|
| x | any | |
| y * | array |
compute_tvdiCompute TVDI (Temperature Vegetation Dryness Index) using NDVI and LST from local raster files. Parameters: ndvi_path (str): Path to local NDVI GeoTIFF (e.g., MODIS NDVI scaled by 0.0001). lst_path (str): Path to local LST GeoTIFF (e.g., MODIS LST scaled by 0.02). output_path (str): relative path for the output raster file, e.g. "question17/tvdi_2022-01-16.tif" Returns: str: Path to the exported TVDI GeoTIFF.| Parameter | Type | Description |
|---|---|---|
| lst_path * | string | Path to the LST GeoTIFF file (e.g., MODIS LST scaled by 0.02). |
| ndvi_path * | string | Path to the NDVI GeoTIFF file (e.g., MODIS NDVI scaled by 0.0001). |
| output_path * | string | Relative path to save the computed TVDI raster (e.g., "question17/tvdi_2022-01-16.tif"). |
count_above_thresholdDescription: Count the number of pixels in an image whose values are greater than the specified threshold. Parameters: file_path (str): Path to the input image (GeoTIFF or raster format). threshold (float): Threshold value for hotspot detection. Returns: count (int): Number of pixels with values greater than the threshold. Example: >>> count_above_threshold("sample_image.tif", 100) 2456| Parameter | Type | Description |
|---|---|---|
| file_path * | string | Path to the input image (GeoTIFF or raster format). |
| threshold * | number | Threshold value for hotspot detection. |
count_images_exceeding_mean_multiplierCount how many images have a mean pixel value above or below a multiple of the overall mean pixel value across all images. Parameters: image_paths (str or list): Path(s) to image file(s). mean_multiplier (float): Multiplier applied to the overall mean (e.g., 1.1 means 110%). mode (str): - 'above': count images with mean > mean_multiplier × overall_mean - 'below': count images with mean < mean_multiplier × overall_mean Default is 'above'. verbose (bool): If True, prints detailed mean and threshold comparisons per image. Returns: int: Number of images satisfying the condition. Example: >>> count_images_exceeding_mean_multiplier( ... ["img1.tif", "img2.tif", "img3.tif"], ... mean_multiplier=0.9, ... mode="below" ... ) 2| Parameter | Type | Description |
|---|---|---|
| image_paths * | any | Path(s) to image file(s). |
| mean_multiplier | number | Multiplier applied to the overall mean (e.g., 1.1 means 110%). |
| mode | string | - 'above': count images with mean > mean_multiplier × overall_mean - 'below': count images with mean < mean_multiplier × overall_mean Default is 'above'. |
count_images_exceeding_threshold_ratioCount how many images have a percentage of pixels above or below a threshold that exceeds a specified ratio. Parameters: image_paths (str or list): Path(s) to image file(s). value_threshold (float): Pixel value threshold (e.g., NDVI > 0.7). ratio_threshold (float): Percentage threshold for comparison (e.g., 20.0 means 20%). mode (str): - 'above': pixels > value_threshold - 'below': pixels < value_threshold Default is 'above'. verbose (bool): If True, prints detailed ratio results per image. Returns: int: Number of images whose pixel ratio exceeds the ratio_threshold. Example: >>> count_images_exceeding_threshold_ratio( ... ["ndvi_1.tif", "ndvi_2.tif"], ... value_threshold=0.3, ... ratio_threshold=15.0, ... mode="above" ... ) 1| Parameter | Type | Description |
|---|---|---|
| image_paths * | any | Path(s) to image file(s). |
| ratio_threshold | number | Percentage threshold for comparison (e.g., 20.0 means 20%). |
| value_threshold | number | Pixel value threshold (e.g., NDVI > 0.7). |
count_pixels_satisfying_conditionsDescription: Count the number of pixels that simultaneously satisfy multiple band threshold conditions. Parameters: image_path (str): Path to the multi-band image file. band_conditions (list[tuple[int, float, str]]): A list of conditions in the form (band_index, threshold_value, compare_type): - band_index (int): Zero-based band index. - threshold_value (float): Threshold to apply. - compare_type (str): "above" or "below". Returns: int: Number of pixels satisfying all threshold conditions (intersection). Example: >>> count_pixels_satisfying_conditions( ... "multi_band_image.tif", ... [(0, 0.3, "above"), (1, 0.7, "below")] ... ) 1250| Parameter | Type | Description |
|---|---|---|
| band_conditions * | array | A list of conditions in the form (band_index, threshold_value, compare_type): - band_index (int): Zero-based band index. - threshold_value (float): Threshold to apply. - compare_type (str): "above" or "below". |
| image_path * | string | Path to the multi-band image file. |
count_skeleton_contoursDescription: Read a binary image, apply erosion and skeletonization, then count the number of external contours in the skeletonized image. Parameters: image_path (str): Path to the input binary (black and white) image. Returns: count (int): Number of external contours detected after skeletonization. Example: >>> count_skeleton_contours("binary_mask.png") 12| Parameter | Type | Description |
|---|---|---|
| image_path * | any | Path to the input binary (black and white) image. |
count_spikes_from_valuesCount the number of upward spikes in a sequence of numerical values. A spike is defined as a positive difference between consecutive valid values greater than the given threshold. Parameters: values (list of float): Input sequence of values (can include None or NaN). spike_threshold (float): Minimum positive change required to count as a spike. verbose (bool): If True, prints details for each detected spike. Returns: int: Number of detected upward spikes. Example: >>> count_spikes_from_values([0.1, 0.15, 0.5, 0.55], spike_threshold=0.2) 1| Parameter | Type | Description |
|---|---|---|
| spike_threshold | any | Minimum positive change required to count as a spike. |
| values * | any | Input sequence of values (can include None or NaN). |
| verbose | any | If True, prints details for each detected spike. |
create_fire_increase_mapDescription: Create a binary map highlighting areas where fire increase exceeds a specified threshold. Parameters: change_image_path (str): Path to the fire change image. output_path (str): Relative path for the output raster file (e.g., "question17/hotspot_2022-01-16.tif"). threshold (float, optional): Threshold value in MW. Default = 20.0. Returns: result (str): Path to the saved GeoTIFF fire increase map. Example: >>> create_fire_increase_map("fire_change.tif", "output/fire_increase.tif", threshold=25.0) 'Result save at /tmp/output/fire_increase.tif'| Parameter | Type | Description |
|---|---|---|
| change_image_path * | string | Path to the fire change image. |
| output_path * | string | Relative path for the output raster file (e.g., "question17/hotspot_2022-01-16.tif"). |
| threshold | number | Threshold value in MW. Default = 20.0. |
detect_change_pointsDescription: Detect structural change points in a univariate time series using the ruptures library with the PELT algorithm. A change point marks a location where the statistical properties of the signal shift (e.g., mean or variance). Parameters: - signal (list[float]): Input 1D time series data. - model (str, optional): Cost model type for segmentation. Options include "l1", "l2" (default; mean shift), "rbf", etc. - penalty (float, optional): Penalty value that controls sensitivity. Higher penalty = fewer detected change points. Default = 10. Returns: - change_points (list[int]): Indices where change points are detected. Includes the last index of the signal by default.| Parameter | Type | Description |
|---|---|---|
| model | any | Segmentation cost model to use. - "l1": robust to outliers (absolute loss) - "l2": mean shift model (squared loss, default) - "rbf": kernel-based model for nonlinear changes - others supported by ruptures |
| penalty | any | Penalty value controlling sensitivity. Higher values detect fewer change points (more conservative). |
| signal * | any | Input time series data. |
detect_seasonality_acfDescription: Detect the dominant seasonality (period) in a univariate time series using the Autocorrelation Function (ACF). The method searches for significant peaks in the ACF beyond lag=1 to identify repeating cycles. Parameters: - values (list[float]): Input time series data. - min_acf (float, optional): Threshold for ACF value to consider a lag significant. Default = 0.3. Returns: - result (int | str): * Dominant period (lag) as an integer if a significant seasonal cycle is detected. * "Data is not cyclical" if no significant seasonality is found.| Parameter | Type | Description |
|---|---|---|
| min_acf | number | ACF threshold to consider a lag significant. Lags with autocorrelation above this value are considered candidates. |
| values * | array | Input time series data as a list of numeric values. |
differenceDescription: Compute the absolute difference between two numbers. Parameters: - a (float): The first number. - b (float): The second number. Returns: - diff (float): The absolute difference |a - b|.| Parameter | Type | Description |
|---|---|---|
| a * | number | |
| b * | number |
divisionDescription: Perform division between two numbers. Parameters: - a (float): The divisor (denominator). - b (float): The dividend (numerator). Returns: - result (float): The result of b ÷ a. Returns +inf if a = 0.| Parameter | Type | Description |
|---|---|---|
| a * | number | |
| b * | number |
dual_frequency_diffDual-frequency Differential Method (DDM) for parameter inversion using local raster data. Supports inversion of multiple parameters via empirical linear models: - Soil Moisture (SM): param = alpha*(band1 - band2) + beta - Vegetation Index (VI): param = alpha*(band1 - band2) + beta - Leaf Area Index (LAI): param = alpha*(band1 - band2) + beta Parameters: band1_path (str): File path for frequency 1 polarization band GeoTIFF. band2_path (str): File path for frequency 2 polarization band GeoTIFF. parameter (str): Parameter to invert. Options: 'SM', 'VI', 'LAI'. Default is 'SM'. alpha (float, optional): Slope coefficient to override default. beta (float, optional): Intercept coefficient to override default. output_path (str): relative path for the output raster file, e.g. "question17/thermal_inertia_2022-01-16.tif" Returns: str: Path to the saved combined output GeoTIFF (difference and parameter).| Parameter | Type | Description |
|---|---|---|
| alpha * | number | Slope coefficient to override default. |
| band1_path * | string | File path for frequency 1 polarization band GeoTIFF. |
| band2_path * | string | File path for frequency 2 polarization band GeoTIFF. |
| beta * | number | Intercept coefficient to override default. |
| output_path * | string | relative path for the output raster file, e.g. "question17/thermal_inertia_2022-01-16.tif" |
| parameter * | string | Parameter to invert. Options: 'SM', 'VI', 'LAI'. Default is 'SM'. |
dual_polarization_differentialDual-Polarization Differential Method (DPDM) for microwave remote sensing parameter inversion. Supports soil moisture and vegetation index estimation with improved data handling and flexible parameters. Parameters: pol1_path (str): File path for the first polarization band GeoTIFF (e.g., VV). pol2_path (str): File path for the second polarization band GeoTIFF (e.g., VH). parameter (str): Parameter to invert, options: "soil_moisture" or "vegetation_index". output_path (str): relative path for the output raster file, e.g. "question17/thermal_inertia_2022-01-16.tif" a (float, optional): Linear coefficient for soil moisture model. Default is 0.3. b (float, optional): Intercept for soil moisture model. Default is 0.1. input_unit (str, optional): Unit of input data, either "dB" or "linear". Default is "dB". Returns: str: Path to the exported parameter GeoTIFF.| Parameter | Type | Description |
|---|---|---|
| a | number | Linear coefficient for soil moisture model. Default is 0.3. |
| b | number | Intercept for soil moisture model. Default is 0.1. |
| input_unit | string | Unit of input data, either "dB" or "linear". Default is "dB". |
| output_path * | string | relative path for the output raster file, e.g. "question17/thermal_inertia_2022-01-16.tif" |
| parameter * | string | Parameter to invert, options: "soil_moisture" or "vegetation_index". |
| pol1_path * | string | File path for the first polarization band GeoTIFF (e.g., VV). |
| pol2_path * | string | File path for the second polarization band GeoTIFF (e.g., VH). |
dual_polarization_ratioEstimate Vegetation Water Content (VWC) or Soil Moisture (SM) using Dual-Polarization Ratio Method (PRM) from local passive microwave brightness temperature GeoTIFF files. The polarization ratio is computed as: (V - H) / (V + H), where V and H are brightness temperatures of vertical and horizontal polarizations. Empirical models: - VWC = a_vwc * PR + b_vwc - SM = a_sm * PR + b_sm Parameters: bt_paths (dict): Dictionary of local GeoTIFF file paths for vertical and horizontal polarization bands, e.g. { "V": "BT_V.tif", "H": "BT_H.tif" } parameter (str): Parameter to invert, either "VWC" or "SM". output_path (str): relative path for the output raster file, e.g. "question17/thermal_inertia_2022-01-16.tif" coeffs (dict, optional): Empirical coefficients {"VWC": {"a":float, "b":float}, "SM": {...}}. Returns: str: File path of the saved GeoTIFF containing the inverted parameter and PR band.| Parameter | Type | Description |
|---|---|---|
| bt_paths * | object | Dictionary of local GeoTIFF file paths for vertical and horizontal polarization bands, e.g. |
| coeffs | object | |
| output_path * | string | |
| parameter * | string |
get_filelistReturns a list of files in the specified directory. Parameters: dir_path (str): Path to the directory. Returns: list: List of file names in the directory.| Parameter | Type | Description |
|---|---|---|
| dir_path * | string | Path to the directory. |
get_list_object_via_indexesDescription: Retrieve elements from a list using a list or tuple of indices. Parameters: input_list (list): The source list from which elements will be extracted. indexes (list[int] or tuple[int]): A sequence of indices specifying the positions of elements to retrieve. Returns: result (list): A list of elements corresponding to the provided indices. Example: >>> get_list_object_via_indexes(['a', 'b', 'c', 'd'], [1, 3]) ['b', 'd']| Parameter | Type | Description |
|---|---|---|
| indexes * | any | A sequence of indices specifying the positions of elements to retrieve. |
| input_list * | any | The source list from which elements will be extracted. |
get_percentile_value_from_imageDescription: Calculate the N-th percentile value of pixel values in a raster image, and return it as a native Python type matching the image's data type. Parameters: image_path (str): Path to the input raster (.tif) file. percentile (int or float): Percentile to calculate (range 1–100). Returns: value (int or float): The pixel value corresponding to the specified percentile, cast to the appropriate native Python type (int for integer rasters, float for floating-point rasters). Example: >>> get_percentile_value_from_image("fire_map.tif", 90) 235| Parameter | Type | Description |
|---|---|---|
| image_path * | any | Path to the input raster (.tif) file. |
| percentile * | any | Percentile to calculate (range 1–100). |
getis_ord_gi_starDescription: Compute the Getis-Ord Gi* statistic for local spatial autocorrelation on a raster image. This method identifies statistically significant spatial clusters of high (hot spots) or low (cold spots) values using a user-specified spatial weight kernel. Parameters: - image_path (str): Path to the input single-band raster image (GeoTIFF). - weight_matrix (list[list[float]]): 2D list representing the spatial weight kernel (e.g., 3x3 matrix for neighborhood influence). - output_path (str): Relative file path to save the Gi* result GeoTIFF (e.g., "question17/cloud_mask_2022-01-16.tif"). Returns: - str: Path to the saved GeoTIFF image containing computed Gi* statistics. Output raster has the same dimensions as the input image, with float32 values representing local Gi* scores.| Parameter | Type | Description |
|---|---|---|
| image_path * | string | Path to the input single-band raster image (GeoTIFF). |
| output_path * | string | Relative file path to save the Gi* statistic result as GeoTIFF (e.g., "question17/cloud_mask_2022-01-16.tif"). |
| weight_matrix * | array | 2D list representing the spatial weight kernel (e.g., 3x3 or 5x5 neighborhood weights). The sum of weights must not be zero. |
grayscale_to_colormapApply a colormap to a grayscale image and save as a color image.| Parameter | Type | Description |
|---|---|---|
| cmap_name | string | Name of a matplotlib colormap, e.g. 'viridis', 'RdBu', etc. |
| image_path * | string | Path to input grayscale image (e.g. .tif). |
| preserve_geo | boolean | If True, preserves georeferencing. |
| save_name * | string | Filename for save color image (.png, .jpg, or .tif). |
identify_fire_prone_areasDescription: Identify fire-prone areas from a hotspot map based on a given percentile threshold. Parameters: file_path (str): Path to the input hotspot map file. output_path (str): Relative path for the output raster file (e.g., "question17/hotspot_2022-01-16.tif"). threshold_percentile (float, optional): Percentile threshold for identifying fire-prone areas. Default = 75. uint8 (bool, optional): Whether to use uint8 format when reading the input. Default = False. Returns: result (tuple[str, float]): A tuple containing: - Path to the saved GeoTIFF file with fire-prone areas. - Threshold value used for classification. Example: >>> identify_fire_prone_areas("hotspot_map.tif", "output/fire_prone.tif", 80) ('Result save at /tmp/output/fire_prone.tif', 123.45)| Parameter | Type | Description |
|---|---|---|
| file_path * | string | Path to the input hotspot map file. |
| output_path * | string | Relative path for the output raster file (e.g., "question17/hotspot_2022-01-16.tif"). |
| threshold_percentile | number | Percentile threshold for identifying fire-prone areas. Default = 75. |
| uint8 | boolean | Whether to use uint8 format when reading the input. Default = False. |
image_division_meanDescription: Calculate the mean of pixel-wise division between two images or between two bands of the same image. Parameters: image_path1 (str): Path to the first image (or the only image if comparing two bands). image_path2 (str, optional): Path to the second image. If None, band1 and band2 of image_path1 will be used. band1 (int, optional): Band index for numerator when using a multi-band image. Default = 1. band2 (int, optional): Band index for denominator when using a multi-band image. Default = 2. Returns: result (float): The mean of the valid pixel-wise division results. Example: >>> image_division_mean("multiband_image.tif", band1=3, band2=2) 1.245 >>> image_division_mean("image1.tif", "image2.tif") 0.876| Parameter | Type | Description |
|---|---|---|
| band1 | any | Band index for numerator when using a multi-band image. Default = 1. |
| band2 | any | Band index for denominator when using a multi-band image. Default = 2. |
| image_path1 * | any | Path to the first image (or the only image if comparing two bands). |
| image_path2 | any | Path to the second image. If None, band1 and band2 of image_path1 will be used. |
kelvin_to_celsiusDescription: Convert temperature from Kelvin to Celsius. Parameters: - kelvin (float): Temperature in Kelvin. Returns: - celsius (float): Temperature in Celsius, computed as (Kelvin - 273.15).| Parameter | Type | Description |
|---|---|---|
| kelvin * | number |
kurtosisDescription: Compute the kurtosis of a dataset, which measures the "tailedness" of the distribution. Parameters: - x (list[float]): Input data values. - bias (bool, optional): If False, applies bias correction (unbiased estimator). Default = True. - fisher (bool, optional): * If True, returns "excess kurtosis" (normal distribution → 0). * If False, returns regular kurtosis (normal distribution → 3). Default = True. Returns: - kurt (float): Kurtosis of the dataset. * Positive → heavy-tailed relative to normal distribution. * Negative → light-tailed relative to normal distribution. * Zero → same tailedness as normal distribution (if fisher=True).| Parameter | Type | Description |
|---|---|---|
| bias | boolean | If False, applies bias correction to compute the unbiased estimator. |
| fisher | boolean | - If True, returns "excess kurtosis" (normal distribution → 0). - If False, returns regular kurtosis (normal distribution → 3). |
| x * | array | Input dataset values (numeric). |
lst_multi_channelEstimate Land Surface Temperature (LST) using the multi-channel algorithm. Requires local input files: - Two thermal infrared bands (e.g., Band 31 and Band 32) as GeoTIFF files. Parameters: band31_path (str): Path to local GeoTIFF file for thermal band 31 (~11 μm). band32_path (str): Path to local GeoTIFF file for thermal band 32 (~12 μm). output_path (str): Relative path for the output raster file, e.g. "question17/lst_2022-01-16.tif" Returns: str: Local file path of the exported LST image.| Parameter | Type | Description |
|---|---|---|
| band31_path * | string | Path to local GeoTIFF file for thermal band 31 (~11 μm). |
| band32_path * | string | Path to local GeoTIFF file for thermal band 32 (~12 μm). |
| output_path * | string | Relative path for the output LST GeoTIFF, e.g. "question17/lst_2022-01-16.tif". |
lst_single_channelEstimate Land Surface Temperature (LST) using the Single-Channel method, with NDVI-based emissivity estimation from RED and NIR bands. Parameters: bt_path (str): Brightness Temperature GeoTIFF (Kelvin). red_path (str): Red band GeoTIFF (e.g., Landsat 8 Band 4). nir_path (str): NIR band GeoTIFF (e.g., Landsat 8 Band 5). output_path (str): relative path for the output raster file, e.g. "question17/lst_2022-01-16.tif" Returns: str: Path to saved LST GeoTIFF.| Parameter | Type | Description |
|---|---|---|
| bt_path * | string | Path to the Brightness Temperature GeoTIFF (Kelvin). |
| nir_path * | string | Path to the NIR band GeoTIFF (e.g., Landsat 8 Band 5). |
| output_path * | string | Relative path for the output LST GeoTIFF, e.g. "question17/lst_2022-01-16.tif". |
| red_path * | string | Path to the RED band GeoTIFF (e.g., Landsat 8 Band 4). |
mann_kendall_testDescription: Perform the non-parametric Mann-Kendall trend test on a univariate time series. The test evaluates whether there is a monotonic upward or downward trend without requiring the data to conform to any particular distribution. Parameters: - x (list[float]): Input time series values (numeric). Missing values should be removed before calling. Returns: - trend (str): Type of detected trend. One of: * "increasing" — statistically significant upward trend * "decreasing" — statistically significant downward trend * "no trend" — no statistically significant trend - p_value (float): Two-tailed p-value of the test. - z (float): Standard normal test statistic. - tau (float): Kendall’s Tau statistic (rank correlation, between -1 and 1).| Parameter | Type | Description |
|---|---|---|
| x * | array | The input time series data as a list of floats or ints. Any missing values (NaN) should be removed beforehand. |
max_value_and_indexDescription: Find the maximum value in a list and return both the maximum value and its index. Parameters: - x (list[float]): Input data list. Returns: - result (tuple[float, int]): A tuple containing: * max_value (float): The maximum value in the list. * max_index (int): The index of the maximum value.| Parameter | Type | Description |
|---|---|---|
| x * | array |
meanDescription: Compute the arithmetic mean (average) of a dataset. Parameters: x (list[float]): Input data array. Returns: mean_value (float): The arithmetic mean of the input values. Example: >>> mean([1, 2, 3, 4, 5]) 3.0| Parameter | Type | Description |
|---|---|---|
| x * | array | Input data array. |
min_value_and_indexDescription: Find the minimum value in a list and return both the minimum value and its index. Parameters: - x (list[float]): Input data list. Returns: - result (tuple[float, int]): A tuple containing: * min_value (float): The minimum value in the list. * min_index (int): The index of the minimum value.| Parameter | Type | Description |
|---|---|---|
| x * | array |
modis_day_night_lstEstimate land surface temperature (LST) from local MODIS Day and Night brightness temperatures using a single-channel correction method. Requires local input GeoTIFF files: - BT_day_path: Brightness Temperature Day band (e.g., MODIS LST_Day_1km scaled by 0.02) - BT_night_path: Brightness Temperature Night band (e.g., MODIS LST_Night_1km scaled by 0.02) - Emis_day_path: Emissivity Day band (e.g., MODIS Emis_31 scaled by 0.002) - Emis_night_path: Emissivity Night band (e.g., MODIS Emis_32 scaled by 0.002) Parameters: BT_day_path (str): Path to local Brightness Temperature Day GeoTIFF. BT_night_path (str): Path to local Brightness Temperature Night GeoTIFF. Emis_day_path (str): Path to local Emissivity Day GeoTIFF. Emis_night_path (str): Path to local Emissivity Night GeoTIFF. output_path (str): relative path for the output raster file, e.g. "question17/lst_2022-01-16.tif" Returns: str: Path to the exported GeoTIFF containing six bands: LST_Day, LST_Night, BT_Day, BT_Night, Emis_Day, Emis_Night.| Parameter | Type | Description |
|---|---|---|
| BT_day_path * | string | Path to local MODIS Brightness Temperature Day GeoTIFF. |
| BT_night_path * | string | Path to local MODIS Brightness Temperature Night GeoTIFF. |
| Emis_day_path * | string | Path to MODIS Emissivity Day GeoTIFF (scaled by 0.002, offset by 0.49). |
| Emis_night_path * | string | Path to MODIS Emissivity Night GeoTIFF (scaled by 0.002, offset by 0.49). |
| output_path * | string | Relative path for saving the output raster file (e.g., "question17/lst_2022-01-16.tif"). |
multi_freq_btMulti-frequency Brightness Temperature Method for parameter inversion using local raster data. Parameters: bt_paths (list[str]): List of local file paths for brightness temperature GeoTIFF bands (e.g., ["BT_10GHz.tif", "BT_19GHz.tif", "BT_37GHz.tif"]). diff_pairs (list[list[int]]): List of index pairs from bt_paths for difference calculation (e.g., [[0,1],[1,2]]). parameter (str): Parameter to invert. Options: 'SM', 'VWC', 'LAI'. output_path (str): relative path for the output raster file, e.g. "question17/thermal_inertia_2022-01-16.tif" Returns: str: Path to the saved inverted parameter GeoTIFF.| Parameter | Type | Description |
|---|---|---|
| bt_paths * | array | List of local file paths for brightness temperature GeoTIFF bands (e.g., ["BT_10GHz.tif", "BT_19GHz.tif", "BT_37GHz.tif"]). |
| diff_pairs * | array | List of index pairs from bt_paths for difference calculation (e.g., [[0,1],[1,2]]). |
| output_path * | string | relative path for the output raster file, e.g. "question17/thermal_inertia_2022-01-16.tif" |
| parameter * | string | Parameter to invert. Options: 'SM', 'VWC', 'LAI'. |
multiplyDescription: Multiply two numbers and return their product. Parameters: a (float or int): First number. b (float or int): Second number. Returns: result (float or int): The product of a and b. Example: >>> multiply(3, 4) 12 >>> multiply(2.5, 4) 10.0| Parameter | Type | Description |
|---|---|---|
| a * | any | First number. |
| b * | any | Second number. |
nasa_team_sea_ice_concentrationEstimate Sea Ice Concentration using NASA Team Algorithm from local passive microwave brightness temperature GeoTIFF files. Parameters: bt_paths (dict): Dictionary of local GeoTIFF file paths for required brightness temperature bands, e.g., { "19V": "BT_19V.tif", "19H": "BT_19H.tif", "37V": "BT_37V.tif", "37H": "BT_37H.tif" } output_path (str): relative path for the output raster file, e.g. "question17/thermal_inertia_2022-01-16.tif" nd_ice (float): ND value for ice reference. Default 50.0. nd_water (float): ND value for water reference. Default 0.0. s1_ice (float): S1 value for ice reference. Default 20.0. s1_water (float): S1 value for water reference. Default 0.0. Returns: str: Path to saved GeoTIFF with sea ice concentration band.| Parameter | Type | Description |
|---|---|---|
| bt_paths * | object | Dictionary of local GeoTIFF file paths for required brightness temperature bands, e.g., |
| nd_ice | number | |
| nd_water | number | |
| output_path * | string | |
| s1_ice | number | |
| s1_water | number |
percentage_changeDescription: Calculate the percentage change between two numbers, useful for comparing relative growth or decline. Parameters: - a (float): The original value (denominator). - b (float): The new value (numerator). Returns: - percent (float): The percentage change, computed as ((b - a) / a) * 100. Positive values indicate increase, negative values indicate decrease.| Parameter | Type | Description |
|---|---|---|
| a * | number | |
| b * | number |
radiometric_correction_srApply Landsat 8 surface reflectance (SR_B*) radiometric correction. Parameters: input_band_path (str): Path to the input reflectance band file. output_path (str): relative path for the output raster file, e.g. "question17/radiometric_correction_2022-01-16.tif" Returns: str: Path to the saved corrected reflectance file.| Parameter | Type | Description |
|---|---|---|
| input_band_path * | any | Path to the input reflectance band file. |
| output_path * | any | relative path for the output raster file, e.g. "question17/radiometric_correction_2022-01-16.tif" |
sens_slopeDescription: Compute Sen’s Slope estimator for a univariate time series. Sen’s Slope is a robust non-parametric method for estimating the median rate of change over time, often used with the Mann-Kendall test to assess both trend and magnitude. Parameters: - x (list[float]): Input time series values (numeric). Must contain at least two observations. Returns: - slope (float): Sen’s Slope estimate (the median of all pairwise slopes). - slopes (list[float]): List of all individual pairwise slopes, useful for optional further analysis.| Parameter | Type | Description |
|---|---|---|
| x * | array | The input time series data as a list of floats or ints. Must have at least two data points. |
skewnessDescription: Compute the skewness of a dataset, which measures the asymmetry of the probability distribution. Parameters: - x (list[float]): Input data values. - bias (bool, optional): If False, applies bias correction (Fisher-Pearson unbiased estimator). Default = True. Returns: - skew (float): Skewness of the dataset. * Positive skew → long right tail * Negative skew → long left tail * Zero skew → symmetric distribution| Parameter | Type | Description |
|---|---|---|
| bias | boolean | If False, applies bias correction (Fisher-Pearson method) to compute the unbiased estimator of skewness. |
| x * | array | Input dataset values (numeric). |
stl_decomposeDescription: Apply Seasonal-Trend decomposition using LOESS (STL) to a univariate time series. Decomposes the series into trend, seasonal, and residual components. Parameters: - x (list[float]): Input time series values (numeric). - period (int): Number of observations per cycle (e.g., 12 for monthly data with yearly seasonality). - robust (bool, optional): Whether to use a robust version of STL (less sensitive to outliers). Default = True. Returns: - result (dict): Dictionary with three keys: * "trend" (list[float]): Estimated long-term trend component. * "seasonal" (list[float]): Estimated seasonal component. * "resid" (list[float]): Residual (remainder) component.| Parameter | Type | Description |
|---|---|---|
| period * | integer | The number of observations in one seasonal cycle. Example: 12 for monthly data with yearly seasonality. |
| robust | boolean | If True, use the robust version of STL, which is less sensitive to outliers. |
| x * | array | Input time series values. Will be internally converted to a pandas Series. |
subtractSubtract two images and save result. Parameters: img1_path (str): Path to first image. img2_path (str): Path to second image. output_path (str): relative path for the output raster file, e.g. "question17/difference_result.tif" Returns: str: Path to output file.| Parameter | Type | Description |
|---|---|---|
| img1_path * | string | Path to first image. |
| img2_path * | string | Path to second image. |
| output_path * | string | relative path for the output raster file, e.g. "question17/difference_result.tif" |
temperature_emissivity_separationEstimate Land Surface Temperature (LST) using an enhanced Temperature Emissivity Separation (TES) algorithm with empirical emissivity estimation. Parameters: tir_band_paths (list[str]): List of Thermal Infrared (TIR) GeoTIFF file paths (e.g., ASTER Bands 10–14). representative_band_index (int): Index of the TIR band to use as reference brightness temperature (e.g., 3 for Band 13). output_path (str): relative path for the output raster file, e.g. "question17/lst_2022-01-16.tif" Returns: str: Path to the output GeoTIFF containing three bands: LST, emissivity, and emissivity variation.| Parameter | Type | Description |
|---|---|---|
| output_path * | string | Relative path for saving the output raster file (e.g., "question17/lst_2022-01-16.tif"). |
| representative_band_index * | integer | Index of the TIR band used as the reference brightness temperature (e.g., 3 for Band 13). |
| tir_band_paths * | array | List of paths to Thermal Infrared (TIR) GeoTIFFs (e.g., ASTER Bands 10–14). |
threshold_segmentationPerform threshold-based segmentation on a single-band raster image. The function reads a raster image from the specified path, converts it to a binary mask by applying a fixed threshold, and writes the resulting binary image to a new file. Pixel values greater than the threshold are set to 255 (white), and values less than or equal to the threshold are set to 0 (black). Parameters: input_image_path (str): Path to the input raster image file (e.g., TIFF, PNG, JPG). threshold (float or int): Pixel intensity threshold used to generate the binary mask. output_path (str): Relative output path (under TEMP_DIR) where the result will be saved, e.g., "question17/threshold_segmentation_2022-01-16.tif". Returns: str: Message indicating the file path where the result is saved.| Parameter | Type | Description |
|---|---|---|
| input_image_path * | any | Path to the input raster image file (e.g., TIFF, PNG, JPG). |
| output_path * | any | Relative output path (under TEMP_DIR) where the result will be saved, e.g., "question17/threshold_segmentation_2022-01-16.tif". |
| threshold * | any | Pixel intensity threshold used to generate the binary mask. |
ttm_lstEstimate land surface temperature (LST) and emissivity using improved Three-Temperature Method (TTM) from three local thermal band GeoTIFF files. Uses all three bands to form a system of equations and solves per-pixel with physical constraints. Parameters: tir_band_paths (list[str]): Paths to three thermal band GeoTIFFs (e.g. ASTER B10, B11, B12). output_path (str): relative path for the output raster file, e.g. "question17/lst_2022-01-16.tif" wavelengths (list[float], optional): Wavelengths (μm) for each band. Default [8.3, 8.65, 9.1]. Returns: str: Path to exported GeoTIFF with LST and emissivity bands.| Parameter | Type | Description |
|---|---|---|
| output_path * | string | Relative path to save the output raster (e.g., "question17/lst_2022-01-16.tif"). |
| tir_band_paths * | array | Paths to three thermal infrared band GeoTIFF files (e.g., ASTER B10, B11, B12). |
| wavelengths | array | Central wavelengths (in μm) for each band. Defaults to [8.3, 8.65, 9.1]. |
Security checks
6 checks have not been run yet.