Metadata-Version: 2.4
Name: gildas_uvfit
Version: 0.2
Summary: Helper function to read IRAM GILDAS uvfit fits file
Author-email: Alexandre Beelen <alexandre.beelen@lam.fr>
License: Copyright (c) 2024, Alexandre Beelen
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without modification,
        are permitted provided that the following conditions are met:
        
        * Redistributions of source code must retain the above copyright notice, this
          list of conditions and the following disclaimer.
        * Redistributions in binary form must reproduce the above copyright notice, this
          list of conditions and the following disclaimer in the documentation and/or
          other materials provided with the distribution.
        * Neither the name of the Astropy Team nor the names of its contributors may be
          used to endorse or promote products derived from this software without
          specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
        ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
        WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
        ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
        (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
        LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
        ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
        (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
        SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: repository, https://github.com/abeelen/gildas-uvfit
Keywords: astronomy,gildas,uvfit,astropy
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Astronomy
Requires-Python: >=3.9
Description-Content-Type: text/x-rst
Requires-Dist: astropy>=4.0
Requires-Dist: numpy>=1.16
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-doctestplus; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: specutils; extra == "test"
Provides-Extra: docs
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: sphinx-automodapi; extra == "docs"
Provides-Extra: specutils
Requires-Dist: specutils; extra == "specutils"

Helper function to read IRAM GILDAS uvfit fits file
---------------------------------------------------

gildas_uvfit is a set of helper function to read uv-fit files procuded 
by `GILDAS MAPPING/uv_fit task <https://www.iram.fr/IRAMFR/GILDAS/doc/html/map-html/node90.html>`_ 
exported to the fits format by using the `GILDAS CLIC/fits <https://www.iram.fr/IRAMFR/GILDAS/doc/html/clic-html/node103.html>`_ command

.. code-block:: console

    fits "blah.fits" from "blah.uvfit" /style standard /overwrite /bits -32

Then you can access the fitted values as astropy Table using python with


.. code-block:: python
    
    from astropy.table import Table
    import gildas_uvfit

    data = Table.read('data.fits', format='gildas_uvfit')


If you fixed the position and size of the source in the `GILDAS MAPPING/uv_fit task <https://www.iram.fr/IRAMFR/GILDAS/doc/html/map-html/node90.html>`_ 
then you can use `specutils.Spectrum1D <https://specutils.readthedocs.io/en/stable/api/specutils.Spectrum1D.html>`_ object to read the data directly

.. code-block:: python
    
    from specutils import Spectrum1D
    from gildas_uvfit import specutils_custom_loader

    spec = Spectrum1D.read('data.fits')



License
-------

This project is Copyright (c) Alexandre Beelen and licensed under
the terms of the BSD 3-Clause license. This package is based upon
the `Openastronomy packaging guide <https://github.com/OpenAstronomy/packaging-guide>`_
which is licensed under the BSD 3-clause licence. See the licenses folder for
more information.

Contributing
------------

We love contributions! gildas-uvfit is open source,
built on open source, and we'd love to have you hang out in our community.

**Imposter syndrome disclaimer**: We want your help. No, really.

There may be a little voice inside your head that is telling you that you're not
ready to be an open source contributor; that your skills aren't nearly good
enough to contribute. What could you possibly offer a project like this one?

We assure you - the little voice in your head is wrong. If you can write code at
all, you can contribute code to open source. Contributing to open source
projects is a fantastic way to advance one's coding skills. Writing perfect code
isn't the measure of a good developer (that would disqualify all of us!); it's
trying to create something, making mistakes, and learning from those
mistakes. That's how we all improve, and we are happy to help others learn.

Being an open source contributor doesn't just mean writing code, either. You can
help out by writing documentation, tests, or even giving feedback about the
project (and yes - that includes giving feedback about the contribution
process). Some of these contributions may be the most valuable to the project as
a whole, because you're coming to the project with fresh eyes, so you can see
the errors and assumptions that seasoned contributors have glossed over.

Note: This disclaimer was originally written by
`Adrienne Lowe <https://github.com/adriennefriend>`_ for a
`PyCon talk <https://www.youtube.com/watch?v=6Uj746j9Heo>`_, and was adapted by
gildas-uvfit based on its use in the README file for the
`MetPy project <https://github.com/Unidata/MetPy>`_.
