Skip to content

Commit

Permalink
Found a few more docstring corrections to make and improve teh implem…
Browse files Browse the repository at this point in the history
…entation to the select_baselines function a bit.
  • Loading branch information
jrhosk committed Oct 17, 2023
1 parent b99433a commit f50cff1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/astrohack/extract_holog.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,18 +527,18 @@ def generate_holog_obs_dict(
:param ms_name: Name of input measurement file name.
:type ms_name: str
:param baseline_average_distance: To increase the signal to noise for a mapping antenna mutiple reference
:param baseline_average_distance: To increase the signal-to-noise for a mapping antenna multiple reference
antennas can be used. The baseline_average_distance is the acceptable distance between a mapping antenna and a
reference antenna. The baseline_average_distance is only used if the holog_obs_dict is not specified. If no
distance is specified all reference antennas will be used. baseline_average_distance and baseline_average_nearest
can not be used together.
:type holog_obs_dict: float, optional
:type baseline_average_distance: float, optional
:param baseline_average_nearest: To increase the signal to noise for a mapping antenna mutiple reference antennas
:param baseline_average_nearest: To increase the signal-to-noise for a mapping antenna multiple reference antennas
can be used. The baseline_average_nearest is the number of nearest reference antennas to use. The
baseline_average_nearest is only used if the holog_obs_dict is not specified. baseline_average_distance and
baseline_average_nearest can not be used together.
:type holog_obs_dict: int, optional
:type baseline_average_nearest: int, optional
:param point_name: Name of *<point_name>.point.zarr* file to use.
:type point_name: str, optional
Expand Down Expand Up @@ -754,6 +754,7 @@ def select(self, key, value, inplace=False, **kwargs):
if "reference" in kwargs.keys():
return self._select_baseline(
value,
n_baselines=None,
reference=kwargs["reference"],
obs_dict=obs_dict
)
Expand All @@ -766,7 +767,6 @@ def select(self, key, value, inplace=False, **kwargs):
obs_dict=obs_dict
)


else:
self.logger.error("Must specify a list of reference antennas for this option.")
else:
Expand Down Expand Up @@ -874,7 +874,7 @@ def _select_baseline(value, n_baselines, obs_dict, reference=None):
obs_dict[ddi][mp]["ant"].pop(ant)
continue

if reference is None:
if reference is None and n_baselines is not None:
reference_antennas = obs_dict[ddi][mp]["ant"][ant]

if n_baselines > len(reference_antennas):
Expand Down

0 comments on commit f50cff1

Please sign in to comment.