light_pollution_map
Retrieve light pollution data for any location to assess sky brightness, Bortle class, and SQM values for optimal stargazing conditions.
Instructions
Get light pollution data for a specific area.
Returns a grid of light pollution data points including brightness, Bortle class, and SQM.
Args: south, west, north, east: Bounding box coordinates. zoom: Zoom level for the grid resolution (default: 10). Higher zoom means more detailed grid.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| south | Yes | ||
| west | Yes | ||
| north | Yes | ||
| east | Yes | ||
| zoom | No |
Implementation Reference
- src/functions/places/impl.py:10-27 (handler)The core handler function for the 'light_pollution_map' MCP tool. It is decorated with @mcp.tool() which handles registration and schema inference from the signature and docstring. The function computes light pollution grid data off-thread using a helper and formats the response.@mcp.tool() async def light_pollution_map( south: float, west: float, north: float, east: float, zoom: int = 10 ) -> Dict[str, Any]: """Get light pollution data for a specific area. Returns a grid of light pollution data points including brightness, Bortle class, and SQM. Args: south, west, north, east: Bounding box coordinates. zoom: Zoom level for the grid resolution (default: 10). Higher zoom means more detailed grid. """ def _compute(): return get_light_pollution_grid(north=north, south=south, east=east, west=west, zoom=zoom) result = await asyncio.to_thread(_compute) return format_response(result)
- src/placefinder.py:37-38 (helper)Supporting utility function called by the tool handler to fetch the light pollution grid data from the stargazingplacefinder library.def get_light_pollution_grid(north: float, south: float, east: float, west: float, zoom: int = 10) -> Dict[str, Any]: return spf.get_light_pollution_grid(north=north, south=south, east=east, west=west, zoom=zoom)