asteroid_spinprops 1.3.7__tar.gz → 1.3.8__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.7 → asteroid_spinprops-1.3.8}/PKG-INFO +11 -7
- {asteroid_spinprops-1.3.7 → asteroid_spinprops-1.3.8}/README.md +10 -6
- {asteroid_spinprops-1.3.7 → asteroid_spinprops-1.3.8}/asteroid_spinprops/__init__.py +0 -0
- {asteroid_spinprops-1.3.7 → asteroid_spinprops-1.3.8}/asteroid_spinprops/ssolib/__init__.py +0 -0
- {asteroid_spinprops-1.3.7 → asteroid_spinprops-1.3.8}/asteroid_spinprops/ssolib/modelfit.py +17 -3
- {asteroid_spinprops-1.3.7 → asteroid_spinprops-1.3.8}/asteroid_spinprops/ssolib/ssptools.py +0 -0
- {asteroid_spinprops-1.3.7 → asteroid_spinprops-1.3.8}/asteroid_spinprops/ssolib/utils.py +37 -0
- {asteroid_spinprops-1.3.7 → asteroid_spinprops-1.3.8}/pyproject.toml +1 -1
- {asteroid_spinprops-1.3.7 → asteroid_spinprops-1.3.8}/asteroid_spinprops/ssolib/dataprep.py +0 -0
- {asteroid_spinprops-1.3.7 → asteroid_spinprops-1.3.8}/asteroid_spinprops/ssolib/periodest.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.8
|
|
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
|
|
@@ -57,10 +57,11 @@ The package maps common input columns to Fink-style fields:
|
|
|
57
57
|
| `ra` | Right ascension (deg) |
|
|
58
58
|
| `dec` | Declination (deg) |
|
|
59
59
|
| `Phase` | Solar phase angle (deg) |
|
|
60
|
+
| `Dhelio` | Heliocentric distance (AU) |
|
|
60
61
|
|
|
61
|
-
### Additional columns created during preprocessing
|
|
62
|
+
### Additional columns to be created during preprocessing
|
|
62
63
|
|
|
63
|
-
The preprocessing step
|
|
64
|
+
The preprocessing step requires the following fields:
|
|
64
65
|
|
|
65
66
|
- **`cmred` — Reduced magnitude**
|
|
66
67
|
|
|
@@ -70,11 +71,12 @@ The preprocessing step also adds the following fields:
|
|
|
70
71
|
$$
|
|
71
72
|
\mathrm{cmred} = \mathrm{cmagpsf} - 5\log_{10}\!\left(\frac{r\,\Delta}{\mathrm{AU}^2}\right)
|
|
72
73
|
$$
|
|
74
|
+
|
|
73
75
|
where `Obj_Sun_LTC_km` = \(r\) and `Range_LTC_km` = \(\Delta\).
|
|
74
76
|
|
|
75
77
|
- **`jd_ltc` — Light-time–corrected Julian Date**
|
|
76
78
|
|
|
77
|
-
First
|
|
79
|
+
First convert MJD → JD (`+ 2400000.5`), then apply the correction
|
|
78
80
|
|
|
79
81
|
$$
|
|
80
82
|
JD_\mathrm{ltc} = JD - \frac{\Delta}{c},
|
|
@@ -150,7 +152,8 @@ SOCCA_params = modelfit.get_fit_params(
|
|
|
150
152
|
pole_blind=False,
|
|
151
153
|
period_blind=True,
|
|
152
154
|
period_in=None,
|
|
153
|
-
period_quality_flag=True
|
|
155
|
+
period_quality_flag=True,
|
|
156
|
+
terminator=True
|
|
154
157
|
)
|
|
155
158
|
|
|
156
159
|
|
|
@@ -167,7 +170,7 @@ residuals_dataframe = modelfit.make_residuals_df(
|
|
|
167
170
|
)
|
|
168
171
|
|
|
169
172
|
# --- Estimate rotation period ---
|
|
170
|
-
p_in, k_val, p_rms, signal_peak, window_peak = periodest.
|
|
173
|
+
p_in, k_val, p_rms, signal_peak, window_peak = periodest.get_multiterm_period_estimate(
|
|
171
174
|
residuals_dataframe,
|
|
172
175
|
k_free=True,
|
|
173
176
|
)
|
|
@@ -188,7 +191,8 @@ SOCCA_params = modelfit.get_fit_params(
|
|
|
188
191
|
period_blind=False,
|
|
189
192
|
pole_blind=False,
|
|
190
193
|
period_in=p_in,
|
|
191
|
-
period_quality_flag=False
|
|
194
|
+
period_quality_flag=False,
|
|
195
|
+
terminator=True
|
|
192
196
|
)
|
|
193
197
|
```
|
|
194
198
|
|
|
@@ -29,10 +29,11 @@ The package maps common input columns to Fink-style fields:
|
|
|
29
29
|
| `ra` | Right ascension (deg) |
|
|
30
30
|
| `dec` | Declination (deg) |
|
|
31
31
|
| `Phase` | Solar phase angle (deg) |
|
|
32
|
+
| `Dhelio` | Heliocentric distance (AU) |
|
|
32
33
|
|
|
33
|
-
### Additional columns created during preprocessing
|
|
34
|
+
### Additional columns to be created during preprocessing
|
|
34
35
|
|
|
35
|
-
The preprocessing step
|
|
36
|
+
The preprocessing step requires the following fields:
|
|
36
37
|
|
|
37
38
|
- **`cmred` — Reduced magnitude**
|
|
38
39
|
|
|
@@ -42,11 +43,12 @@ The preprocessing step also adds the following fields:
|
|
|
42
43
|
$$
|
|
43
44
|
\mathrm{cmred} = \mathrm{cmagpsf} - 5\log_{10}\!\left(\frac{r\,\Delta}{\mathrm{AU}^2}\right)
|
|
44
45
|
$$
|
|
46
|
+
|
|
45
47
|
where `Obj_Sun_LTC_km` = \(r\) and `Range_LTC_km` = \(\Delta\).
|
|
46
48
|
|
|
47
49
|
- **`jd_ltc` — Light-time–corrected Julian Date**
|
|
48
50
|
|
|
49
|
-
First
|
|
51
|
+
First convert MJD → JD (`+ 2400000.5`), then apply the correction
|
|
50
52
|
|
|
51
53
|
$$
|
|
52
54
|
JD_\mathrm{ltc} = JD - \frac{\Delta}{c},
|
|
@@ -122,7 +124,8 @@ SOCCA_params = modelfit.get_fit_params(
|
|
|
122
124
|
pole_blind=False,
|
|
123
125
|
period_blind=True,
|
|
124
126
|
period_in=None,
|
|
125
|
-
period_quality_flag=True
|
|
127
|
+
period_quality_flag=True,
|
|
128
|
+
terminator=True
|
|
126
129
|
)
|
|
127
130
|
|
|
128
131
|
|
|
@@ -139,7 +142,7 @@ residuals_dataframe = modelfit.make_residuals_df(
|
|
|
139
142
|
)
|
|
140
143
|
|
|
141
144
|
# --- Estimate rotation period ---
|
|
142
|
-
p_in, k_val, p_rms, signal_peak, window_peak = periodest.
|
|
145
|
+
p_in, k_val, p_rms, signal_peak, window_peak = periodest.get_multiterm_period_estimate(
|
|
143
146
|
residuals_dataframe,
|
|
144
147
|
k_free=True,
|
|
145
148
|
)
|
|
@@ -160,7 +163,8 @@ SOCCA_params = modelfit.get_fit_params(
|
|
|
160
163
|
period_blind=False,
|
|
161
164
|
pole_blind=False,
|
|
162
165
|
period_in=p_in,
|
|
163
|
-
period_quality_flag=False
|
|
166
|
+
period_quality_flag=False,
|
|
167
|
+
terminator=True
|
|
164
168
|
)
|
|
165
169
|
```
|
|
166
170
|
|
|
File without changes
|
|
File without changes
|
|
@@ -188,9 +188,23 @@ def get_fit_params(
|
|
|
188
188
|
rms = []
|
|
189
189
|
model = []
|
|
190
190
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
191
|
+
# Add heliocentric distance mean
|
|
192
|
+
sma = data["Dhelio"].values[0].mean() # in AU
|
|
193
|
+
|
|
194
|
+
W = utils.period_range(sma, period_sy * 24) / 24 # in days
|
|
195
|
+
N = utils.Nintervals(sma)
|
|
196
|
+
|
|
197
|
+
Pmin = period_sy - W
|
|
198
|
+
Pmax = period_sy + W
|
|
199
|
+
|
|
200
|
+
period_scan = np.linspace(Pmin, Pmax, N)
|
|
201
|
+
|
|
202
|
+
if not np.isclose(period_scan, period_sy).any():
|
|
203
|
+
period_scan = np.sort(np.append(period_scan, period_sy))
|
|
204
|
+
|
|
205
|
+
# period_scan = np.linspace(
|
|
206
|
+
# period_sy - 20 / (24 * 60 * 60), period_sy + 20 / (24 * 60 * 60), 20
|
|
207
|
+
# )
|
|
194
208
|
|
|
195
209
|
ra0, dec0 = shg1g2_params["alpha0"], shg1g2_params["delta0"]
|
|
196
210
|
|
|
File without changes
|
|
@@ -492,3 +492,40 @@ def trumpet(peak_diff_1, f_feat, f_obs):
|
|
|
492
492
|
return -2 * f_feat
|
|
493
493
|
|
|
494
494
|
return 0.0
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
def Nintervals(a):
|
|
498
|
+
"""
|
|
499
|
+
Estimate the number of sampling intervals for period estimation
|
|
500
|
+
as a function of semi major axis a.
|
|
501
|
+
Parameters
|
|
502
|
+
----------
|
|
503
|
+
a : float
|
|
504
|
+
Semi major axis in AU.
|
|
505
|
+
Returns
|
|
506
|
+
-------
|
|
507
|
+
int
|
|
508
|
+
Estimated number of intervals.
|
|
509
|
+
"""
|
|
510
|
+
Na = 71.073 * np.exp(-1.21 * a) + 2.528
|
|
511
|
+
return int(Na)
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
def period_range(a, Psyn):
|
|
515
|
+
"""
|
|
516
|
+
Compute the allowed period range around a reference synodic period.
|
|
517
|
+
|
|
518
|
+
Parameters
|
|
519
|
+
----------
|
|
520
|
+
a : float
|
|
521
|
+
Semi major axis in AU.
|
|
522
|
+
Psyn : float
|
|
523
|
+
Reference synodic period in hours.
|
|
524
|
+
Returns
|
|
525
|
+
-------
|
|
526
|
+
float
|
|
527
|
+
Period range width in hours.
|
|
528
|
+
"""
|
|
529
|
+
g = 1.69 * np.exp(-0.338 * a) - 5.069
|
|
530
|
+
W = 10 ** (2 * np.log10(Psyn) + g)
|
|
531
|
+
return W
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "asteroid_spinprops"
|
|
3
|
-
version = "1.3.
|
|
3
|
+
version = "1.3.8"
|
|
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
|
{asteroid_spinprops-1.3.7 → asteroid_spinprops-1.3.8}/asteroid_spinprops/ssolib/periodest.py
RENAMED
|
File without changes
|