Skip to content

Commit

Permalink
fix the tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
bhazelton committed Jun 26, 2023
1 parent bb30281 commit 7252fca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
command: |
source ./ci/_activate_current_env.sh
cd docs
python -m pytest -n 2 --doctest-glob="*.rst" -W "error::DeprecationWarning"
python -m pytest -n auto --doctest-glob="*.rst" -W "error::DeprecationWarning"
cd ..
- save_cache:
key: deps-{{ .Branch }}-{{ checksum "ci/pyuvdata_tests.yml" }}
Expand Down
12 changes: 8 additions & 4 deletions docs/uvdata_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,12 @@ c) Resampling a BDA dataset in time
d) Averaging in frequency
*************************
The :meth:`pyuvdata.UVData.frequency_average` method takes a number of channels to
average together. Use the `keep_ragged` parameter to control the handling if the
number of frequencies in each spectral window does not divide evenly by the number of
channels to be averaged together. Use the `respect_spws` parameter to control whether
averaging will be done over spectral window boundaries.

.. code-block:: python
>>> import os
Expand All @@ -780,7 +786,7 @@ d) Averaging in frequency
Channel width: [122070.3125 122070.3125 122070.3125 122070.3125]
>>> # Average by a factor of 2 in frequency
>>> uvd.frequency_average(2)
>>> uvd.frequency_average(n_chan_to_avg=2, keep_ragged=True)
>>> print("Channel width after frequency averaging: ", uvd.channel_width)
Channel width after frequency averaging: [244140.625 244140.625]
Expand All @@ -789,8 +795,7 @@ UVData: Plotting
Making a simple waterfall plot.

Note: there is now support for reading in only part of a uvfits, uvh5 or miriad file
(see :ref:`large_files`), so you need not read in the
entire file to plot one waterfall.
(see :ref:`large_files`), so you need not read in the entire file to plot one waterfall.

.. code-block:: python
Expand All @@ -802,7 +807,6 @@ entire file to plot one waterfall.
>>> filename = os.path.join(DATA_PATH, 'day2_TDEM0003_10s_norx_1src_1spw.uvfits')
>>> uvd = UVData.from_file(filename, use_future_array_shapes=True)
>>> # Note that the length of the array along axis=1 is always 1.
>>> print(uvd.data_array.shape)
(1360, 64, 4)
>>> print(uvd.Ntimes)
Expand Down

0 comments on commit 7252fca

Please sign in to comment.