asteroid_spinprops 1.3.0__tar.gz → 1.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {asteroid_spinprops-1.3.0 → asteroid_spinprops-1.3.2}/PKG-INFO +2 -2
- {asteroid_spinprops-1.3.0 → asteroid_spinprops-1.3.2}/asteroid_spinprops/ssolib/modelfit.py +6 -6
- {asteroid_spinprops-1.3.0 → asteroid_spinprops-1.3.2}/asteroid_spinprops/ssolib/periodest.py +17 -9
- {asteroid_spinprops-1.3.0 → asteroid_spinprops-1.3.2}/pyproject.toml +2 -2
- {asteroid_spinprops-1.3.0 → asteroid_spinprops-1.3.2}/README.md +0 -0
- {asteroid_spinprops-1.3.0 → asteroid_spinprops-1.3.2}/asteroid_spinprops/__init__.py +0 -0
- {asteroid_spinprops-1.3.0 → asteroid_spinprops-1.3.2}/asteroid_spinprops/ssolib/__init__.py +0 -0
- {asteroid_spinprops-1.3.0 → asteroid_spinprops-1.3.2}/asteroid_spinprops/ssolib/dataprep.py +0 -0
- {asteroid_spinprops-1.3.0 → asteroid_spinprops-1.3.2}/asteroid_spinprops/ssolib/ssptools.py +0 -0
- {asteroid_spinprops-1.3.0 → asteroid_spinprops-1.3.2}/asteroid_spinprops/ssolib/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: asteroid_spinprops
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.2
|
|
4
4
|
Summary: Collection of tools used for fitting sHG1G2 and SOCCA photometric models to sparse asteroid photometry
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Odysseas
|
|
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.13
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.14
|
|
17
17
|
Requires-Dist: astropy (>=6.0)
|
|
18
|
-
Requires-Dist: fink-utils (>=0.
|
|
18
|
+
Requires-Dist: fink-utils (>=0.48.0)
|
|
19
19
|
Requires-Dist: nifty-ls (>=1.1.0)
|
|
20
20
|
Requires-Dist: pandas (>=2.3)
|
|
21
21
|
Requires-Dist: pyarrow (>=18.1)
|
|
@@ -6,7 +6,7 @@ import asteroid_spinprops.ssolib.periodest as periodest
|
|
|
6
6
|
|
|
7
7
|
from fink_utils.sso.spins import (
|
|
8
8
|
estimate_sso_params,
|
|
9
|
-
|
|
9
|
+
func_shg1g2,
|
|
10
10
|
)
|
|
11
11
|
from asteroid_spinprops.ssolib.periodest import (
|
|
12
12
|
get_multiterm_period_estimate,
|
|
@@ -222,7 +222,7 @@ def get_fit_params(
|
|
|
222
222
|
G2 = shg1g2_params[f"G2_{ff}"]
|
|
223
223
|
R = shg1g2_params["R"]
|
|
224
224
|
|
|
225
|
-
C =
|
|
225
|
+
C = func_shg1g2(
|
|
226
226
|
pha, H, G1, G2, R, np.radians(ra0), np.radians(dec0)
|
|
227
227
|
)
|
|
228
228
|
|
|
@@ -401,7 +401,7 @@ def get_fit_params(
|
|
|
401
401
|
ra=np.radians(data["ra"].values[0]),
|
|
402
402
|
dec=np.radians(data["dec"].values[0]),
|
|
403
403
|
jd=data["cjd"].values[0],
|
|
404
|
-
model="
|
|
404
|
+
model="SOCCA",
|
|
405
405
|
p0=p0,
|
|
406
406
|
)
|
|
407
407
|
return Afit
|
|
@@ -419,7 +419,7 @@ def get_fit_params(
|
|
|
419
419
|
ra=np.radians(data["ra"].values[0]),
|
|
420
420
|
dec=np.radians(data["dec"].values[0]),
|
|
421
421
|
jd=data["cjd"].values[0],
|
|
422
|
-
model="
|
|
422
|
+
model="SOCCA",
|
|
423
423
|
p0=p0,
|
|
424
424
|
terminator=terminator,
|
|
425
425
|
ra_s=np.radians(data["ra_s"].values[0]),
|
|
@@ -434,7 +434,7 @@ def get_fit_params(
|
|
|
434
434
|
ra=np.radians(data["ra"].values[0]),
|
|
435
435
|
dec=np.radians(data["dec"].values[0]),
|
|
436
436
|
jd=data["cjd"].values[0],
|
|
437
|
-
model="
|
|
437
|
+
model="SOCCA",
|
|
438
438
|
p0=p0,
|
|
439
439
|
terminator=terminator,
|
|
440
440
|
)
|
|
@@ -489,7 +489,7 @@ def get_model_points(data, params):
|
|
|
489
489
|
np.radians(params["delta0"]),
|
|
490
490
|
]
|
|
491
491
|
|
|
492
|
-
model_points =
|
|
492
|
+
model_points = func_shg1g2(
|
|
493
493
|
[
|
|
494
494
|
np.radians(data["Phase"].values[0][filter_mask]),
|
|
495
495
|
np.radians(data["ra"].values[0][filter_mask]),
|
{asteroid_spinprops-1.3.0 → asteroid_spinprops-1.3.2}/asteroid_spinprops/ssolib/periodest.py
RENAMED
|
@@ -6,6 +6,8 @@ from scipy.signal import find_peaks
|
|
|
6
6
|
import nifty_ls # noqa: F401
|
|
7
7
|
from scipy.stats import f as ftest
|
|
8
8
|
|
|
9
|
+
import logging
|
|
10
|
+
|
|
9
11
|
|
|
10
12
|
def alias_func(x, i, j, p_feat):
|
|
11
13
|
"""
|
|
@@ -187,13 +189,17 @@ def get_multiterm_period_estimate(
|
|
|
187
189
|
nterms_base=k,
|
|
188
190
|
nterms_band=1,
|
|
189
191
|
)
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
192
|
+
try:
|
|
193
|
+
frequency, power = model.autopower(
|
|
194
|
+
method="fast",
|
|
195
|
+
sb_method="fastnifty_chi2",
|
|
196
|
+
minimum_frequency=1 / period_range[1],
|
|
197
|
+
maximum_frequency=1 / period_range[0],
|
|
198
|
+
samples_per_peak=5,
|
|
199
|
+
)
|
|
200
|
+
except np.linalg.LinAlgError:
|
|
201
|
+
logging.warning("Singular matrix for k={}".format(k))
|
|
202
|
+
continue
|
|
197
203
|
|
|
198
204
|
f_best = frequency[np.argmax(power)]
|
|
199
205
|
y_model = model.model(
|
|
@@ -368,15 +374,17 @@ def perform_residual_resampling(resid_df, p_min, p_max, k=1):
|
|
|
368
374
|
cond = np.abs(Pog - Pbs) / Pog < 1e-2
|
|
369
375
|
Nbs = np.sum(np.ones(25)[cond])
|
|
370
376
|
if k > 1:
|
|
371
|
-
|
|
377
|
+
Ptmp, _, _, _, _ = get_multiterm_period_estimate(
|
|
372
378
|
resid_df, p_min=p_min, p_max=p_max, k_free=False, k_val=k
|
|
373
379
|
)
|
|
380
|
+
Pog = 24 / Ptmp
|
|
374
381
|
Pbs = np.zeros(25)
|
|
375
382
|
for n in range(25):
|
|
376
383
|
BS_df = resid_df.sample(n=len(resid_df), replace=True)
|
|
377
|
-
|
|
384
|
+
Ptmp, _, _, _, _ = get_multiterm_period_estimate(
|
|
378
385
|
BS_df, p_min=p_min, p_max=p_max, k_free=False, k_val=k
|
|
379
386
|
)
|
|
387
|
+
Pbs[n] = 24 / Ptmp
|
|
380
388
|
cond = np.abs(Pog - Pbs) / Pog < 1e-2
|
|
381
389
|
Nbs = np.sum(np.ones(25)[cond])
|
|
382
390
|
return BS_df, Nbs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "asteroid_spinprops"
|
|
3
|
-
version = "1.3.
|
|
3
|
+
version = "1.3.2"
|
|
4
4
|
description = "Collection of tools used for fitting sHG1G2 and SOCCA photometric models to sparse asteroid photometry"
|
|
5
5
|
authors = [
|
|
6
6
|
{name = "Odysseas",email = "odysseas.xenos@proton.me"}
|
|
@@ -11,7 +11,7 @@ requires-python = ">=3.9"
|
|
|
11
11
|
|
|
12
12
|
dependencies = [
|
|
13
13
|
"astropy >=6.0",
|
|
14
|
-
"fink-utils >=0.
|
|
14
|
+
"fink-utils >=0.48.0",
|
|
15
15
|
"nifty-ls >=1.1.0",
|
|
16
16
|
"pandas >=2.3",
|
|
17
17
|
"scipy >=1.10",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|