Science Score: 62.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
    Organization geminidrsoftware has institutional domain (www.gemini.edu)
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.5%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Basic Info
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 2
  • Open Issues: 15
  • Releases: 7
Created over 2 years ago · Last pushed 11 months ago
Metadata Files
Readme Contributing License Code of conduct Citation

README.md

A logo of a stylized blue dragon inside a similarly blue shell. A yellow star lies at the center, together with the dragon shape forming a stylized letter A.

astrodata

Project Status: Active – The project has reached a stable, usable state and is being actively developed. Supported python versions -- 3.10, 3.11, and 3.12 DOI Badge pyOpenSci Peer Reviewed

Tests

A badge displaying the testing coverage percentage of this repository. Source test status badge Build/Release test status badge

Building & Publishing

Documentation build status badge pypi packaging status badge PyPI version badge


Making astronomical data consistent and approachable

astrodata is a package for managing astronomical data through a uniform interface. It is designed to be used with the Astropy package. astrodata was created for use as part of the DRAGONS data reduction pipeline, but it is now implemented to be useful for any astronomical data reduction or analysis project.

Unlike managing files using the astropy.io.fits package alone, astrodata is designed to be extendible to any data format, and to parse, respond to, and store metadata in a consistent, intentional way. This makes it especially useful for managing data from multiple instruments, telescopes, and data generation utilities.

Note: If you are trying to reduce Gemini data, please use DRAGONS. Interaction with this package directly is primarily suited for developers, and does not come with any tools for data reduction on any specific instrument or data.

Installation

astrodata is available on the Python Package Index and can be installed using pip:

python -m pip install astrodata

Documentation

Documentation for astrodata is available on our GitHub pages site. This documentation includes a user and programmer's guide, as well as a full API reference.

Usage

The most basic usage of astrodata is to extend the astrodata.AstroData class, which includes some basic FITS file handling methods by default:

```python from astrodata import AstroData, astrodatadescriptor, factory, from_file

class MyData(AstroData): @astrodatadescriptor def color(self): # The color filter used for our image is stored in a few different # ways, let's unify them. bluelabels = {"blue", "bl", "b"} greenlabels = {"green", "gr", "g"} red_labels = {"red", "re", "r"}

    header_value = self.phu.get("COLOR", None).casefold()

    if header_value in blue_labels:
        return "BLUE"

    if header_value in green_labels:
        return "GREEN"

    if header_value in red_labels:
        return "RED"

    if header_value is None:
        raise ValueError("No color found")

    # Unrecognized color
    raise ValueError(f"Did not recognize COLOR value: {header_value}")

Now, define our instruments with nuanced, individual data formats

class MyInstrument1(MyData): # These use a special method to resolve the metadata and apply the correct # class. @staticmethod def matchesdata(source): return source[0].header.get("INSTRUME", "").upper() == "MYINSTRUMENT1"

class MyInstrument2(MyData): @staticmethod def matchesdata(source): return source[0].header.get("INSTRUME", "").upper() == "MYINSTRUMENT2"

class MyInstrument3(MyData): @staticmethod def matchesdata(source): return source[0].header.get("INSTRUME", "").upper() == "MYINSTRUMENT3"

for cls in [MyInstrument1, MyInstrument2, MyInstrument3]: factory.add_class(cls)

my_file.fits has some color data depending on the instrument it comes from,

but now we can access it and handle a single value.

data = fromfile("READMEexample.fits")

the astrodata factory has already resolved the correct class for us.

print(f"File used to create class: {data.class.name}") if data.color() == "BLUE": print("I used the blue filter!")

else: print("I used a red or green filter!")

Get all the info about the astrodata object.

data.info()

```

This will print out the filter used as extracted from the header of the FITS file. data.info() offers a more complete look at the file's data including the filename and path of the file (as it does for astropy.io.fits objects).

astrodata is designed to be extensible, so you can add your own methods to analyze and process data based on your specific needs and use cases.

astrodata also has a number of built in features, including:

  • Operator support for arithmetic operations
  • Uncertainty propagation
  • Slicing
  • Windowing (reading and operating on subsets of data)
  • Metadata management and access

For a complete example, see the Quickstart in our documentation. For more advanced usage, see the User Manual or Programmer's Manual.

Installing development dependencies

astrodata uses Poetry for build and package management. Our documentation includes an installation guide for astrodata developers

Contributing

See our contributing guidelines for information on contributing. If you're worried about contributing, or feel intimidated, please remember that your contribution is immensely appreciated---no matter how small!

License

This project is Copyright 2024 (c) and licensed under the terms of a modified BSD 3-clause license through AURA astronomy. This package is based upon the Openastronomy packaging guide which is licensed under the standard BSD 3-clause license. See the LICENSE file for more information.

Citations

