Collection of tools used for fitting sHG1G2 and SOCCA photometric models to sparse asteroid photometry
Project description
asteroid-spinprops
Overview
asteroid-spinprops is a Python package providing tools to fit SHG1G2 and SOCCA photometric models to sparse asteroid photometry.
It supports multiband modeling, residual analysis and shape, period and pole orientation estimation for small solar system objects.
Installation
Install the package via pip:
pip install asteroid_spinprops
Quick Start
import numpy as np
import pandas as pd
from asteroid_spinprops.ssolib import dataprep, periodest, modelfit
# Suppose `pdf` is your initial asteroid DataFrame
# Ensure all columns are converted to the required single row format.
pdf_s = pd.DataFrame({col: [np.array(pdf[col])] for col in pdf.columns})
# Convert filter IDs to numeric
unique_vals, inv = np.unique(pdf_s["cfid"].values[0], return_inverse=True)
numeric_filter = inv + 1
pdf_s["cfid"].values[0] = numeric_filter
# --- Data cleaning and filtering ---
clean_data, errorbar_rejects = dataprep.errorbar_filtering(data=pdf_s, mlimit=0.7928)
clean_data, projection_rejects = dataprep.projection_filtering(data=clean_data)
clean_data, iterative_rejects = dataprep.iterative_filtering(data=clean_data)
# --- Fit SHG1G2 model ---
shg1g2_params = modelfit.get_fit_params(
data=clean_data,
flavor="SHG1G2",
)
# Compute residuals for period analysis
residuals_dataframe = modelfit.make_residuals_df(
clean_data, model_parameters=shg1g2_params
)
# --- Estimate rotation period ---
p_in, k_val, p_rms, signal_peak, window_peak = periodest.get_multiband_period_estimate(
residuals_dataframe,
k_free=True,
)
# Assess period robustness via bootstrap resampling
_, Nbs = periodest.perform_residual_resampling(
resid_df=residuals_dataframe,
p_min=0.03,
p_max=2,
k=int(k_val)
)
# --- Fit SSHG1G2 (spin + multiband) model ---
SOCCA_params = modelfit.get_fit_params(
data=clean_data,
flavor="SSHG1G2",
shg1g2_constrained=True,
blind_scan=True,
period_in=p_in,
)
Models
Photometric models from Carry et al.(2024) {2024A&A...687A..38C} and https://github.com/astrolabsoftware
Project status
Under development
Project details
Release history Release notifications | RSS feed
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 asteroid_spinprops-1.0.0.tar.gz.
File metadata
- Download URL: asteroid_spinprops-1.0.0.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.13.5 Linux/6.14.0-33-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98cd115a01f8730b25f5b01216ba19aec7870e28196e82547fbcda8a8a1340b3
|
|
| MD5 |
ac441b2eaf25fff2a41996a3f655e62b
|
|
| BLAKE2b-256 |
8554063470447ecd5a3a7f41dbdf4f10e68346d02d40e37d8c47d6b94c5ba4c5
|
File details
Details for the file asteroid_spinprops-1.0.0-py3-none-any.whl.
File metadata
- Download URL: asteroid_spinprops-1.0.0-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.13.5 Linux/6.14.0-33-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ac3d722b041d3567543d083a22d5c6ebdadb00510975c92e2311da6be4ecd28
|
|
| MD5 |
963ee79bbbeba56f5c519e249878cfc9
|
|
| BLAKE2b-256 |
c71863e7a164ab83ef22092f5c36a239ef584aa905ba575987b6ac33b39192d6
|