asteroid_spinprops 0.2.22__tar.gz → 0.2.24__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-0.2.22 → asteroid_spinprops-0.2.24}/PKG-INFO +1 -1
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/periodest.py +13 -6
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/pyproject.toml +1 -1
- asteroid_spinprops-0.2.22/asteroid_spinprops/ssolib/.ruff_cache/.gitignore +0 -2
- asteroid_spinprops-0.2.22/asteroid_spinprops/ssolib/.ruff_cache/0.13.2/1980339045096230685 +0 -0
- asteroid_spinprops-0.2.22/asteroid_spinprops/ssolib/.ruff_cache/CACHEDIR.TAG +0 -1
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/README.md +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/__init__.py +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/__init__.py +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/dataprep.py +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/modelfit.py +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/pipetools.py +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/ssptools.py +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/testing/atlas_x_ztf_testing/test_pqfile_1.parquet +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/testing/atlas_x_ztf_testing/test_pqfile_2.parquet +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/testing/ephemeris_testing/2000 WL152 +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/testing/ephemeris_testing/2001 PC +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/testing/ephemeris_testing/2001 SG276 +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/testing/ephemeris_testing/2008 GX32 +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/testing/ephemeris_testing/2009 BE185 +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/testing/ephemeris_testing/2011 EY17 +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/testing/ephemeris_testing/2134 T-1 +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/testing/ephemeris_testing/Bellmore +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/testing/ephemeris_testing/Dermott +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/testing/ephemeris_testing/Duke +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/testing/ephemeris_testing/Izenberg +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/testing/ephemeris_testing/Lermontov +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/testing/ephemeris_testing/Poullain +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/testing/ephemeris_testing/Sonneberga +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/testing/testing_ssoname_keys.pkl +0 -0
- {asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/utils.py +0 -0
{asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/periodest.py
RENAMED
|
@@ -7,6 +7,7 @@ import matplotlib.pyplot as plt
|
|
|
7
7
|
from astropy.timeseries import LombScargleMultiband, LombScargle
|
|
8
8
|
from scipy.signal import find_peaks
|
|
9
9
|
import nifty_ls # noqa: F401
|
|
10
|
+
from scipy.stats import f as ftest
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
def alias_func(x, i, j, p_feat):
|
|
@@ -121,8 +122,8 @@ def get_multiband_period_estimate(
|
|
|
121
122
|
|
|
122
123
|
# y_model.shape is (n_bands, len(time))
|
|
123
124
|
|
|
124
|
-
for n,
|
|
125
|
-
bindex = np.where(residuals_dataframe["filters"].values ==
|
|
125
|
+
for n, ff in enumerate(bands):
|
|
126
|
+
bindex = np.where(residuals_dataframe["filters"].values == ff)
|
|
126
127
|
residuals[bindex] = (
|
|
127
128
|
residuals_dataframe["residuals"].values[bindex] - y_model[n][bindex]
|
|
128
129
|
)
|
|
@@ -141,7 +142,7 @@ def get_multiband_period_estimate(
|
|
|
141
142
|
F = ((rss - rss_next) / (dof - dof_next)) / (rss_next / dof_next)
|
|
142
143
|
|
|
143
144
|
# Here crit = Fstat value for which model_2 (more complex) is in fact better than model_1 (less complex)
|
|
144
|
-
crit =
|
|
145
|
+
crit = ftest.ppf(
|
|
145
146
|
q=0.99,
|
|
146
147
|
dfn=n_params_next - n_params,
|
|
147
148
|
dfd=len(residuals) - n_params_next,
|
|
@@ -152,6 +153,7 @@ def get_multiband_period_estimate(
|
|
|
152
153
|
model_comparison.loc[i, "f_best"] = f_best
|
|
153
154
|
model_comparison.loc[i, "Fstat"] = F
|
|
154
155
|
model_comparison.loc[i, "alpha_crit"] = crit
|
|
156
|
+
model_comparison.loc[i, "rms"] = rms
|
|
155
157
|
|
|
156
158
|
cond = model_comparison["Fstat"] > model_comparison["alpha_crit"]
|
|
157
159
|
model_comparison = model_comparison[
|
|
@@ -163,6 +165,10 @@ def get_multiband_period_estimate(
|
|
|
163
165
|
k_val = model_comparison[model_comparison.k == model_comparison.k.min()].k[
|
|
164
166
|
0
|
|
165
167
|
] # Simplest model
|
|
168
|
+
p_rms = model_comparison[model_comparison.k == model_comparison.k.min()].rms[
|
|
169
|
+
0
|
|
170
|
+
] # Simplest model
|
|
171
|
+
|
|
166
172
|
if not k_free:
|
|
167
173
|
model = LombScargleMultiband(
|
|
168
174
|
residuals_dataframe["jd"].values,
|
|
@@ -184,9 +190,10 @@ def get_multiband_period_estimate(
|
|
|
184
190
|
|
|
185
191
|
f_best = frequency[np.argmax(power)]
|
|
186
192
|
f_chosen = f_best
|
|
193
|
+
p_rms = np.nan
|
|
187
194
|
period_in = 2 * (1 / f_chosen)
|
|
188
195
|
|
|
189
|
-
return period_in, k_val
|
|
196
|
+
return period_in, k_val, p_rms
|
|
190
197
|
|
|
191
198
|
|
|
192
199
|
def plot_periodograms(signal, window, name=None, axis="frequency"):
|
|
@@ -349,13 +356,13 @@ def perform_residual_resampling(resid_df, p_min, p_max, k=1):
|
|
|
349
356
|
cond = np.abs(Pog - Pbs) / Pog < 1e-2
|
|
350
357
|
Nbs = np.sum(np.ones(25)[cond])
|
|
351
358
|
if k > 1:
|
|
352
|
-
Pog = 24 / get_multiband_period_estimate(
|
|
359
|
+
Pog, _, _ = 24 / get_multiband_period_estimate(
|
|
353
360
|
resid_df, p_min=p_min, p_max=p_max, k_free=False, k_val=k
|
|
354
361
|
)
|
|
355
362
|
Pbs = np.zeros(25)
|
|
356
363
|
for n in range(25):
|
|
357
364
|
BS_df = resid_df.sample(n=len(resid_df), replace=True)
|
|
358
|
-
Pbs[n] = 24 / get_multiband_period_estimate(
|
|
365
|
+
Pbs[n], _, _ = 24 / get_multiband_period_estimate(
|
|
359
366
|
BS_df, p_min=p_min, p_max=p_max, k_free=False, k_val=k
|
|
360
367
|
)
|
|
361
368
|
cond = np.abs(Pog - Pbs) / Pog < 1e-2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "asteroid_spinprops"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.24"
|
|
4
4
|
description = "Collection of tools used for fitting sHG1G2 and ssHG1G2 photometric models to sparse asteroid photometry"
|
|
5
5
|
authors = [
|
|
6
6
|
{name = "Odysseas",email = "odysseas.xenos@proton.me"}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Signature: 8a477f597d28d172789f06886806bc55
|
|
File without changes
|
|
File without changes
|
{asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/__init__.py
RENAMED
|
File without changes
|
{asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/dataprep.py
RENAMED
|
File without changes
|
{asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/modelfit.py
RENAMED
|
File without changes
|
{asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/pipetools.py
RENAMED
|
File without changes
|
{asteroid_spinprops-0.2.22 → asteroid_spinprops-0.2.24}/asteroid_spinprops/ssolib/ssptools.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|