asteroid_spinprops 1.3.4__tar.gz → 1.3.6__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.4
3
+ Version: 1.3.6
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
@@ -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)
@@ -247,16 +246,25 @@ def get_fit_params(
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
  (
258
266
  f"H_{i}" for i in range(1, 7) if f"H_{i}" in shg1g2_params
259
- ), # Harcoded number of filters? Grr...
267
+ ), # FIXME: Harcoded N of bands, won't throw error if N>6, but to be recosnidered
260
268
  None,
261
269
  )
262
270
 
@@ -324,10 +332,6 @@ def get_fit_params(
324
332
  SOCCA_opt["prms"] = p_rms
325
333
  SOCCA_opt["k_terms"] = k_val
326
334
  except Exception:
327
- if time_me:
328
- t2 = time.time()
329
- etime = t2 - t1
330
- SOCCA_opt["invtime"] = etime
331
335
  SOCCA_opt = {"Failed at SOCCA inversion": 1}
332
336
  if time_me:
333
337
  t2 = time.time()
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "asteroid_spinprops"
3
- version = "1.3.4"
3
+ version = "1.3.6"
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"}