SkyMapMod 0.1.7__tar.gz → 0.1.9__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.7
3
+ Version: 0.1.9
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>
@@ -176,6 +176,13 @@ def convolution(array_1, meaning_1, array_2, meaning_2):
176
176
  meaning.append(meaning_1[i] * meaning_2[j])
177
177
  return np.array(array), np.array(meaning)
178
178
 
179
+ def integral(wl, spec):
180
+ shape = wl.shape[0]
181
+ result = 0
182
+ for i in range(shape - 1):
183
+ result += (spec[i] + spec[i+1]) / 2 * (wl[i+1] - wl[i])
184
+ return result
185
+
179
186
  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):
180
187
  h = 6.63e-34
181
188
  c = 3e8
@@ -223,4 +230,24 @@ def N_S10_2(Sun_sp_wl = wavelenght_newguey2003, Sun_sp_fx = flux_newguey2003, V_
223
230
  mean_A0 = np.sum(A0_V_fx * h * c / A0_V_wl * 1e9) # Вт / (м^2 ср)
224
231
  mean_Sun = np.sum(Sun_V_fx * h * c / Sun_V_wl * 1e9) # Вт / (м^2 ср)
225
232
  N_S10_to_Sun = 100 * mean_A0 / mean_Sun
233
+ return (N_S10_to_Sun)
234
+
235
+ #предположение о том, что спектр солнечный у меня все-таки лежит в Вт / (м^2 ср нм)
236
+ def N_S10_3(Sun_sp_wl = wavelenght_newguey2003, Sun_sp_fx = flux_newguey2003, V_wl = wavelenght_band_V, V_tr = trancparency_band_V, T_A0 = 9800):
237
+ h = 6.63e-34
238
+ c = 3e8
239
+ A0_sp_wl = Sun_sp_wl #нм
240
+ A0_sp_fx = black_body(A0_sp_wl, T_A0) #Вт/ (м^2 ср м)
241
+ A0_V_wl, A0_V_fx = convolution(A0_sp_wl, A0_sp_fx, V_wl, V_tr) #нм, Вт / (м^2 ср м), стерадианы уйдут при нормировке
242
+
243
+ A0_V_fx = A0_V_fx / (integral(A0_V_wl * 10**(-9), A0_V_fx)) #беру спектр и нормирую его на общее количество фотонов под спектром
244
+ #на выходе: Вт / (м^2 ср)
245
+
246
+ Sun_V_wl, Sun_V_fx = convolution(Sun_sp_wl, Sun_sp_fx, V_wl, V_tr) #нм, Вт / (м^2 ср нм)
247
+
248
+ Sun_V_fx = Sun_V_fx / (integral(Sun_V_fx, Sun_V_wl)) #на выходе: Вт / (м^2 ср)
249
+
250
+ mean_A0 = np.sum(A0_V_fx) # Вт / (м^2 ср)
251
+ mean_Sun = np.sum(Sun_V_fx) # Вт / (м^2 ср)
252
+ N_S10_to_Sun = 100 * mean_A0 / mean_Sun
226
253
  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.7"
7
+ version = "0.1.9"
8
8
  authors = [
9
9
  { name="Anna Amineva", email="amineva.2219@physics.msu.ru" },
10
10
  ]
File without changes
File without changes