Plan an observing night with confidence!
This tool generates observing lists tailored to your site, date, and time window. It prioritizes crowdâpleasers (Saturn! Jupiter!), filters by altitude and Moon separation, and outputs nightâvision friendly HTML, CSV tables, and console listings.
A daily demo (Minnesota Astronomical Society â Eagle Lake Observatory) lives at https://party.knowmad.org
- Planets + Moon + custom deepâsky catalog (CSV; Messier + Caldwell included)
- Smart filtering by minimum altitude, maximum magnitude, and Moon separation
- Assigns an interest score so crowdâpleasers bubble to the top
- Supports type_weights.csv for customizable interest scoring per object type
- Finds each objectâs best observing time (peak altitude in your window)
- Nightâvision HTML: dark red theme, mobileâfirst, lightweight JS
- Now view that autoâupdates the HTML view in sync with the clock (every 4 minutes)
- Directional/altitude âobstructionâ filters (up to 5 azimuth ranges)
- TopâN limiter for the Now view (e.g., show top 16 targets only)
- Clickable rows â modal with object details and a preview image
- Local image cache (DSS2 Red via hips2fits; Wikipedia fallback) to avoid reâdownloading
Outputs
*_master.csvâ Master observing list*_hourly.csvâ Hourâbyâhour shortlist*.htmlâ Nightâvision web page (tabbed UI with Now + Master; hourly tabs)
Requires Python 3.10+.
git clone https://github.com/educationfutures/star-party-planner.git
cd star-party-planner
# Core deps
pip install skyfield numpy pandas pytz python-dateutilRecommended versions:
- Skyfield
1.45+ - NumPy
1.20+ - Pandas
1.3+
The planner uses a local JPL ephemeris for precise planet/Moon positions. We recommend de440s.bsp (~31 MB, valid 1550â2650 CE).
mkdir -p ./skyfield_data
curl -LO https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/de440s.bsp
mv de440s.bsp ./skyfield_data/
# You should now have: ./skyfield_data/de440s.bsp
â ď¸ The planner never autoâdownloads BSP files; you must provide them with--bsp.
Provide a CSV with at least the following columns:
name,ra_deg,dec_deg,type,mag,notes
Example row:
M13,250.421,36.461,Globular cluster,5.8,"Great Hercules Cluster"
This repo includes messier_caldwell.csv (Messier + Caldwell) and extended_targets.csv with additional crowdâpleasers.
The type_weights.csv file allows you to customize how different object types are scored in the prioritization process. Each row should contain a type and a corresponding weight, where higher weights increase the priority of those object types in the observing list.
The repository includes a default type_weights.csv tuned for a 16-inch telescope. You can copy and edit this file to suit your preferences or provide your own via the --type_weights command-line argument.
Example type_weights.csv snippet:
type,weight,diffuse,partial_diffuse
Globular cluster,45,FALSE,FALSE
Open cluster,33,FALSE,FALSE
Planetary nebula,40,FALSE,TRUE
Galaxy cluster,32,TRUE,FALSE
Weights act as relative multipliers to the base interest score and work together with other factors such as magnitude, altitude, and moonlight penalty to determine the final priority of each target.
python starparty_planner.py \
--lat 44.810265 --lon -93.939783 --elev 296 \
--date 2025-08-30 --start 20:00 --end 01:00 --tz America/Chicago \
--catalog messier_caldwell.csv --min_alt 20 --moon_sep_min 20 --max_mag 9 \
--top_n_per_hour 16 --out_prefix starparty \
--html starparty.html \
--bsp ./skyfield_data/de440s.bsp \
--html_ui tabs \
--min_alt_planets 5 --min_alt_moon 0 \
--preview_cache_dir image_cache --preview_px 800 --preview_fov_deg 0.6 \
--type_weights type_weights.csv \
--now_padding_min 30
â ď¸ First run may spend a long time fetching previews to the local cache.
--lat(float, required) â Latitude in decimal degrees (north +)--lon(float, required) â Longitude in decimal degrees (east +)--elev(float, default=0.0) â Elevation in meters--date(YYYYâMMâDD, default=today) â Observation date (local)--start(HH:MM, default=sunset rounded) â Session start time--end(HH:MM, default=sunrise hour) â Session end time--tz(string, default=UTC) â IANA timezone, e.g.America/Chicago
--catalog(path, default=messier_caldwell.csv) â DSO catalog--bsp(path, default=./skyfield_data/de440s.bsp) â Planetary ephemeris--min_alt(float, default=20.0) â Minimum altitude (deg) for DSOs--max_mag(float, default=9.0) â Maximum magnitude (fainter excluded)--moon_sep_min(float, default=15.0) â Minimum separation from the Moon (deg) for DSOs--hour_step(int, default=1) â Step size in hours for hourly tables--top_n_per_hour(int, default=16) â Max targets per hour slot--moonlight_penalty_max(float, default=18) â Max points subtracted from diffuse targets at full Moon when high in the sky
--type_weights(path, optional) â CSV file specifying per-type interest weights to customize scoring. Overrides default scoring weights for object types.
-
--out_prefix(string, default=starparty) â Prefix for CSV files -
--html(string, optional) â Path to save HTML output -
--html_title(string, default=Star Party Planner) â Heading/title for HTML output -
--html_ui(tabs|accordion, default=tabs) â HTML layout style
--min_alt_planets(float, default=5.0) â Minimum altitude for planets--min_alt_moon(float, default=0.0) â Minimum altitude for the Moon
--no_previewsâ Disable image previews entirely--preview_cache_dir(string, default=image_cache) â Directory for cached previews--preview_px(int, default=800) â Pixel size for DSS2 preview images--preview_fov_deg(float, default=0.6) â Field of view for DSS2 preview images (degrees)--refresh_previewsâ Force reâdownload of previews this run--clean_preview_cacheâ After generation, remove cached images not referenced by this run
--now_padding_min(int, default=0) â Number of minutes before sunset and after sunrise to keep the Now view active (pads the observing window).
Note: These options apply to the HTML preview images only. Catalogs and BSPs are not affected.
- Tabs for Now and Master List; perâhour tables are reachable via the hour âchipsâ in the navbar.
- Search filters the visible table(s) instantly.
- Sticky navbar, nonâsticky table headers (prevents overlay on resize).
- Emphasis on eyepieceâfriendly columns: Alt (°), Az (°), Dir.
- Updates in step with the clock (every four minutes).
- Renders the topâN targets after filtersâconfigurable in the Filters dialog.
- The Now view window can be padded before sunset and after sunrise by specifying
--now_padding_min. - Scoring now incorporates customizable per-type weights from
type_weights.csvif provided. - Click any row to open the modal with details + preview.
- Enable/disable directional filtering.
- Define up to five azimuth ranges with a minimum clear altitude each (great for trees/buildings).
- Set the TopâN limit for the Now view.
- Settings are stored in
localStorageand persist per browser.
- Shows type, magnitude, best time, direction, coordinates, and notes.
- Preview image:
- DSS2 Red via hips2fits (CDS service), or
- Wikipedia/Wikimedia image (planets/Moon, or DSO fallback).
- Previews are tinted for night vision.
- During HTML generation the planner fetches preview tiles and writes them to
--preview_cache_dir(default:image_cache). - Subsequent runs reuse existing files so the page loads instantly in the field.
- If a preview is missing or outdated, run with
--refresh_previews. - To prune unused files after a run, add
--clean_preview_cache.
- Prepare your DSO catalog (
messier_caldwell.csv). - Download the ephemeris (
de440s.bsp) into./skyfield_data/. - Run the script for your site with your preferred flags.
- Open
starparty.htmlon your phone/tablet at the telescope. - Enjoy your observing session!
Automation: run this via a daily cron job and publish the HTML so the plan is always fresh before sunset.
Assume you want the output at /var/www/star-party/index.html on a Linux host (Nginx/Apache).
-
Create a writable output directory and set ownership (replace
www-data:www-datawith your web user):sudo mkdir -p /var/www/star-party sudo chown -R $USER:www-data /var/www/star-party sudo chmod -R 775 /var/www/star-party -
Create a small shell script (e.g.,
~/bin/run_starparty.sh):#!/usr/bin/env bash set -euo pipefail REPO="$HOME/star-party-planner" cd "$REPO" python starparty_planner.py \ --lat 44.810265 --lon -93.939783 --elev 296 \ --tz America/Chicago \ --catalog messier_caldwell.csv --min_alt 20 --moon_sep_min 20 --max_mag 9 \ --type_weights type_weights.csv \ --top_n_per_hour 16 --out_prefix starparty \ --html /var/www/star-party/index.html \ --bsp ./skyfield_data/de440s.bsp \ --html_ui tabs \ --min_alt_planets 5 --min_alt_moon 0 \ --preview_cache_dir /var/www/star-party/images \ --preview_px 800 \ --now_padding_min 30 \
Make it executable:
chmod +x ~/bin/run_starparty.sh -
Add a cron entry to run daily at 07:00:
crontab -e
Add this line:
0 7 * * * /home/youruser/bin/run_starparty.sh >> /home/youruser/starparty_cron.log 2>&1If you omit
--date,--start, and--end, the script picks today, rounds sunset for the start, and uses the sunrise hour as the end. -
Visit
http(s)://your-server/star-party/to see the latest plan.
- Missing previews: Reârun with
--refresh_previews. Ensure--preview_cache_diris writable by the user running the planner. - No BSP found: Point
--bspto./skyfield_data/de440s.bsp(or your chosen kernel) and verify the file exists. - Tables seem empty: Relax filters (
--min_alt,--moon_sep_min,--max_mag) or expand the time window. - Wrong times: Confirm your
--tzand system clock. The planner expects an IANA timezone. - Permissions: Make sure the web server user can read the generated HTML and the preview cache directory.
- Written in Python, using Skyfield for accurate ephemerides
- All heavy astronomy data (BSP) is local; the planner does not autoâfetch ephemerides
- UI is plain HTML/CSS/JS, tinted for night vision
- Easy to extend:
- Adjust scoring in
interest_score() - Add/modify catalogs
- Tweak the UI (tabs vs accordion)
- Adjust scoring in
MIT License
⨠Clear skies!