Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
95d13c5
Merged main with the location changes
mrosseel Mar 17, 2025
c872394
no ubx yet
mrosseel Mar 19, 2025
51f14f4
Merge branch 'main' of github.com:brickbots/PiFinder
mrosseel Mar 25, 2025
0ec4de8
Revert "no ubx yet"
mrosseel Mar 25, 2025
bbcad5c
Merge remote-tracking branch 'origin/main'
mrosseel Mar 27, 2025
fd44825
ZMerge branch 'main' of github.com:mrosseel/PiFinder
mrosseel Apr 5, 2025
64f8401
Merge remote-tracking branch 'origin/main'
mrosseel Apr 6, 2025
b46636f
Merge remote-tracking branch 'origin/main'
mrosseel Apr 6, 2025
77f79bd
Merge remote-tracking branch 'origin/main'
mrosseel Apr 6, 2025
30fa0dc
Merge branch 'main' of github.com:brickbots/PiFinder
mrosseel Jun 17, 2025
0a71bb5
Merge remote-tracking branch 'upstream'
mrosseel Jul 10, 2025
f4738fe
Merge remote-tracking branch 'upstream/main'
mrosseel Jul 28, 2025
9c508bc
Merge remote-tracking branch 'upstream/main'
mrosseel Sep 22, 2025
8da0875
Merge remote-tracking branch 'upstream/main'
mrosseel Nov 10, 2025
7f818bc
Merge branch 'main' of github.com:brickbots/PiFinder
mrosseel Nov 15, 2025
ee454f5
Merge remote-tracking branch 'upstream/main'
mrosseel Nov 16, 2025
b8d65d4
First version of the working deep chart feature
mrosseel Nov 21, 2025
f660fe5
Add healpy requirement
mrosseel Nov 21, 2025
8ed0c61
optimisations
mrosseel Nov 21, 2025
201b765
vectorize single
mrosseel Nov 21, 2025
05668bc
Performance and logging
mrosseel Nov 21, 2025
0d86a0f
LM entry and chart fixes
mrosseel Nov 22, 2025
7fbf991
Revert solver.py formatting changes that introduced UnboundLocalError
mrosseel Nov 22, 2025
48248ce
More logging
mrosseel Nov 22, 2025
75db432
fix logging issue
mrosseel Nov 22, 2025
e81320f
some yield issues
mrosseel Nov 22, 2025
3c2116f
More logging
mrosseel Nov 22, 2025
d4c7115
Fix images not yielding
mrosseel Nov 22, 2025
8c1099b
fix images not showing
mrosseel Nov 22, 2025
d678797
flag fix
mrosseel Nov 22, 2025
b1863d0
throwing things against the wall
mrosseel Nov 22, 2025
90e68ce
Speed up indexes
mrosseel Nov 22, 2025
bcddba6
lifted tile limit
mrosseel Nov 22, 2025
ea11bc9
Added bloom filters to speed up charts
mrosseel Nov 23, 2025
fa2560b
Compressed indexes and disabling bloom
mrosseel Nov 24, 2025
adec3f8
fixed healpix boundaries bug
mrosseel Nov 25, 2025
db71507
Working, pre-refactor commit
mrosseel Nov 26, 2025
3f51295
Refactoring
mrosseel Nov 27, 2025
3854d60
Refactored, using gaia consistently
mrosseel Dec 2, 2025
4c1c621
Merge remote-tracking branch 'upstream/main' into deepchart
mrosseel Dec 26, 2025
2add5f2
fix rotation
mrosseel Dec 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions default_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
"chart_dso": 128,
"chart_reticle": 128,
"chart_constellations": 64,
"obj_chart_crosshair": "pulse",
"obj_chart_crosshair_style": "simple",
"obj_chart_crosshair_speed": "2.0",
"obj_chart_lm_mode": "auto",
"obj_chart_lm_fixed": 14.0,
"solve_pixel": [256, 256],
"gps_type": "ublox",
"gps_baud_rate": 9600,
Expand Down
5 changes: 3 additions & 2 deletions python/PiFinder/audit_images.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/python
from PiFinder.object_images.poss_provider import POSSImageProvider
# -*- coding:utf-8 -*-
# mypy: ignore-errors
"""
Expand All @@ -10,7 +11,7 @@
import sqlite3
from tqdm import tqdm

from PiFinder import cat_images
from PiFinder.object_images import get_display_image


def get_catalog_objects():
Expand Down Expand Up @@ -59,7 +60,7 @@ def check_object_image(catalog_object):
if aka_sequence:
catalog_object = {"catalog": "NGC", "sequence": aka_sequence}

object_image_path = cat_images.resolve_image_name(catalog_object, "POSS")
object_image_path = POSSImageProvider()._resolve_image_name(catalog_object, "POSS")
# POSS
image_name = object_image_path.split("/")[-1]
seq_ones = image_name.split("_")[0][-1]
Expand Down
16 changes: 9 additions & 7 deletions python/PiFinder/camera_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def setup_debug_images(self) -> None:
self.images = list(zip(range(1, len(images) + 1), images))
self.image_cycle = cycle(self.images)
self.last_image_time: float = time.time()
self.current_image_num, self.last_image = self.images[0]
self.current_image_num, self.last_image = self.images[1] # Use darker sky image

def initialize(self) -> None:
self._camera_started = True
Expand All @@ -63,13 +63,15 @@ def stop_camera(self) -> None:
def capture(self) -> Image.Image:
sleep_time = self.exposure_time / 1000000
time.sleep(sleep_time)
# FOR TESTING: Keep using the same image (first image - solves, brighter sky)
# Comment out image cycling to maintain consistent roll/orientation
# Change images every 10 seconds
elapsed = time.time() - self.last_image_time
if elapsed > 10:
self.current_image_num, self.last_image = next(self.image_cycle)
logger.debug(
f"Debug camera switched to test image #{self.current_image_num}"
)
# elapsed = time.time() - self.last_image_time
# if elapsed > 10:
# self.current_image_num, self.last_image = next(self.image_cycle)
# logger.debug(
# f"Debug camera switched to test image #{self.current_image_num}"
# )
return self.last_image

def capture_bias(self):
Expand Down
210 changes: 0 additions & 210 deletions python/PiFinder/cat_images.py

This file was deleted.

2 changes: 1 addition & 1 deletion python/PiFinder/catalog_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def assign_virtual_object_ids(catalog, low_id: int) -> int:
class TimerMixin:
"""Provides timer functionality via composition"""

def __init__(self):
def __init__(self) -> None:
self.timer: Optional[threading.Timer] = None
self.is_running: bool = False
self.time_delay_seconds: Union[int, Callable[[], int]] = (
Expand Down
15 changes: 12 additions & 3 deletions python/PiFinder/catalogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,8 +912,18 @@ def _build_composite(

# Start background loader for deferred objects
if deferred_objects:
# Sort deferred objects: load WDS last (it has 131K objects)
# This ensures smaller catalogs (C, Col, etc.) are available sooner
def sort_key(obj):
if obj["catalog_code"] == "WDS":
return 1 # Load last
else:
return 0 # Load first

deferred_objects_sorted = sorted(deferred_objects, key=sort_key)

loader = CatalogBackgroundLoader(
deferred_catalog_objects=deferred_objects,
deferred_catalog_objects=deferred_objects_sorted,
objects=objects,
common_names=common_names,
obs_db=obs_db,
Expand All @@ -929,8 +939,7 @@ def _build_composite(

def _on_loader_progress(self, loaded: int, total: int, catalog: str) -> None:
"""Progress callback - log every 10K objects"""
if loaded % 10000 == 0 or loaded == total:
logger.info(f"Background loading: {loaded}/{total} ({catalog})")
pass # Muted to reduce log noise

def _on_loader_complete(
self, loaded_objects: List[CompositeObject], ui_queue
Expand Down
16 changes: 16 additions & 0 deletions python/PiFinder/displays.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ class DisplayPygame_128(DisplayBase):

def __init__(self):
from luma.emulator.device import pygame
import pygame as pg
from pathlib import Path

# Set window icon to welcome splash screen before creating display
icon_path = Path(__file__).parent.parent.parent / "images" / "welcome.png"
if icon_path.exists():
icon = pg.image.load(str(icon_path))
pg.display.set_icon(icon)

# init display (SPI hardware)
pygame = pygame(
Expand All @@ -90,6 +98,14 @@ class DisplayPygame_320(DisplayBase):

def __init__(self):
from luma.emulator.device import pygame
import pygame as pg
from pathlib import Path

# Set window icon to welcome splash screen before creating display
icon_path = Path(__file__).parent.parent.parent / "images" / "welcome.png"
if icon_path.exists():
icon = pg.image.load(str(icon_path))
pg.display.set_icon(icon)

# init display (SPI hardware)
pygame = pygame(
Expand Down
12 changes: 7 additions & 5 deletions python/PiFinder/get_images.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from PiFinder.object_images.poss_provider import BASE_IMAGE_PATH
from PiFinder.object_images.poss_provider import create_catalog_image_dirs
#!/usr/bin/python
# -*- coding:utf-8 -*-
"""
Expand All @@ -11,7 +13,7 @@
from concurrent.futures import ThreadPoolExecutor, as_completed
from typing import List, Tuple

