timewise 0.3.1__py3-none-any.whl → 0.3.2__py3-none-any.whl

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.
@@ -327,12 +327,19 @@ class WiseDataByVisit(WISEDataBase):
327
327
  metadata[Nk] = len(ilc)
328
328
 
329
329
  if len(ilc) > 0:
330
- metadata[mean_weighted_ppb_key] = np.average(ilc[llumkey], weights=ilc[ppb_key])
331
- metadata[excess_variance_key], metadata[excess_variance_err_key] = get_excess_variance(
332
- np.array(ilc[llumkey]),
333
- np.array(ilc[errkey]),
334
- np.array(metadata[mean_weighted_ppb_key])
335
- )
330
+ # check if ppb sum to more than zero
331
+ if sum(ilc[ppb_key]) > 0:
332
+ metadata[mean_weighted_ppb_key] = np.average(ilc[llumkey], weights=ilc[ppb_key])
333
+ metadata[excess_variance_key], metadata[excess_variance_err_key] = get_excess_variance(
334
+ np.array(ilc[llumkey]),
335
+ np.array(ilc[errkey]),
336
+ np.array(metadata[mean_weighted_ppb_key])
337
+ )
338
+
339
+ # if not we can not calculate the excess variance
340
+ else:
341
+ for k in [mean_weighted_ppb_key, excess_variance_key, excess_variance_err_key]:
342
+ metadata[k] = np.nan
336
343
 
337
344
  imin = ilc[llumkey].min()
338
345
  imax = ilc[llumkey].max()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: timewise
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: A small package to download infrared data from the WISE satellite
5
5
  Home-page: https://github.com/JannisNe/timewise
6
6
  License: MIT
@@ -6,9 +6,9 @@ timewise/point_source_utils.py,sha256=ffVgEVTY93u_vy9wK9z1o6eNFv6Tjd2pHcVd3Vfxcw
6
6
  timewise/utils.py,sha256=f1cIBNbrQ91zr74qJ32qOVDXxo4bIWVQvqB2Dyv-XrA,6885
7
7
  timewise/wise_bigdata_desy_cluster.py,sha256=rvmExS0rPDW6PmFLUyTYo3ECq74YYI22bCw2HOnnh78,52615
8
8
  timewise/wise_data_base.py,sha256=nf1KpCaT0_cLSZarIDg1_yNqxN18NGhHsG17OZn3O2I,66314
9
- timewise/wise_data_by_visit.py,sha256=Oqtf4EHFBj5GOBJd_feVzhM2oAarp3KsL85xQxppWuw,16596
9
+ timewise/wise_data_by_visit.py,sha256=zYGvtWZjYgFYx6wkbnUijYJGBTyvjEOf0FU7fECxFh8,16973
10
10
  timewise/wise_flux_conversion_correction.dat,sha256=XLnYqk0g1NVthVSNGsKlqinzKI7QUwJidO-qg4tHXKU,1095
11
- timewise-0.3.1.dist-info/METADATA,sha256=0Sf4TWmooX45kUDBvyeZ5b6QtOiYZ9Vvc7h9N17yDTo,3264
12
- timewise-0.3.1.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
13
- timewise-0.3.1.dist-info/LICENSE,sha256=sVoNJWiTlH-NarJx0wdsob468Pg3JE6vIIgll4lCa3E,1070
14
- timewise-0.3.1.dist-info/RECORD,,
11
+ timewise-0.3.2.dist-info/LICENSE,sha256=sVoNJWiTlH-NarJx0wdsob468Pg3JE6vIIgll4lCa3E,1070
12
+ timewise-0.3.2.dist-info/METADATA,sha256=yWCVRJEZTRNPpDJgrJ-sZyOelgvWVWpH1d8UnHZJmDA,3264
13
+ timewise-0.3.2.dist-info/WHEEL,sha256=kLuE8m1WYU0Ig0_YEGrXyTtiJvKPpLpDEiChiNyei5Y,88
14
+ timewise-0.3.2.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.4.0
2
+ Generator: poetry-core 1.5.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any