@@ -82,7 +82,7 @@ def histogram_detection():
8282 # Find peaks
8383 peaks , _ = find_peaks (
8484 smoothed ,
85- height = np .max (smoothed ) * 0.05 , # 5% of max height
85+ height = np .max (smoothed ) * 0.05 ,
8686 distance = max (1 , len (smoothed ) // 50 ),
8787 )
8888
@@ -100,7 +100,7 @@ def gap_analysis():
100100 # Find gaps that are outliers using z-score
101101 if len (gaps ) > 0 :
102102 z_scores = np .abs ((gaps - np .mean (gaps )) / np .std (gaps ))
103- significant_gaps = np .sum (z_scores > 2.0 ) # 2 standard deviations
103+ significant_gaps = np .sum (z_scores > 2.0 )
104104 return max (1 , significant_gaps + 1 )
105105
106106 return 1
@@ -131,14 +131,13 @@ def jenks_optimization():
131131 breaks = jenkspy .jenks_breaks (raans , n_classes = k )
132132 gvf = jenkspy .goodness_of_variance_fit (raans , breaks )
133133
134- # Look for elbow point
135134 if k == 1 :
136135 best_gvf = gvf
137136 best_k = k
138- elif gvf - best_gvf > 0.03 : # Significant improvement
137+ elif gvf - best_gvf > 0.03 :
139138 best_gvf = gvf
140139 best_k = k
141- elif gvf > 0.85 and (gvf - best_gvf ) < 0.01 : # Diminishing returns
140+ elif gvf > 0.85 and (gvf - best_gvf ) < 0.01 :
142141 break
143142 except Exception :
144143 continue
@@ -215,8 +214,11 @@ def satellite_to_orbit_mapping(shells: list, auto_gen: bool = True) -> None:
215214
216215 orbits_number = 0
217216
217+ # NOTE: Automatic Mode is recommended for most scenarios especially when dealing with large datasets.
218+ # Automatic Mode gains more effectiveness but may sacrifice some accuracy.
219+ # Manual Mode offers precision but is more time-consuming.
218220 if not auto_gen :
219- # Observation Mode: visualize RAAN distribution and manually input orbit number
221+ # Manual Mode: visualize RAAN distribution and manually input orbit number
220222 plt .plot (raans )
221223 plt .ylabel ("RAANS" )
222224 plt .show ()
0 commit comments