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

Update readme and tweak docs config #53

Merged
merged 3 commits into from
Apr 27, 2024
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,9 @@ docs/api
docs/whatsnew/latest_changelog.txt
xrayvision/version.py
htmlcov/
sg_execution_times.rst

.DS_Store

# IDE
.idea
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
rev: 5.13.2
hooks:
- id: isort
exclude: ".*(.fits|.fts|.fit|.header|.txt|tca.*|extern.*|)$"
exclude: ".*(.fits|.fts|.fit|.header|.txt|tca.*|extern.*)$"
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
Expand Down
11 changes: 9 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.10"
python: "3.9"
apt_packages:
- graphviz

# Build documentation in the docs/ directory with Sphinx
sphinx:
builder: html
configuration: docs/conf.py
fail_on_warning: true

# Optionally, build your docs in additional formats such as PDF and ePub
formats: []

python:
install:
- method: pip
path: .
extra_requirements:
- docs,map
- docs
- map
65 changes: 24 additions & 41 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,63 +1,46 @@
XRAYVISION - X-RAY VIsibility Synthesis ImagiNg
================================================
XRAYVISION - X-RAY VIsibility Synthesis ImagiNg
===============================================

|Powered By| |Build Status| |Doc Status| |Python Versions|

.. |Powered By| image:: http://img.shields.io/badge/powered%20by-SunPy-orange.svg?style=flat
:target: https://www.sunpy.org
:alt: Powered by SunPy Badge

.. |Build Status| image:: https://github.com/TCDSolar/xrayvision/actions/workflows/ci.yaml/badge.svg
:target: https://github.com/TCDSolar/xrayvision/actions/workflows/ci.yaml
:alt: Build Status

.. |Doc Status| image:: https://readthedocs.org/projects/xrayvision/badge/?version=stable
:target: https://xrayvision.readthedocs.io/en/latest/?badge=stable
:alt: Documentation Status

.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/xrayvisim
:target: https://pypi.python.org/pypi/xrayvisim/
:alt: Python Versions

XRAYVISION is an open-source Python library for Fourier or synthesis imaging of X-Rays. The most
common usage of this technique is radio interferometry however there have been a number of solar
X-ray missions which also use this technique but obtain the visibilities via a different method.

Installation
------------

Requirements: Python3.6+, SunPy0.8+

As XRAYVISION is still a work in progress it has not been release to PyPI yet. The recommended way
to install XRAYVISION is via pip from git.
It is strongly advised that you use and isolated environment through python's venv, virturalenv, anaconda or similar.

.. code:: bash
.. code-block::

pip install git+https://github.com/sunpy/xrayvision.git
pip install xrayvision

Usage
-----

.. code:: python

from astropy import units as u

from xrayvision.visibility import RHESSIVisibility
from xrayvision import SAMPLE_RHESSI_VISIBILITIES

rhessi_vis = RHESSIVisibility.from_fits_file(SAMPLE_RHESSI_VISIBILITIES)
rhessi_map = rhessi_vis.to_map(shape=(65, 65), pixel_size=[4., 4.] * u.arcsec)
rhessi_map.peek()


Getting Help
------------



Contributing
~~~~~~~~~~~~
When you are interacting with the SunPy community you are asked to
follow our `Code of Conduct`_.

.. |Powered By| image:: http://img.shields.io/badge/powered%20by-SunPy-orange.svg?style=flat
:target: http://www.sunpy.org
:alt: Powered by SunPy Badge

.. |Build Status| image:: https://travis-ci.org/sunpy/xrayvision.svg?branch=master
:target: https://travis-ci.org/sunpy/xrayvision
:alt: Travis-CI build status

.. |Doc Status| image:: https://readthedocs.org/projects/xrayvision/badge/?version=latest
:target: http://xrayvision.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. |Python Versions| image:: https://img.shields.io/badge/python-3.6-blue.svg
:target: https://www.python.org/downloads/release/python-360/
:alt: Python Versions
------------
When you are interacting with the community you are asked to
follow the `Code of Conduct`_.

.. _Code of Conduct: http://docs.sunpy.org/en/stable/coc.html
1 change: 1 addition & 0 deletions changelog/53.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update README fix badges and remove old example.
1 change: 1 addition & 0 deletions changelog/53.trivial.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix small bug in isort configuration.
20 changes: 12 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,17 @@
# Disable google style docstrings
napoleon_google_docstring = False

# until sphinx-gallery / sphinx is fixed https://github.com/sphinx-doc/sphinx/issues/12300
suppress_warnings = ["config.cache"]

# -- Options for intersphinx extension ---------------------------------------

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'python': ('https://docs.python.org/3/',
(None, 'http://data.astropy.org/intersphinx/python3.inv')),
'numpy': ('https://docs.scipy.org/doc/numpy/',
(None, 'http://data.astropy.org/intersphinx/numpy.inv')),
'scipy': ('https://docs.scipy.org/doc/scipy/reference/',
(None, 'http://data.astropy.org/intersphinx/scipy.inv')),
'matplotlib': ('https://matplotlib.org/',
(None, 'http://data.astropy.org/intersphinx/matplotlib.inv')),
'python': ('https://docs.python.org/3/', (None, 'http://data.astropy.org/intersphinx/python3.inv')),
'numpy': ('https://docs.scipy.org/doc/numpy/', (None, 'http://data.astropy.org/intersphinx/numpy.inv')),
'scipy': ('https://docs.scipy.org/doc/scipy/reference/', (None, 'http://data.astropy.org/intersphinx/scipy.inv')),
'matplotlib': ('https://matplotlib.org/', (None, 'http://data.astropy.org/intersphinx/matplotlib.inv')),
'astropy': ('http://docs.astropy.org/en/stable/', None),
'sunpy': ('https://docs.sunpy.org/en/stable/', None)}

Expand All @@ -88,6 +87,11 @@

html_theme = 'pydata_sphinx_theme'

html_theme_options = {
"logo": {
"text": "xrayision"
},
}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down
3 changes: 1 addition & 2 deletions examples/rhessi.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@

Create images from RHESSI visibility data
"""
import astropy.units as apu
import matplotlib.pyplot as plt
import numpy as np

import astropy.units as apu
from astropy.io import fits

from xrayvision.clean import vis_clean
Expand Down
3 changes: 1 addition & 2 deletions examples/stix.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
import pickle
import urllib.request

import matplotlib.pyplot as plt

import astropy.units as apu
import matplotlib.pyplot as plt

from xrayvision.clean import vis_clean
from xrayvision.imaging import vis_psf_map, vis_to_map
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ build-backend = 'setuptools.build_meta'
changelog_skip_label = "No Changelog Entry Needed"
help_url = "https://github.com/TCDSolar/xrayvision/blob/main/changelog/README.rst"

changelog_missing_long = "There isn't a changelog file in this pull request. Please add a changelog file to the `changelog/` directory following the instructions in the changelog [README](https://https://github.com/TCDSolar/xrayvision/blob/main/changelog/README.rst)."
changelog_missing_long = "There isn't a changelog file in this pull request. Please add a changelog file to the `changelog/` directory following the instructions in the changelog [README](https://github.com/TCDSolar/xrayvision/blob/main/changelog/README.rst)."

type_incorrect_long = "The changelog file you added is not one of the allowed types. Please use one of the types described in the changelog [README](https://github.com/TCDSolar/xrayvision/blob/main/changelog/README.rst)"

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ filterwarnings =

[isort]
balanced_wrapping = true
skip =
extend_skip =
docs/conf.py,
xrayvision/__init__.py,
default_section = THIRDPARTY
Expand Down