Skip to content

Commit eb98a8e

Browse files
committed
More review updates
1 parent a6e6b31 commit eb98a8e

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

examples/creating_a_gwcs_from_quantities.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
from ndcube import NDCube
1515
from ndcube.extra_coords import QuantityTableCoordinate, TimeTableCoordinate
16-
from ndcube.wcs.wrappers import CompoundLowLevelWCS
1716

1817
##############################################################################
1918
# We aim to create coordinates that are focused around time and energies using astropy quantities.
@@ -33,16 +32,13 @@
3332
print(time_coord)
3433

3534
##############################################################################
36-
# Now we need to create a `~ndcube.wcs.wrappers.compound_wcs.CompoundLowLevelWCS` instance
37-
# using the previously created table coordinates.
38-
# Please note the ordering, it is important to make sure you are assigning them
39-
# in the correct order.
35+
# Now we need to combine table coordinates created above and extract the ``.wcs`` from the result.
4036

41-
wcs = CompoundLowLevelWCS(time_coord.wcs, energy_coord.wcs, )
37+
wcs = (time_coord & energy_coord).wcs
4238
print(wcs)
4339

4440
##############################################################################
45-
# Now, we have all of the pieces required to construct a `~ndcube.NDCube` with this data and the GWCS we just created.
41+
# Now, we have all the pieces required to construct a `~ndcube.NDCube` with this data and the GWCS we just created.
4642

4743
data = np.random.rand(len(time), len(energy))
4844
cube = NDCube(data=data, wcs=wcs)

0 commit comments

Comments
 (0)