xradio 0.0.33__py3-none-any.whl → 0.0.34__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.
- xradio/vis/_vis_utils/_ms/conversion.py +75 -33
- {xradio-0.0.33.dist-info → xradio-0.0.34.dist-info}/METADATA +1 -1
- {xradio-0.0.33.dist-info → xradio-0.0.34.dist-info}/RECORD +6 -6
- {xradio-0.0.33.dist-info → xradio-0.0.34.dist-info}/LICENSE.txt +0 -0
- {xradio-0.0.33.dist-info → xradio-0.0.34.dist-info}/WHEEL +0 -0
- {xradio-0.0.33.dist-info → xradio-0.0.34.dist-info}/top_level.txt +0 -0
|
@@ -558,21 +558,16 @@ def create_data_variables(
|
|
|
558
558
|
try:
|
|
559
559
|
start = time.time()
|
|
560
560
|
if col == "WEIGHT":
|
|
561
|
-
xds
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
)[:, :, None, :],
|
|
571
|
-
(1, 1, xds.sizes["frequency"], 1),
|
|
572
|
-
),
|
|
573
|
-
dims=col_dims[col],
|
|
561
|
+
xds = get_weight(
|
|
562
|
+
xds,
|
|
563
|
+
col,
|
|
564
|
+
tb_tool,
|
|
565
|
+
time_baseline_shape,
|
|
566
|
+
tidxs,
|
|
567
|
+
bidxs,
|
|
568
|
+
use_table_iter,
|
|
569
|
+
main_column_descriptions,
|
|
574
570
|
)
|
|
575
|
-
|
|
576
571
|
else:
|
|
577
572
|
xds[col_to_data_variable_names[col]] = xr.DataArray(
|
|
578
573
|
read_col_conversion(
|
|
@@ -585,20 +580,61 @@ def create_data_variables(
|
|
|
585
580
|
),
|
|
586
581
|
dims=col_dims[col],
|
|
587
582
|
)
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
583
|
+
|
|
584
|
+
xds[col_to_data_variable_names[col]].attrs.update(
|
|
585
|
+
create_attribute_metadata(col, main_column_descriptions)
|
|
586
|
+
)
|
|
587
|
+
|
|
588
|
+
logger.debug(
|
|
589
|
+
"Time to read column " + str(col) + " : " + str(time.time() - start)
|
|
590
|
+
)
|
|
594
591
|
except:
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
592
|
+
logger.debug("Could not load column", col)
|
|
593
|
+
|
|
594
|
+
if ("WEIGHT_SPECTRUM" == col) and (
|
|
595
|
+
"WEIGHT" in col_names
|
|
596
|
+
): # Bogus WEIGHT_SPECTRUM column, need to use WEIGHT.
|
|
597
|
+
xds = get_weight(
|
|
598
|
+
xds,
|
|
599
|
+
"WEIGHT",
|
|
600
|
+
tb_tool,
|
|
601
|
+
time_baseline_shape,
|
|
602
|
+
tidxs,
|
|
603
|
+
bidxs,
|
|
604
|
+
use_table_iter,
|
|
605
|
+
main_column_descriptions,
|
|
606
|
+
)
|
|
598
607
|
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
608
|
+
|
|
609
|
+
def get_weight(
|
|
610
|
+
xds,
|
|
611
|
+
col,
|
|
612
|
+
tb_tool,
|
|
613
|
+
time_baseline_shape,
|
|
614
|
+
tidxs,
|
|
615
|
+
bidxs,
|
|
616
|
+
use_table_iter,
|
|
617
|
+
main_column_descriptions,
|
|
618
|
+
):
|
|
619
|
+
xds[col_to_data_variable_names[col]] = xr.DataArray(
|
|
620
|
+
np.tile(
|
|
621
|
+
read_col_conversion(
|
|
622
|
+
tb_tool,
|
|
623
|
+
col,
|
|
624
|
+
time_baseline_shape,
|
|
625
|
+
tidxs,
|
|
626
|
+
bidxs,
|
|
627
|
+
use_table_iter,
|
|
628
|
+
)[:, :, None, :],
|
|
629
|
+
(1, 1, xds.sizes["frequency"], 1),
|
|
630
|
+
),
|
|
631
|
+
dims=col_dims[col],
|
|
632
|
+
)
|
|
633
|
+
|
|
634
|
+
xds[col_to_data_variable_names[col]].attrs.update(
|
|
635
|
+
create_attribute_metadata(col, main_column_descriptions)
|
|
636
|
+
)
|
|
637
|
+
return xds
|
|
602
638
|
|
|
603
639
|
|
|
604
640
|
def create_taql_query(partition_info):
|
|
@@ -756,13 +792,22 @@ def convert_and_write_partition(
|
|
|
756
792
|
use_table_iter,
|
|
757
793
|
)
|
|
758
794
|
|
|
795
|
+
# Add data_groups and field_info
|
|
796
|
+
xds, is_single_dish = add_data_groups(xds)
|
|
797
|
+
|
|
759
798
|
if (
|
|
760
799
|
"WEIGHT" not in xds.data_vars
|
|
761
800
|
): # Some single dish datasets don't have WEIGHT.
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
801
|
+
if is_single_dish:
|
|
802
|
+
xds["WEIGHT"] = xr.DataArray(
|
|
803
|
+
np.ones(xds.SPECTRUM.shape, dtype=np.float64),
|
|
804
|
+
dims=xds.SPECTRUM.dims,
|
|
805
|
+
)
|
|
806
|
+
else:
|
|
807
|
+
xds["WEIGHT"] = xr.DataArray(
|
|
808
|
+
np.ones(xds.VISIBILITY.shape, dtype=np.float64),
|
|
809
|
+
dims=xds.VISIBILITY.dims,
|
|
810
|
+
)
|
|
766
811
|
|
|
767
812
|
logger.debug("Time create data variables " + str(time.time() - start))
|
|
768
813
|
|
|
@@ -832,9 +877,6 @@ def convert_and_write_partition(
|
|
|
832
877
|
if len(xds.time) > 1 and xds.time[1] - xds.time[0] < 0:
|
|
833
878
|
xds = xds.sel(time=slice(None, None, -1))
|
|
834
879
|
|
|
835
|
-
# Add data_groups and field_info
|
|
836
|
-
xds, is_single_dish = add_data_groups(xds)
|
|
837
|
-
|
|
838
880
|
# Create field_and_source_xds (combines field, source and ephemeris data into one super dataset)
|
|
839
881
|
start = time.time()
|
|
840
882
|
if ephemeris_interpolate:
|
|
@@ -38,7 +38,7 @@ xradio/vis/_vis_utils/__init__.py,sha256=Scu6rKJ2SpO8aG7F-xdTZcYfyWx0viV8gFh8E8u
|
|
|
38
38
|
xradio/vis/_vis_utils/ms.py,sha256=hkJHFDC6O4PNhqDALX7CJ-krEpF9vxu-N_ur-UXi0Zo,4311
|
|
39
39
|
xradio/vis/_vis_utils/zarr.py,sha256=OYCOdUVUE-KbG0-OZKIbD0bFpOy1tt2YqiQMStVzHDs,3948
|
|
40
40
|
xradio/vis/_vis_utils/_ms/chunks.py,sha256=JTPk3il6fk570BjWZMoOAtsbvnLmqPcBv9EPY6A2yOs,2964
|
|
41
|
-
xradio/vis/_vis_utils/_ms/conversion.py,sha256=
|
|
41
|
+
xradio/vis/_vis_utils/_ms/conversion.py,sha256=pHewprOik2aM8ZN5uQeez386uvZ1MkUjYfToBzDZT0Y,38330
|
|
42
42
|
xradio/vis/_vis_utils/_ms/create_field_and_source_xds.py,sha256=btIaOnfTy7oQUBbrXtH1Jbh_1w2Igz-mTzDnYZU1qyY,27590
|
|
43
43
|
xradio/vis/_vis_utils/_ms/descr.py,sha256=dYK8mhXxODIh-dfqaOm-YZb7kmoN1N2golX_RFncO94,5215
|
|
44
44
|
xradio/vis/_vis_utils/_ms/msv2_msv3.py,sha256=9AKs2HWly7Ivv_Cjr11dIPGmm33_rtSBoGF9wN5ZwEQ,116
|
|
@@ -64,8 +64,8 @@ xradio/vis/_vis_utils/_utils/xds_helper.py,sha256=BudDNSiQyaZCMEzqScTb_LoqRgha1K
|
|
|
64
64
|
xradio/vis/_vis_utils/_zarr/encoding.py,sha256=GENIlThV6a9CUCL6gIGlu9c6NR3OFWNos6mpxZjMwDc,536
|
|
65
65
|
xradio/vis/_vis_utils/_zarr/read.py,sha256=9UKX_kKztE5jhsriBPnLhWtbptk5DRSVUEHT8V5qh8w,7597
|
|
66
66
|
xradio/vis/_vis_utils/_zarr/write.py,sha256=vebYh-rAKfY3Feuv6H400s-2UuciPtfZMIlMtb23YSk,10044
|
|
67
|
-
xradio-0.0.
|
|
68
|
-
xradio-0.0.
|
|
69
|
-
xradio-0.0.
|
|
70
|
-
xradio-0.0.
|
|
71
|
-
xradio-0.0.
|
|
67
|
+
xradio-0.0.34.dist-info/LICENSE.txt,sha256=9CYIJt7riOXo9AD0eXBZviLxo_HebD-2JJI8oiWtzfg,1807
|
|
68
|
+
xradio-0.0.34.dist-info/METADATA,sha256=ldNjvtWhYhKL8Gzu0ZS0rk4Ij5MnxuOWXuWWFHddqHw,4449
|
|
69
|
+
xradio-0.0.34.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
|
70
|
+
xradio-0.0.34.dist-info/top_level.txt,sha256=dQu27fGBZJ2Yk-gW5XeD-dZ76Xa4Xcvk60Vz-dwXp7k,7
|
|
71
|
+
xradio-0.0.34.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|