SkyMapMod 0.1.18__tar.gz → 0.1.19__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: SkyMapMod
3
- Version: 0.1.18
3
+ Version: 0.1.19
4
4
  Summary: for modeling
5
5
  Project-URL: Homepage, https://istina.msu.ru/profile/aminevann/
6
6
  Author-email: Anna Amineva <amineva.2219@physics.msu.ru>
@@ -4,7 +4,7 @@ import random
4
4
 
5
5
  #коэффициент пересчета из единиц S10 в количество фотонов от Солнца
6
6
  #вычислен на основе спектра АЧТ от звезды класса A0, солнечного спектра и факта, что 1 ед. S10 соответствует 100 фотонов от звезды класса A0
7
- N_S10 = 100.63910099562007
7
+
8
8
 
9
9
  #переопределяю тригонометрические функции, чтобы работать с градусами
10
10
  def cos(x):
@@ -182,18 +182,25 @@ def integral(wl, spec):
182
182
  result += (spec[i] + spec[i+1]) / 2 * (wl[i+1] - wl[i])
183
183
  return result
184
184
 
185
-
185
+ def zodiacal_spectrum(lmbd, beta, lmbd_sun, Sun_sp_wl = wavelenght_newguey2003, Sun_sp_fx = flux_newguey2003, V_wl = wavelenght_band_V, V_tr = trancparency_band_V):
186
+ #коэффициент пересчета из единиц S10 в количество фотонов от Солнца
187
+ #вычислен на основе спектра АЧТ от звезды класса A0, солнечного спектра и факта, что 1 ед. S10 соответствует 100 фотонов от звезды класса A0
188
+ #вот столько фотонов/(см^2 сек) от Солнца несет 1 ед S10:
189
+ N_S10 = 100.6
190
+ N_S10 = N_S10 * 10**4 / (4 * np.pi) # фот / (м^2 сек ср) -- НАДО ЛИ ДЕЛИТЬ НА 4 ПИ?
191
+ S10 = zodiacal_light(lmbd, beta, lmbd_sun)
192
+ Sun_V_wl, Sun_V_sp = convolution(Sun_sp_wl, Sun_sp_fx, V_wl, V_tr) #свертка Солнечного спектра с полосой V
193
+ integr = integral(Sun_V_wl, Sun_V_sp)
194
+ A = S10 * N_S10 / integr
186
195
 
187
-
188
- def zodiacal_spectrum(lmbd, beta, lmbd_sun, Sun_sp_wl = wavelenght_newguey2003, Sun_sp_fx = flux_newguey2003, V_wl = wavelenght_band_V, V_tr = trancparency_band_V, T_A0 = 9800, N_S10 = N_S10):
189
- S10 = zodiacal_light(lmbd, beta, lmbd_sun)
190
- N_S10_to_Sun = N_S10
191
- N_phot = round(S10 * N_S10_to_Sun)
192
- probabilities = Sun_sp_fx / np.sum(Sun_sp_fx) #или все-таки нормируем на интеграл?
193
- counts = np.zeros(Sun_sp_wl.shape[0])
194
- for i in range(N_phot):
195
- spectrum = random.choices(Sun_sp_wl, weights=probabilities)
196
- counts[np.where(Sun_sp_wl == spectrum)[0][0]] += 1
197
- return(Sun_sp_wl, counts)
196
+
197
+ #############################################
198
+ a, b = smm.convolution(Sun_sp_wl, A * Sun_sp_fx, V_wl, V_tr)
199
+ c = integr = smm.integral(a, b)
200
+ print('Техническая проверка: S10*N_S10 =', S10 * N_S10)
201
+ print('А при нормировке и интекрированию получается:', c)
202
+ #############################################
203
+
204
+ return Sun_sp_wl, A * Sun_sp_fx #нм, фот / (м^2 сек нм ср)
198
205
 
199
206
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "SkyMapMod"
7
- version = "0.1.18"
7
+ version = "0.1.19"
8
8
  authors = [
9
9
  { name="Anna Amineva", email="amineva.2219@physics.msu.ru" },
10
10
  ]
File without changes
File without changes