Skip to content

Commit

Permalink
Merge pull request #117 from GreenBankObservatory/release_resolve_con…
Browse files Browse the repository at this point in the history
…flicts

Release resolve conflicts
  • Loading branch information
astrofle authored Nov 20, 2023
2 parents 365407f + 8838c5e commit 501448a
Show file tree
Hide file tree
Showing 73 changed files with 242,215 additions and 20,643 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/hatch-and-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ name: Build and Pytest

on:
push:
branches: [ "main", "release-0.2.0", "cat-devel", "mwp-devel", "pedro-devel" ]
branches: [ "main", "release-*", "cat-devel", "mwp-devel", "pedro-devel", "evan-devel" ]
pull_request:
branches: [ "main", "release-0.2.0", "cat-devel", "mwp-devel", "pedro-devel" ]
branches: [ "main", "release-*", "cat-devel", "mwp-devel", "pedro-devel", "evan-devel" ]
workflow_dispatch: # needed for "Run" button to show up in action
jobs:
build:
runs-on: ${{ matrix.os }}
Expand All @@ -17,7 +18,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
Expand All @@ -28,6 +29,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
pip install -r requirements.txt
pip install -e .
- name: Build with hatch
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: pre-commit

on:
pull_request:
push:
branches: [main, release*]


jobs:
pre-commit:
env:
SKIP: ruff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
# must match the version in .pre-commit-config.yaml:default_language_version.python
python-version: '3.9'
- uses: pre-commit/[email protected]
2 changes: 1 addition & 1 deletion .github/workflows/pyinstaller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
release:
types: [ published ]
workflow_dispatch:

jobs:
build:
runs-on: ${{ matrix.os }}
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ repos:
rev: v4.4.0
hooks:
- id: trailing-whitespace
exclude: '(notebooks|attic|benchmark|testdata)/.*'
- id: end-of-file-fixer
exclude: LICENSE
- id: check-yaml
Expand All @@ -24,13 +25,12 @@ repos:
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
exclude: ^notebooks/
exclude: '(notebooks|attic|benchmark|testdata)/.*'
- repo: 'https://github.com/psf/black'
rev: 23.1.0
hooks:
- id: black
exclude: ^notebooks/
exclude: '(notebooks|attic|benchmark|testdata)/.*'
# - repo: https://github.com/jazzband/pip-tools
# rev: 6.12.3
# hooks:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[![Documentation Status](https://readthedocs.org/projects/dysh/badge/?version=latest)](https://dysh.readthedocs.io/en/latest/?badge=latest)

# Dysh
# dysh