To cite astrodata in your work, please see CITATION.md for complete information, including a bibtex example.

For ease of reference, the current citation to use is: Simpson et al. 2024.

Owner

  • Name: Gemini Observatory Data Reduction Software
  • Login: GeminiDRSoftware
  • Kind: organization

Citation (CITATION.md)

If you are willing to cite `astrodata` in your work, please cite the following
source(s)s:

# As of May 2024:
+ [DRAGONS](https://zenodo.org/records/10841622)
    - The most recent DRAGONS release; Zenodo Record

## Bibtex
```
@software{chris_simpson_2024_10841622,
	author = {Chris Simpson and Kathleen Labrie and D.J. Teal and Daniel Berke and James Turner and Olesja Smirnova and William Vacca},
	doi = {10.5281/zenodo.10841622},
	month = mar,
	publisher = {Zenodo},
	title = {DRAGONS},
	url = {https://doi.org/10.5281/zenodo.10841622},
	version = {3.2.0},
	year = 2024,
	bdsk-url-1 = {https://doi.org/10.5281/zenodo.10841622}}
```

GitHub Events

Total
  • Create event: 25
  • Release event: 3
  • Issues event: 17
  • Delete event: 19
  • Member event: 1
  • Issue comment event: 10
  • Push event: 86
  • Pull request event: 38
Last Year
  • Create event: 25
  • Release event: 3
  • Issues event: 17
  • Delete event: 19
  • Member event: 1
  • Issue comment event: 10
  • Push event: 86
  • Pull request event: 38

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 7
  • Total pull requests: 12
  • Average time to close issues: 3 months
  • Average time to close pull requests: 19 days
  • Total issue authors: 1
  • Total pull request authors: 2
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.25
  • Merged pull requests: 8
  • Bot issues: 0
  • Bot pull requests: 2
Past Year
  • Issues: 5
  • Pull requests: 12
  • Average time to close issues: 15 days
  • Average time to close pull requests: 19 days
  • Issue authors: 1
  • Pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.25
  • Merged pull requests: 8
  • Bot issues: 0
  • Bot pull requests: 2
Top Authors
Issue Authors
  • teald (26)
  • mwcraig (8)
Pull Request Authors
  • teald (49)
  • dependabot[bot] (5)
  • aaryapatil (2)
  • mwcraig (2)
Top Labels
Issue Labels
bug (14) documentation (14) enhancement (13) maintenance (13) CI/CD (9) test (8) dependencies (4) misc (4) DRAGONS (3) external (3) help wanted (1) PyOpenSci Review (1) wontfix (1)
Pull Request Labels
documentation (19) maintenance (16) test (10) dependencies (9) CI/CD (9) misc (8) bug (7) DRAGONS (7) enhancement (7) wcs (2) gwcs (2) PyOpenSci Review (2) external (2) python (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 143 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 12
  • Total maintainers: 1
pypi.org: astrodata

A package for managing astronomical data through a uniform interface

  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 143 Last month
Rankings
Dependent packages count: 9.7%
Average: 36.8%
Dependent repos count: 63.9%
Maintainers (1)
Last synced: 7 months ago

Dependencies

.github/workflows/cache_purge.yml actions
  • kevincobain2000/action-camo-purge v1 composite
.github/workflows/documentation.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
  • peaceiris/actions-gh-pages v3 composite
.github/workflows/publish_pypi.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • snok/install-poetry v1 composite
  • tschm/token-mint-action v1.0.3 composite
.github/workflows/testing.yml actions
  • actions/checkout v2 composite
  • actions/download-artifact v3 composite
  • actions/setup-python v2 composite
  • actions/upload-artifact v3 composite
  • schneegans/dynamic-badges-action v1.4.0 composite
pyproject.toml pypi
  • coverage ^7.4.4 develop
  • isort ^5.13.2 develop
  • poetry ^1.8.2 develop
  • pre-commit ^3.6.2 develop
  • ruff ^0.3.3 develop
  • myst-parser ^2.0.0 docs
  • pygments ^2.17.2 docs
  • sphinx ^7.2.6 docs
  • sphinx-autoapi ^3.0.0 docs
  • sphinx-automodapi ^0.17.0 docs
  • sphinx-rtd-dark-mode ^1.3.0 docs
  • sphinx-rtd-theme ^2.0.0 docs
  • tomli ^2.0.1 docs
  • asdf ^3.1.0
  • astropy ^6.0.0
  • gwcs ^0.21.0
  • jsonschema ^4.21.1
  • numpy ^1.26.4
  • python ^3.10
  • coverage ^7.4.4 test
  • hypothesis ^6.99.13 test
  • pytest ^8.1.1 test
  • pytest-cov ^4.1.0 test
  • pytest-doctestplus ^1.2.1 test
  • tox ^4.14.1 test
poetry.lock pypi
  • 115 dependencies