Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

starfinder

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

starfinder

Generate images of the sky w/ accurate stars for star sensor simulation

  • 1.1.0
  • PyPI
  • Socket score

Maintainers
1

starfinder

starfinder is a Rust & Python package that provides functionality to read, process, and render star data from the Tycho-2 catalog. It's built with Rust for performance and exposes a Python API for ease of use.

Setup

  1. Download the Tycho-2 catalog:

    • Visit https://archive.eso.org/ASTROM/TYC-2/data/
    • Download catalog.dat and place it in data/tycho2/
  2. Ensure your project structure looks like this:

.
├── Cargo.lock
├── Cargo.toml
├── README.md
├── data
│   └── tycho2
│       ├── catalog.dat
│       ├── index.dat
│       ├── suppl_1.dat
│       └── suppl_2.dat
├── poetry.lock
├── pyproject.toml
└── src

Running the Renderer

Using Cargo (Rust)

To run the renderer with default settings:

cargo run

To run with custom arguments:

cargo run -- --roll 0.0 --fov-w 75.0 --fov-h 50.0

Command-line Arguments

FlagDescriptionDefaultNotes
--source, -sSource file pathdata/tycho2/catalog.dat
--center-raFOV center point right ascension180.0In degrees
--center-decFOV center point declination0.0In degrees
--fov-wWidth of FOV60.0In degrees
--fov-hHeight of FOV45.0In degrees
--rollCamera sensor roll0.0In degrees
--max-magnitudeMaximum visual magnitude12.0Lower is brighter
--lambda-nmTargeted wavelength540.0In nanometers
--pixel-size-mSimulated sensor pixel size3e-6In meters
--widthOutput image width800In pixels
--heightOutput image height600In pixels
--output, -oOutput filenamestar_map.png

Python Installation and Usage

Installation

Ensure you have Python 3.8 or later, then:

bash pip install starfinder

Or if you want to install the package in development mode:

```bash
pipx install maturin
maturin develop

Basic Usage

from starfinder import StarCatalogArgs, process_star_catalog_py

args = StarCatalogArgs(
    source="data/tycho2/catalog.dat",
    center_ra=180.0,
    center_dec=0.0,
    fov_w=60.0,
    fov_h=45.0,
    roll=0.0,
    max_magnitude=6.0,
    lambda_nm=540.0,
    pixel_size_m=3e-6,
    width=800,
    height=600,
    output="star_map.png"
)

process_star_catalog_py(args)

API Reference

StarCatalogArgs

Parameters:

  • source (str): Path to the Tycho-2 catalog file
  • center_ra (float): Right Ascension of FOV center (degrees)
  • center_dec (float): Declination of FOV center (degrees)
  • fov_w (float): FOV width (degrees)
  • fov_h (float): FOV height (degrees)
  • roll (float): Camera roll (degrees)
  • max_magnitude (float): Maximum visual magnitude
  • lambda_nm (float): Targeted wavelength (nanometers)
  • pixel_size_m (float): Sensor pixel size (meters)
  • width (int): Output image width (pixels)
  • height (int): Output image height (pixels)
  • output (str): Output image filename

process_star_catalog_py(args: StarCatalogArgs) -> None

Processes the star catalog based on the provided arguments.

Contributing

Contributions to starfinder are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the GPLv3 License - see the LICENSE file for details.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc