A package to read, process, and visualize the Sataid binary data format for satellite imagery.
Project description
Sataid Python Package
sataid is a Python library designed to read, process, and visualize data from the Sataid binary format, commonly used for weather satellite imagery.
This package provides a simple interface to handle complex binary files, allowing users to quickly access, analyze, and export satellite data into standard formats like NetCDF, GeoTIFF, or xarray.DataArray.
Features
- Direct Reading: Reads Sataid binary files effortlessly.
- Auto-Calibration: Converts raw data to physical units (Reflectance or Brightness Temperature in °C).
- Rich Visualization: Creates plots with map projections using
matplotlibandcartopy. - Data Subsetting: Easily extract data for a specific point or a geographical region.
- Format Conversion: Exports data to NetCDF, GeoTIFF, and
xarray.DataArrayfor further analysis.
Installation
You can install the package using pip:
pip install sataid
The package requires several scientific libraries. If you encounter issues, you may need to install them manually, especially cartopy which can have complex dependencies.
pip install numpy matplotlib netcdf4 scipy rasterio cartopy
Usage Examples
Here is a comprehensive example demonstrating the main features of the sataid package.
from sataid import read_sataid
# Define the path to your Sataid data file
file_path = 'H09_B13_Indonesia_20251026.Z0000' # Example filename
# 1. Read the Sataid file
# This returns a SataidArray object with data and metadata.
sat_data = read_sataid(file_path)
# 2. Display Data Description
# Get a quick summary of the data, including time, channel, and satellite info.
print("--- Data Description ---")
sat_data.description()
# 3. Create a Plot with a Map Overlay
# The `cartopy=True` argument renders coastlines and borders.
print("\n--- Generating plot with Cartopy map ---")
sat_data.plot(cartopy=True)
# 4. Save the Plot to a File
# Save the visualization as a high-resolution PNG image.
print("\n--- Saving plot to file ---")
output_image_path = 'himawari_b13_plot.png'
sat_data.savefig(output_image_path, cartopy=True)
# 5. Extract Data for a Specific Point
# Get the brightness temperature for a specific coordinate (e.g., Jakarta).
# Method can be 'nearest' (default), 'linear', or 'cubic'.
print("\n--- Extracting value at a specific point ---")
jakarta_lat, jakarta_lon = -6.20, 106.84
temperature = sat_data.sel(latitude=jakarta_lat, longitude=jakarta_lon, method='linear')
if temperature is not None:
print(f"Brightness Temperature near Jakarta: {temperature:.2f} {sat_data.units}")
# 6. Select a Geographical Subset (Region)
# Crop the data to a specific area, for example, the island of Java.
print("\n--- Creating a subset for a region ---")
java_area = sat_data.sel(
latitude=slice(-5, -9), # Slice from 5°S to 9°S
longitude=slice(105, 115) # Slice from 105°E to 115°E
)
print("Subset created. New coordinate range:")
java_area.description()
# You can now plot or save this subset
# java_area.plot(cartopy=True)
# 7. Convert to Other Formats for Analysis
# Convert to an xarray.DataArray for powerful, labeled data analysis.
print("\n--- Converting to xarray.DataArray ---")
xr_data = sat_data.to_xarray()
if xr_data is not None:
print(xr_data)
# Example: calculate the mean temperature for the entire dataset
mean_temp = xr_data.mean()
print(f"\nMean temperature across the scene: {mean_temp.item():.2f} {xr_data.attrs['units']}")
# Convert to a NetCDF file for use in other scientific software.
print("\n--- Exporting to NetCDF ---")
sat_data.to_netcdf('output_data.nc')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sataid-0.1.2.tar.gz.
File metadata
- Download URL: sataid-0.1.2.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bec382170ec791ca1ffe384782eeac798610800f63cf0ad87b91394fc44af503
|
|
| MD5 |
e77efe876a30e380e8d5c41edcfab6cf
|
|
| BLAKE2b-256 |
0f593d19e58fbd1955932d9b0403e9461e6ae9403f91c06319e622c07df1aa52
|
File details
Details for the file sataid-0.1.2-py3-none-any.whl.
File metadata
- Download URL: sataid-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7205e3b3d0750b0691b4fd321441e95dfa2bb9e43775cd72a22d91b946386e87
|
|
| MD5 |
0a1f0743adbb3dff7555681566a52e28
|
|
| BLAKE2b-256 |
ff194a2f1499d57594047a2805158283834fa685cd3373ed41d16ab845b52e9b
|