from PiFinder import cat_images
from PiFinder.object_images import get_display_image
from PiFinder.db.objects_db import ObjectsDatabase


Expand All @@ -35,7 +37,7 @@ def check_missing_images() -> List[str]:
for image_name in tqdm(image_names, desc="Checking existing images"):
# Check if POSS image exists (primary check)
poss_path = (
f"{cat_images.BASE_IMAGE_PATH}/{image_name[-1]}/{image_name}_POSS.jpg"
f"{BASE_IMAGE_PATH}/{image_name[-1]}/{image_name}_POSS.jpg"
)
if not os.path.exists(poss_path):
missing_images.append(image_name)
Expand Down Expand Up @@ -79,7 +81,7 @@ def fetch_images_for_object(

# Download POSS image
poss_filename = f"{image_name}_POSS.jpg"
poss_path = f"{cat_images.BASE_IMAGE_PATH}/{seq_ones}/{poss_filename}"
poss_path = f"{BASE_IMAGE_PATH}/{seq_ones}/{poss_filename}"
poss_url = f"https://ddbeeedxfpnp0.cloudfront.net/catalog_images/{seq_ones}/{poss_filename}"

poss_success, poss_error = download_image_from_url(session, poss_url, poss_path)
Expand All @@ -88,7 +90,7 @@ def fetch_images_for_object(

# Download SDSS image
sdss_filename = f"{image_name}_SDSS.jpg"
sdss_path = f"{cat_images.BASE_IMAGE_PATH}/{seq_ones}/{sdss_filename}"
sdss_path = f"{BASE_IMAGE_PATH}/{seq_ones}/{sdss_filename}"
sdss_url = f"https://ddbeeedxfpnp0.cloudfront.net/catalog_images/{seq_ones}/{sdss_filename}"

sdss_success, sdss_error = download_image_from_url(session, sdss_url, sdss_path)
Expand Down Expand Up @@ -154,7 +156,7 @@ def main():
"""
Main function to check for and download missing catalog images.
"""
cat_images.create_catalog_image_dirs()
create_catalog_image_dirs()

print("Checking for missing images...")
missing_images = check_missing_images()
Expand Down
Loading
Loading