@@ -755,9 +755,14 @@ def copy(self):
755755 """
756756 return copy .deepcopy (self )
757757
758- def _get_param_axis (self , axis_name : str , single_named_axis : bool = False ):
758+ def _get_uvparam_axis (self , axis_name : str , single_named_axis : bool = False ):
759759 """
760- Get a mapping of parameters that have a given axis to the axis number.
760+ Get a mapping of properties that have a given axis to the axis number.
761+
762+ This uses the forms of the UVParameter attributes on this object to identify
763+ properties derived from UVParameters that have one or more axes associated
764+ with the axis_name. Any properties with an associated axis appear as keys
765+ in the output dict, with the values giving the associated axis numbers.
761766
762767 Parameters
763768 ----------
@@ -770,9 +775,28 @@ def _get_param_axis(self, axis_name: str, single_named_axis: bool = False):
770775 -------
771776 dict
772777 The keys are UVParameter names that have an axis with axis_name
773- (axis_name appears in their form). The values are a list of the axis
778+ (axis_name appears in their form). The values are an array of the axis
774779 indices where axis_name appears in their form.
775780
781+ Examples
782+ --------
783+ >>> from pyuvdata import UVData
784+ >>> from pyuvdata.datasets import fetch_data
785+ >>> filename = fetch_data("vla_casa_tutorial_uvfits")
786+ >>> uvd = UVData.from_file(filename)
787+ >>> uvd._get_uvparam_axis("Nfreqs")
788+ {'channel_width': array([0]),
789+ 'data_array': array([1]),
790+ 'flag_array': array([1]),
791+ 'flex_spw_id_array': array([0]),
792+ 'freq_array': array([0]),
793+ 'nsample_array': array([1])}
794+
795+ >>> uvd._get_uvparam_axis("Nfreqs", single_named_axis=True)
796+ {'channel_width': array([0]),
797+ 'flex_spw_id_array': array([0]),
798+ 'freq_array': array([0])}
799+
776800 """
777801 ret_dict = {}
778802 for param in self :
@@ -871,7 +895,7 @@ def _axis_add_helper(
871895 self ,
872896 other ,
873897 axis_name : str ,
874- other_inds : IntArray ,
898+ other_inds : IntArray | None = None ,
875899 final_order : IntArray | None = None ,
876900 ):
877901 """
@@ -883,13 +907,14 @@ def _axis_add_helper(
883907 The UVBase object to be added.
884908 axis_name : str
885909 The axis name (e.g. "Nblts", "Npols").
886- other_inds : np.ndarray of int
887- Indices into the other object along this axis to include.
888- final_order : np.ndarray of int
910+ other_inds : np.ndarray of int, optional
911+ Indices into the other object along this axis to include. If None,
912+ include all indices.
913+ final_order : np.ndarray of int, optional
889914 Final ordering array giving the sort order after concatenation.
890915
891916 """
892- update_params = self ._get_param_axis (axis_name , single_named_axis = True )
917+ update_params = self ._get_uvparam_axis (axis_name , single_named_axis = True )
893918 other_form_dict = {axis_name : other_inds }
894919 for param , axis_list in update_params .items ():
895920 axis = axis_list [0 ]
@@ -917,7 +942,7 @@ def _axis_pad_helper(self, axis_name: str, add_len: int):
917942 The extra length to be padded on for this axis.
918943
919944 """
920- update_params = self ._get_param_axis (axis_name )
945+ update_params = self ._get_uvparam_axis (axis_name )
921946 multi_axis_params = self ._get_multi_axis_params ()
922947 for param , axis_list in update_params .items ():
923948 if param not in multi_axis_params :
@@ -987,7 +1012,7 @@ def _axis_fast_concat_helper(self, other, axis_name: str):
9871012 axis_name : str
9881013 The axis name (e.g. "Nblts", "Npols").
9891014 """
990- update_params = self ._get_param_axis (axis_name )
1015+ update_params = self ._get_uvparam_axis (axis_name )
9911016 for param , axis_list in update_params .items ():
9921017 axis = axis_list [0 ]
9931018 setattr (
0 commit comments