Skip to content

Commit

Permalink
revert doctests due to ndcube release
Browse files Browse the repository at this point in the history
  • Loading branch information
nabobalis committed Jun 18, 2024
1 parent 44f3ed7 commit a27e20f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

online:
if: '!startsWith(github.event.ref, "refs/tags/v"'
if: "!startsWith(github.event.ref, 'refs/tags/v'"
needs: [docs]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
Expand Down
4 changes: 2 additions & 2 deletions docs/data_types/raster.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ Dimensions
.. code-block:: python
>>> my_rasters.raster_array_axis_physical_types
[('meta.obs.sequence',), (np.str_('custom:pos.helioprojective.lat'), np.str_('custom:pos.helioprojective.lon'), np.str_('time')), (np.str_('custom:pos.helioprojective.lat'), np.str_('custom:pos.helioprojective.lon')), (np.str_('em.wl'),)]
[('meta.obs.sequence',), ('custom:pos.helioprojective.lat', 'custom:pos.helioprojective.lon', 'time'), ('custom:pos.helioprojective.lat', 'custom:pos.helioprojective.lon'), ('em.wl',)]
>>> my_rasters.sns_array_axis_physical_types
[(np.str_('custom:pos.helioprojective.lat'), np.str_('custom:pos.helioprojective.lon'), np.str_('time')), (np.str_('custom:pos.helioprojective.lat'), np.str_('custom:pos.helioprojective.lon')), (np.str_('em.wl'),)]
[('custom:pos.helioprojective.lat', 'custom:pos.helioprojective.lon', 'time'), ('custom:pos.helioprojective.lat', 'custom:pos.helioprojective.lon'), ('em.wl',)]
In the raster case, ``'meta.obs.sequence'`` represents the raster scan number axis.
For those familiar with `~ndcube.NDCubeSequence`, these are simply aliases for the `~ndcube.NDCubeSequence.array_axis_physical_axis_types` and `~ndcube.NDCubeSequence.cube_like_world_axis_physical_axis_types`, respectively.
Expand Down
6 changes: 4 additions & 2 deletions docs/data_types/spectrogram.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ The `~sunraster.SpectrogramCube.dimensions` and `~sunraster.SpectrogramCube.arra
>>> my_spectrograms.dimensions
<Quantity [3., 4., 5.] pix>
>>> my_spectrograms.array_axis_physical_types
[(np.str_('custom:pos.helioprojective.lat'), np.str_('custom:pos.helioprojective.lon')), (np.str_('custom:pos.helioprojective.lat'), np.str_('custom:pos.helioprojective.lon')), (np.str_('em.wl'),)]
[('custom:pos.helioprojective.lat', 'custom:pos.helioprojective.lon'),
('custom:pos.helioprojective.lat', 'custom:pos.helioprojective.lon'),
('em.wl',)]
`~sunraster.SpectrogramCube.dimensions` returns a `~astropy.units.Quantity` giving the length of each dimension in pixel units while `~sunraster.SpectrogramCube.array_axis_physical_types` returns an list of tuples where each tuple contains the types of physical properties associated with each array axis.
Since more than one physical type be associated with an array axis because they are dependent, e.g. latitude/longitude, or because of the rastering nature of the instrument, e.g. latitude/longitude and time, the length of each tuple can be greater than one.
Expand Down Expand Up @@ -321,7 +323,7 @@ In order to inspect the dimensionality of our sequence and the physical properti
>>> my_sequence.dimensions
(<Quantity 3. pix>, <Quantity 3. pix>, <Quantity 4. pix>, <Quantity 5. pix>)
>>> my_sequence.array_axis_physical_types
[('meta.obs.sequence',), (np.str_('custom:pos.helioprojective.lat'), np.str_('custom:pos.helioprojective.lon'), np.str_('time'), np.str_('custom:CUSTOM')), (np.str_('custom:pos.helioprojective.lat'), np.str_('custom:pos.helioprojective.lon')), (np.str_('em.wl'),)]
[('meta.obs.sequence',), ('custom:pos.helioprojective.lat', 'custom:pos.helioprojective.lon', 'time', 'custom:CUSTOM'), ('custom:pos.helioprojective.lat', 'custom:pos.helioprojective.lon'), ('em.wl',)]
Note that this is the same API as `~sunraster.SpectrogramCube` except that `sunraster.SpectrogramSequence.dimensions` returns an iterable of `~astropy.units.Quantity` objects, one for each axis.
This is because of its inheritance from `~ndcube.NDCubeSequence` rather than `~ndcube.NDCube`.
Expand Down
2 changes: 0 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ addopts = --doctest-rst --doctest-ignore-import-errors -p no:unraisableexception
markers =
online: marks this test function as needing online connectivity.
remote_data_strict = True
doctest_subpackage_requires =
docs/* = ndcube<2.3.0
filterwarnings =
error
# Do not fail on pytest config issues (i.e. missing plugins) but do show them
Expand Down

0 comments on commit a27e20f

Please sign in to comment.