Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basic code example and links to Spectrum1D.write #1017

Merged
merged 2 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/custom_loading.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ many `~specutils.Spectrum1D` objects. This method is available since
`astropy.io.registry.read`).


.. _custom_writer:

Creating a Custom Writer
------------------------

Expand Down
11 changes: 11 additions & 0 deletions docs/spectrum1d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,17 @@ A full list of the supported formats is shown in the table below.

| More information on creating custom loaders can be found in the :doc:`custom loading </custom_loading>` page.

Writing to a File
-----------------

Similarly, a `~specutils.Spectrum1D` object can be saved to any of the supported formats using the
:meth:`specutils.Spectrum1D.write` method.

.. code-block:: python

>>> spec1d.write("/path/to/output.fits") # doctest: +SKIP

kecnry marked this conversation as resolved.
Show resolved Hide resolved
| More information on creating custom writers can be found in :ref:`custom_writer`.

Including Uncertainties
-----------------------
Expand Down