asteroid_spinprops 1.3.3__tar.gz → 1.3.5__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: asteroid_spinprops
3
- Version: 1.3.3
3
+ Version: 1.3.5
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
@@ -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 IndexError:
176
+ except (IndexError, ValueError):
177
177
  SOCCA_opt = {"Failed at bootsrap sampling": 1}
178
178
  if time_me:
179
179
  t2 = time.time()
@@ -237,7 +237,6 @@ def get_fit_params(
237
237
  rms_landscape, factor=4, sigma=1.0
238
238
  )
239
239
  ny, nx = interp_vals.shape
240
- [rarange[0], rarange[-1], decrange[0], decrange[-1]]
241
240
  ra_vals = np.linspace(rarange.min(), rarange.max(), nx)
242
241
  dec_vals = np.linspace(decrange.min(), decrange.max(), ny)
243
242
  ys, xs = utils.detect_local_minima(interp_vals)
@@ -246,12 +245,21 @@ def get_fit_params(
246
245
 
247
246
  ra_init = ra_minima
248
247
  dec_init = dec_minima
249
-
248
+
249
+ # Add near-pole initialization points
250
250
  ra_init = np.append(ra_init, 220)
251
251
  ra_init = np.append(ra_init, 140)
252
252
 
253
- dec_init = np.append(ra_init, 70)
254
- dec_init = np.append(ra_init, -70)
253
+ dec_init = np.append(dec_init, 70)
254
+ dec_init = np.append(dec_init, -70)
255
+
256
+ # Remove pairs at the parameter space border
257
+ RA_MARGIN = 1.0 # degrees
258
+
259
+ ra_mask = (ra_init > RA_MARGIN) & (ra_init < 360 - RA_MARGIN)
260
+
261
+ ra_init = ra_init[ra_mask]
262
+ dec_init = dec_init[ra_mask]
255
263
 
256
264
  H_key = next(
257
265
  (
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "asteroid_spinprops"
3
- version = "1.3.3"
3
+ version = "1.3.5"
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"}