@@ -36,7 +36,7 @@ create it explicitly from arrays or `~astropy.units.Quantity` objects:
36
36
37
37
.. note ::
38
38
The ``spectral_axis `` can be either ascending or descending, but must be monotonic
39
- in either case.
39
+ in either case.
40
40
41
41
Reading from a File
42
42
-------------------
@@ -97,7 +97,7 @@ objects will propagate uncertainties.
97
97
98
98
Uncertainties are a special subclass of :class :`~ astropy.nddata.NDData` , and their
99
99
propagation rules are implemented at the class level. Therefore, users must
100
- specify the uncertainty type at creation time
100
+ specify the uncertainty type at creation time.
101
101
102
102
.. code- block:: python
103
103
@@ -248,9 +248,9 @@ axis is always the last.
248
248
Slicing
249
249
------ -
250
250
251
- As seen above, `~ specutils.Spectrum1D` supports slicing in the same way as any
252
- other array- like object . Additionally, a `~ specutils.Spectrum1D` can be sliced
253
- along the spectral axis using world coordinates.
251
+ As seen above, `~ specutils.Spectrum1D` supports slicing in the same way as any
252
+ other array- like object . Additionally, a `~ specutils.Spectrum1D` can be sliced
253
+ along the spectral axis using world coordinates.
254
254
255
255
.. code- block:: python
256
256
@@ -261,7 +261,7 @@ along the spectral axis using world coordinates.
261
261
>> > spec_slice.spectral_axis
262
262
< SpectralAxis [5002 ., 5003 ., 5004 ., 5005 .] Angstrom>
263
263
264
- It is also possible to slice on other axes using simple array indices at the
264
+ It is also possible to slice on other axes using simple array indices at the
265
265
same time as slicing the spectral axis based on spectral values.
266
266
267
267
.. code- block:: python
@@ -273,7 +273,7 @@ same time as slicing the spectral axis based on spectral values.
273
273
>> > spec_slice.shape
274
274
(2 , 4 )
275
275
276
- If the `specutils.Spectrum1D` was created with a WCS that included spatial
276
+ If the `specutils.Spectrum1D` was created with a WCS that included spatial
277
277
information, for example in case of a spectral cube with two spatial dimensions,
278
278
the `specutils.Spectrum1D.crop` method can be used to subset the data based on
279
279
the world coordinates. The inputs required are two sets up `astropy.coordinates`
@@ -282,7 +282,7 @@ one of the coordinates is decreasing along an axis, the higher world coordinate
282
282
value will apply to the lower bound input .
283
283
284
284
.. code- block:: python
285
-
285
+
286
286
>> > from astropy.coordinates import SpectralCoord, SkyCoord
287
287
>> > import astropy.units as u
288
288
@@ -293,9 +293,9 @@ value will apply to the lower bound input.
293
293
Collapsing
294
294
----------
295
295
296
- `~ specutils.Spectrum1D` has built- in convenience methods for collapsing the
296
+ `~ specutils.Spectrum1D` has built- in convenience methods for collapsing the
297
297
flux array of the spectrum via various statistics. The available statistics are
298
- mean, median, sum , max , and min , and may be called either on a specific axis
298
+ mean, median, sum , max , and min , and may be called either on a specific axis
299
299
(or axes) or over the entire flux array. The collapse methods currently respect
300
300
the `` mask`` attribute of the `~ specutils.Spectrum1D` , but do not propagate
301
301
any `` uncertainty`` attached to the spectrum.
@@ -307,18 +307,18 @@ any ``uncertainty`` attached to the spectrum.
307
307
< Quantity 0.4572145 Jy>
308
308
309
309
The ' axis' argument of the collapse methods may either be an integer axis, or a
310
- string specifying either ' spectral' , which will collapse along only the
310
+ string specifying either ' spectral' , which will collapse along only the
311
311
spectral axis, or ' spatial' , which will collapse along all non- spectral axes.
312
312
313
313
.. code- block:: python
314
314
315
315
>> > spec.mean(axis = ' spatial' ) # doctest: +IGNORE_OUTPUT
316
- < Spectrum1D(flux = < Quantity [0.39985669 , ... 0.38041483 ] Jy> ,
316
+ < Spectrum1D(flux = < Quantity [0.39985669 , ... 0.38041483 ] Jy> ,
317
317
spectral_axis = < SpectralAxis ... [5000 ., ... 5009 .]>
318
318
319
- Note that in this case, the result of the collapse operation is a
320
- `~ specutils.Spectrum1D` rather than an `astropy.units.Quantity` , because the
321
- collapse operation left the spectral axis intact.
319
+ Note that in this case, the result of the collapse operation is a
320
+ `~ specutils.Spectrum1D` rather than an `astropy.units.Quantity` , because the
321
+ collapse operation left the spectral axis intact.
322
322
323
323
It is also possible to supply your own function for the collapse operation by
324
324
calling `~ specutils.Spectrum1D.collapse()` and providing a callable function
0 commit comments