*Dysh* is a Python spectral line data reduction and analysis program for singledish data with specific emphasis on data from the Green Bank Telescope. It is currently under development in collaboration between the [Green Bank Observatory](https:/greenbankobservatory.org) and the Laboratory for Millimeter-Wave Astronomy (LMA) at [University of Maryland (UMD)](https://www.astro.umd.edu). It is intended to be a full replacement for the GBO's current reduction package [GBTIDL](https://www.gb.nrao.edu/GBT/DA/gbtidl/users_guide/).
*dysh* is a Python spectral line data reduction and analysis program for singledish data with specific emphasis on data from the Green Bank Telescope. It is currently under development in collaboration between the [Green Bank Observatory](https:/greenbankobservatory.org) and the Laboratory for Millimeter-Wave Astronomy (LMA) at [University of Maryland (UMD)](https://www.astro.umd.edu). It is intended to be a full replacement for the GBO's current reduction package [GBTIDL](https://www.gb.nrao.edu/GBT/DA/gbtidl/users_guide/).

## Getting Started
### Installation

Dysh requires Python 3.8+ and recent versions of [astropy]( https://astropy.org), [numpy](https://numpy.org), [scipy](https://scipy.org), [pandas](https://pandas.pydata.org), [specutils](https://specutils.readthedocs.io/en/stable/), and [matplotlib](https://matplotlib.org).
dysh requires Python 3.9+ and recent versions of [astropy]( https://astropy.org), [numpy](https://numpy.org), [scipy](https://scipy.org), [pandas](https://pandas.pydata.org), [specutils](https://specutils.readthedocs.io/en/stable/), and [matplotlib](https://matplotlib.org).

#### With pip from PyPi
Dysh is most easily installed with *pip*, which will take care of any dependencies. The packaged code is hosted at the [Python Packaging Index](https://pypi.org/project/dysh).
dysh is most easily installed with *pip*, which will take care of any dependencies. The packaged code is hosted at the [Python Packaging Index](https://pypi.org/project/dysh).

```bash
$ pip install dysh
Expand Down
2 changes: 1 addition & 1 deletion attic/sdfitsload.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def dcmeantsys(calon, caloff, tcal, mode=0, fedge=10, nedge=None):
mode=1 do the mean after the division
"""
nchan = len(calon)
if nedge == None:
if nedge is None:
nedge = nchan // fedge # 10 %
if mode == 0:
meanoff = np.mean(caloff[nedge:-nedge])
Expand Down
4 changes: 2 additions & 2 deletions benchmark/revisedstructure.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

import numpy as np
from astropy.table import Table, vstack
from specutils import SpectralRegion, Spectrum1D, SpectrumList
from specutils import SpectralRegion

from dysh.sdfitsload import Obsblock, SDFITSLoad, baseline, get_size
from dysh.sdfitsload import SDFITSLoad, baseline

if __name__ == "__main__":
parser = argparse.ArgumentParser(prog="revisedstructure")
Expand Down
25 changes: 10 additions & 15 deletions docs/source/design/sdfits_loaders.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ Motivation

Although the initial design will be for GBT data, a goal is for `dysh` to be easily modifiable for any single-dish radio telescope. Thus came the idea of an SDFITS loader which would standardize inputs.

Obsblock
========
ScanBlock
=========

Here's the class diagram for an `Obsblock` and its derived classes.
Here's the class diagram for an `ScanBlock` and its derived classes.

.. mermaid::

classDiagram
class Obsblock{
class ScanBlock{
metadata
spectra
summary()
Expand All @@ -35,23 +35,18 @@ Here's the class diagram for an `Obsblock` and its derived classes.
spectra
fold()
}
class NodScan{
class SubBeamNodScan{
metadata
spectra
}
class OTFScan{
metadata
spectra
}
class ScanAvg{
metadata
spectra
}
Obsblock <|-- PSScan
Obsblock <|-- FSScan
Obsblock <|-- NodScan
Obsblock <|-- OTFScan
Obsblock <|-- ScanAvg
ScanBlock <|-- PSScan
ScanBlock <|-- FSScan
ScanBlock <|-- NodScan
ScanBlock <|-- OTFScan

That's probably not super accurate. I just copied the diagram in the stakeholder presentation from last May.

Expand All @@ -64,7 +59,7 @@ SDFITSLoad
class SDFITSLoad{
_filename
_bintable
_ptable
_index
_binheader
_data
_hdu
Expand Down
2 changes: 1 addition & 1 deletion docs/source/for_developers/git_workflows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Releases
Release branches will be locked once work on the next release begins.

Setting up your own development branch
========
======================================

In the directory you want to work in, set up the repo:

Expand Down
2 changes: 1 addition & 1 deletion docs/source/getting_started/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Installing ``dysh``
*******************

``dysh`` requires Python 3.8+ and recent versions of
``dysh`` requires Python 3.9+ and recent versions of
`astropy <https://astropy.org>`_,
`numpy <https://numpy.org>`_,
`scipy <https://scipy.org>`_,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ In a `Python` instance, type
Keep the `Python` instance open, we will start working with `dysh` now.

.. note::
The data used for this tutorial is ~800 MB. Make sure you have enough disk space and bandwidth to download it.

Inspecting the raw data
-----------------------

Expand Down
7 changes: 0 additions & 7 deletions docs/source/modules/dysh.spectra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,3 @@ Scan
:members:
:undoc-members:
:show-inheritance:

Obsblock
--------
.. automodule:: dysh.spectra.obsblock
:members:
:undoc-members:
:show-inheritance:
Loading

0 comments on commit 501448a

Please sign in to comment.