asteroid_spinprops 1.3.5__tar.gz → 1.3.7__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.5 → asteroid_spinprops-1.3.7}/PKG-INFO +1 -1
- {asteroid_spinprops-1.3.5 → asteroid_spinprops-1.3.7}/asteroid_spinprops/ssolib/modelfit.py +3 -7
- {asteroid_spinprops-1.3.5 → asteroid_spinprops-1.3.7}/asteroid_spinprops/ssolib/periodest.py +10 -6
- {asteroid_spinprops-1.3.5 → asteroid_spinprops-1.3.7}/pyproject.toml +1 -1
- {asteroid_spinprops-1.3.5 → asteroid_spinprops-1.3.7}/README.md +0 -0
- {asteroid_spinprops-1.3.5 → asteroid_spinprops-1.3.7}/asteroid_spinprops/__init__.py +0 -0
- {asteroid_spinprops-1.3.5 → asteroid_spinprops-1.3.7}/asteroid_spinprops/ssolib/__init__.py +0 -0
- {asteroid_spinprops-1.3.5 → asteroid_spinprops-1.3.7}/asteroid_spinprops/ssolib/dataprep.py +0 -0
- {asteroid_spinprops-1.3.5 → asteroid_spinprops-1.3.7}/asteroid_spinprops/ssolib/ssptools.py +0 -0
- {asteroid_spinprops-1.3.5 → asteroid_spinprops-1.3.7}/asteroid_spinprops/ssolib/utils.py +0 -0
|
@@ -173,7 +173,7 @@ def get_fit_params(
|
|
|
173
173
|
etime = t2 - t1
|
|
174
174
|
SOCCA_opt["invtime"] = etime
|
|
175
175
|
return SOCCA_opt
|
|
176
|
-
except
|
|
176
|
+
except Exception:
|
|
177
177
|
SOCCA_opt = {"Failed at bootsrap sampling": 1}
|
|
178
178
|
if time_me:
|
|
179
179
|
t2 = time.time()
|
|
@@ -245,7 +245,7 @@ def get_fit_params(
|
|
|
245
245
|
|
|
246
246
|
ra_init = ra_minima
|
|
247
247
|
dec_init = dec_minima
|
|
248
|
-
|
|
248
|
+
|
|
249
249
|
# Add near-pole initialization points
|
|
250
250
|
ra_init = np.append(ra_init, 220)
|
|
251
251
|
ra_init = np.append(ra_init, 140)
|
|
@@ -264,7 +264,7 @@ def get_fit_params(
|
|
|
264
264
|
H_key = next(
|
|
265
265
|
(
|
|
266
266
|
f"H_{i}" for i in range(1, 7) if f"H_{i}" in shg1g2_params
|
|
267
|
-
), # Harcoded
|
|
267
|
+
), # FIXME: Harcoded N of bands, won't throw error if N>6, but to be recosnidered
|
|
268
268
|
None,
|
|
269
269
|
)
|
|
270
270
|
|
|
@@ -332,10 +332,6 @@ def get_fit_params(
|
|
|
332
332
|
SOCCA_opt["prms"] = p_rms
|
|
333
333
|
SOCCA_opt["k_terms"] = k_val
|
|
334
334
|
except Exception:
|
|
335
|
-
if time_me:
|
|
336
|
-
t2 = time.time()
|
|
337
|
-
etime = t2 - t1
|
|
338
|
-
SOCCA_opt["invtime"] = etime
|
|
339
335
|
SOCCA_opt = {"Failed at SOCCA inversion": 1}
|
|
340
336
|
if time_me:
|
|
341
337
|
t2 = time.time()
|
{asteroid_spinprops-1.3.5 → asteroid_spinprops-1.3.7}/asteroid_spinprops/ssolib/periodest.py
RENAMED
|
@@ -257,7 +257,7 @@ def get_multiterm_period_estimate(
|
|
|
257
257
|
residuals_dataframe["sigma"].values,
|
|
258
258
|
normalization="standard",
|
|
259
259
|
fit_mean=True,
|
|
260
|
-
nterms_base=k_val,
|
|
260
|
+
nterms_base=int(k_val),
|
|
261
261
|
nterms_band=1,
|
|
262
262
|
)
|
|
263
263
|
frequency, power = model.autopower(
|
|
@@ -380,11 +380,15 @@ def perform_residual_resampling(resid_df, p_min, p_max, k=1):
|
|
|
380
380
|
Pog = 24 / Ptmp
|
|
381
381
|
Pbs = np.zeros(25)
|
|
382
382
|
for n in range(25):
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
383
|
+
try:
|
|
384
|
+
BS_df = resid_df.sample(n=len(resid_df), replace=True)
|
|
385
|
+
Ptmp, _, _, _, _ = get_multiterm_period_estimate(
|
|
386
|
+
BS_df, p_min=p_min, p_max=p_max, k_free=False, k_val=k
|
|
387
|
+
)
|
|
388
|
+
Pbs[n] = 24 / Ptmp
|
|
389
|
+
except Exception:
|
|
390
|
+
Ptmp = 2 * Pog
|
|
391
|
+
Pbs[n] = 24 / Ptmp
|
|
388
392
|
cond = np.abs(Pog - Pbs) / Pog < 1e-2
|
|
389
393
|
Nbs = np.sum(np.ones(25)[cond])
|
|
390
394
|
return BS_df, Nbs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "asteroid_spinprops"
|
|
3
|
-
version = "1.3.
|
|
3
|
+
version = "1.3.7"
|
|
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"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|