SkyMapMod 0.1.17__tar.gz → 0.1.18__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.17
3
+ Version: 0.1.18
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>
@@ -5,6 +5,7 @@ from .data.load_data import load_star_temperatures, load_star_brightness
5
5
  from.zodiac import black_body_phot
6
6
 
7
7
  #на вход подаем галактические координаты (l -- долгота, b -- широта) и массив длин волн, по которым строим спектр
8
+ #РАЗОБРАТЬСЯ С КОЭФФИЦИЕНТАМИ А -- НАДО ЛИ НОРМИРОВАТЬ НА C (КАЖЕТСЯ НАДО) А ЕЩЕ ВРОДЕ Я ЕГО ОТНОРМИРОВАЛА И ПОДГРУЗИЛА -- ПРОВЕРИТЬ
8
9
  def star_spectrum(l, b, lmbd):
9
10
  j = int((1800 - round(l*10)) + 3600) #пересчет из галактических к позиции в массиве
10
11
  i = int(900 + round(b*10))
@@ -4,7 +4,7 @@ import random
4
4
 
5
5
  #коэффициент пересчета из единиц S10 в количество фотонов от Солнца
6
6
  #вычислен на основе спектра АЧТ от звезды класса A0, солнечного спектра и факта, что 1 ед. S10 соответствует 100 фотонов от звезды класса A0
7
- k = 100.63910099562007
7
+ N_S10 = 100.63910099562007
8
8
 
9
9
  #переопределяю тригонометрические функции, чтобы работать с градусами
10
10
  def cos(x):
@@ -182,27 +182,12 @@ 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
- def N_S10(Sun_sp_wl = wavelenght_newguey2003, Sun_sp_fx = flux_newguey2003, V_wl = wavelenght_band_V, V_tr = trancparency_band_V, T_A0 = 9800):
186
- h = 6.63e-34
187
- c = 3e8
188
- A0_sp_wl = Sun_sp_wl
189
- A0_sp_fx = black_body(A0_sp_wl, T_A0)
190
-
191
- A0_V_wl, A0_V_fx = convolution(A0_sp_wl, A0_sp_fx, V_wl, V_tr)
192
- A0_V_fx = A0_V_fx / (np.sum(A0_V_fx * A0_V_wl)) #надо домножать на A0_V_wl при нормировке.
193
185
 
194
- Sun_V_wl, Sun_V_fx = convolution(Sun_sp_wl, Sun_sp_fx, V_wl, V_tr)
195
- Sun_V_fx = Sun_V_fx / (np.sum(Sun_V_fx * Sun_V_wl))
196
-
197
- mean_A0 = np.sum(A0_V_fx * h * c / A0_V_wl * 1e9)
198
- mean_Sun = np.sum(Sun_V_fx * h * c / Sun_V_wl * 1e9)
199
- N_S10_to_Sun = 100 * mean_A0 / mean_Sun
200
- return (N_S10_to_Sun) #ЭТО НА САНТИМЕТР КВАДРАТНЫЙ В СЕКУНДУ!!!! ВАЖНО!!!!!
201
186
 
202
187
 
203
- 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):
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):
204
189
  S10 = zodiacal_light(lmbd, beta, lmbd_sun)
205
- N_S10_to_Sun = N_S10(Sun_sp_wl, Sun_sp_fx, V_wl, V_tr, T_A0)
190
+ N_S10_to_Sun = N_S10
206
191
  N_phot = round(S10 * N_S10_to_Sun)
207
192
  probabilities = Sun_sp_fx / np.sum(Sun_sp_fx) #или все-таки нормируем на интеграл?
208
193
  counts = np.zeros(Sun_sp_wl.shape[0])
@@ -212,30 +197,3 @@ def zodiacal_spectrum(lmbd, beta, lmbd_sun, Sun_sp_wl = wavelenght_newguey2003,
212
197
  return(Sun_sp_wl, counts)
213
198
 
214
199
 
215
- def N_S10_2(Sun_sp_wl = wavelenght_newguey2003, Sun_sp_fx = flux_newguey2003, V_wl = wavelenght_band_V, V_tr = trancparency_band_V, T_A0 = 9800):
216
- h = 6.63e-34
217
- c = 3e8
218
- Sun_V_wl, Sun_V_fx = convolution(Sun_sp_wl, Sun_sp_fx, V_wl, V_tr) #сворачиваю с полосой V
219
-
220
- Sun_norm = integral(Sun_V_wl, Sun_V_fx)#интегрирую спектр, photons/(m^2 sec sr)
221
- Sun_V_fx_norm = Sun_V_fx / Sun_norm #спектр отнормирован на 1 фотон
222
-
223
- Sun_V_fx_norm_Vt = Sun_V_fx_norm * h * c / (Sun_V_wl * 10**(-9)) #перевела в мощности
224
- Sun = np.sum(Sun_V_fx_norm_Vt)
225
-
226
- A0_sp_wl = Sun_sp_wl #нм
227
- A0_sp_fx = black_body_phot(A0_sp_wl, T_A0) #фот/ (м^2 ср сек м)
228
-
229
- A0_V_wl, A0_V_fx = convolution(A0_sp_wl, A0_sp_fx, V_wl, V_tr)
230
- norm_S10 = integral(A0_V_wl * 10**(-9), A0_V_fx)
231
-
232
- A = 100/norm_S10
233
-
234
- A0_V_fx = A * A0_V_fx
235
- A0_norm = integral(A0_V_wl, A0_V_fx)
236
- A0_V_fx_norm = A0_V_fx / A0_norm #photons/(m^2 sec sr)
237
-
238
- A0_V_fx_norm_Vt = A0_V_fx_norm * h * c / (A0_V_wl * 10**(-9)) #Vt/(m^2 sec sr)
239
- A0 = np.sum(A0_V_fx_norm_Vt)
240
- N_S10_to_Sun = 100 * A0 / Sun
241
- return (N_S10_to_Sun) #ЭТО НА САНТИМЕТР КВАДРАТНЫЙ В СЕКУНДУ
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "SkyMapMod"
7
- version = "0.1.17"
7
+ version = "0.1.18"
8
8
  authors = [
9
9
  { name="Anna Amineva", email="amineva.2219@physics.msu.ru" },
10
10
  ]
File without changes
File without changes